Home Forums Bunifu UI Winforms Invoice System Tutorial Question

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • steven8579
      Participant
      Post count: 4

      Good Afternoon,
      I have a question about the video posted by KIMTOOFLEX. I followed the tutorial from the Bunifu Invoice System and I cant get my code to search for in the client table. It looks just like the code in the video and I always get no results. Your help would be greatly appreciated

      This is the video I’m referring to

      Here is my code:

       void loadClients()
              {
                  
                  gridClient.Rows.Clear();
                  List<Models.Client> clients = BunifuMapper.MapToList<Models.Client>(db.GetRows("select * from clients where 'ClientName' LIKE '%" + txtSearch.Text.Trim() + "%'"));
                  
                  foreach (var client in clients)
                  {
                      gridClient.Rows.Add(new object[] {
                          client.id,
                          client.ClientName,
                          client.Address,
                          client.PostalCode,
                          client.Country,
                          client.City
                      });
                      
                      gridClient.Rows[gridClient.RowCount - 1].Tag = client;
      
                      
                  }
              }
    • steven8579
      Participant
      Post count: 4

      I don’t know why my code didn’t come out right above. Here it is again in plain text:

      void loadClients()
      {

      gridClient.Rows.Clear();
      List<Models.Client> clients = BunifuMapper.MapToList<Models.Client>(db.GetRows(“select * from clients where ‘ClientName’ LIKE ‘%” + txtSearch.Text.Trim() + “%'”));

      foreach (var client in clients)
      {
      gridClient.Rows.Add(new object[] {
      client.id,
      client.ClientName,
      client.Address,
      client.PostalCode,
      client.Country,
      client.City
      });

      gridClient.Rows[gridClient.RowCount – 1].Tag = client;

      }
      }

Viewing 1 reply thread
  • You must be logged in to reply to this topic.