private void ListCatalogue() { try { grdList.Rows.Clear(); CatalogueDB dbrecord = new CatalogueDB(); List <catalogue> Catalogues = dbrecord.getCatalogues(); foreach (catalogue cat in Catalogues) { grdList.Rows.Add(cat.catalogueID, cat.description, ComboFIll.getStatusString(cat.status)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlCatalogueList.Visible = true; }
private void CreateCataloueButtons() { try { CatalogueDB dbrecord = new CatalogueDB(); List <catalogue> Catalogues = dbrecord.getCatalogues(); int intex = 0; foreach (catalogue cat in Catalogues) { if (cat.status == 1) { addButton(cat.catalogueID, intex); intex++; } } } catch (Exception) { MessageBox.Show("Error in request processing"); } }