示例#1
0
 private void LoadRecords()
 {
     dgDetails.Rows.Clear();
     eVariable.DisableGridColumnSort(dgDetails);
     if (oFindOption == FIND_OPTION.AUTHOR)
     {
         AuthorStructure();
         oAuthor = new DataAccess.Author();
         foreach (DataRow row in oAuthor.GetAuthor(cboSearch.Text, txtSearch.Text).Rows)
         {
             dgDetails.Rows.Add(row[0].ToString(), row[1].ToString(), row[2].ToString(), row[3].ToString(), row[4].ToString());
         }
     }
     else if (oFindOption == FIND_OPTION.CATEGORY)
     {
         CategoryStructure();
         oCategory = new DataAccess.Category();
         foreach (DataRow row in oCategory.GetCategory(cboSearch.Text, txtSearch.Text).Rows)
         {
             dgDetails.Rows.Add(row[0].ToString(), row[1].ToString(), row[2].ToString());
         }
     }
     else if (oFindOption == FIND_OPTION.LOCATION)
     {
         LocationStructure();
         oLocation = new DataAccess.Location();
         foreach (DataRow row in oLocation.GetLocationRecord(cboSearch.Text, txtSearch.Text).Rows)
         {
             dgDetails.Rows.Add(row[0].ToString(), row[1].ToString(), row[2].ToString());
         }
     }
 }
示例#2
0
 public void LoadLocation()
 {
     try
     {
         oLocation = new DataAccess.Location();
         dgDetails.Rows.Clear();
         eVariable.DisableGridColumnSort(dgDetails);
         foreach (DataRow row in oLocation.GetLocationRecord("", "").Rows)
         {
             dgDetails.Rows.Add(row[0], row[1], row[2]);
         }
     }
     catch (Exception ex)
     {
     }
 }