private void ListUser() { try { grdList.Rows.Clear(); txtSearch.Text = ""; ERPUserDB dbrecord = new ERPUserDB(); List <user> Users = dbrecord.getUsers(); if (Users.Count == 0) { // } foreach (user usr in Users) { grdList.Rows.Add(usr.userID, usr.userEmpName, ComboFIll.getUserTypeString(usr.userType), ComboFIll.getStatusString(usr.userStatus)); //dbrecord.getEmpStatusString(emp.empStatus), emp.empPhoto); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlUserList.Visible = true; }
private void initVariables() { try { ComboFIll.fillStaticCombos(); ////connString = Login.connString; ////userLoggedIn = Login.userLoggedIn; ////userLoggedInName = Login.userLoggedInName; ////empLoggedIn = Login.empLoggedIn; currentFY = FinancialYearDB.getCurrentFinancialYear(); documentDirectory = CatalogueValueDB.getParamValue("SysParam", "DocumentDirectory"); showTime(); lblEmployeeName.Text = Login.userLoggedInName; MenuPrivilegeDB mpDB = new MenuPrivilegeDB(); MenuItemDB dbrecord = new MenuItemDB(); menuhdritems = MenuItemDB.getMenuItemsHeader(); foreach (menuitem menu in menuhdritems) { dictMainHeader.Add(menu.menugrp, 0); } } catch (Exception) { MessageBox.Show("Main() : Error 2"); } }
private void ListFilteredCVINR(int option) { try { grdList.Rows.Clear(); forwarderList = demDB.getForwarders(docID, Login.empLoggedIn); approverList = demDB.getApprovers(docID, Login.empLoggedIn); CurrencyVsINRDB dbrecord = new CurrencyVsINRDB(); List <cvinr> CVINRs = dbrecord.getFilteredCVINR(userString, option); if (option == 1) { lblActionHeader.Text = "List of Action Pending Documents"; } else if (option == 2) { lblActionHeader.Text = "List of In-Process Documents"; } else if (option == 3 || option == 6) { lblActionHeader.Text = "List of Approved Documents"; } foreach (cvinr cvi in CVINRs) { if (option == 1) { if (cvi.documentStatus == 99) { continue; } } else { } grdList.Rows.Add(cvi.ConversionDate, cvi.CurrencyID + "-" + cvi.CurrencyName, ComboFIll.getCurrencyConversionTypeString(cvi.type), cvi.INRValue, // ComboFIll.getDocumentStatusString(cvi.documentStatus), cvi.status, cvi.documentStatus, cvi.CreateUser, cvi.ForwardUser, cvi.ApproveUser, cvi.ForwarderList); } } catch (Exception) { MessageBox.Show("Error in CVINR listing"); } setButtonVisibility("init"); pnlCVINRList.Visible = true; grdList.Columns["Creator"].Visible = true; grdList.Columns["Forwarder"].Visible = true; grdList.Columns["Approver"].Visible = true; }
private void btnConfirm_Click(object sender, EventArgs e) //private void btnSave_Click_1(object sender, EventArgs e) { try { taxcode tc = new taxcode(); TaxCodeDB taxcodedb = new TaxCodeDB(); tc.TaxCode = txtID.Text; tc.Description = txtDescription.Text; tc.status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btnSave.Text; if (taxcodedb.validateTaxCode(tc)) { if (btnText.Equals("Update")) { if (taxcodedb.updateTaxCode(tc)) { createAndUpdateTaxCodeWorking(); MessageBox.Show("Tax Code updated"); closeAllPanels(); ListTaxCode(); pnlBottomButtons.Visible = true; } else { MessageBox.Show("Failed to update tax Code"); } } else if (btnText.Equals("Save")) { if (taxcodedb.insertTaxCode(tc)) { createAndUpdateTaxCodeWorking(); MessageBox.Show("Tax Code Added"); closeAllPanels(); ListTaxCode(); pnlBottomButtons.Visible = true; } else { MessageBox.Show("Failed to Insert Tax Code"); } } } else { MessageBox.Show("Tax Code Data Validation failed"); } } catch (Exception) { MessageBox.Show("Failed Adding / Editing Tax Code"); } }
private void btnSave_Click(object sender, EventArgs e) { try { currency curr = new currency(); CurrencyDB currDB = new CurrencyDB(); curr.CurrencyID = txtID.Text; curr.name = txtName.Text; curr.symbol = txtSymbol.Text; curr.status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btn.Text; if (currDB.validateCurrency(curr)) { if (btnText.Equals("Update")) { if (currDB.updateCurrency(curr)) { MessageBox.Show("Currency updated"); closeAllPanels(); ListCurrency(); } else { MessageBox.Show("Failed to update Currency"); } } else if (btnText.Equals("Save")) { if (currDB.insertCurrency(curr)) { MessageBox.Show("Currency Added"); closeAllPanels(); ListCurrency(); } else { MessageBox.Show("Failed to Insert Currency"); } } } else { MessageBox.Show("Currency Data Validation failed"); } } catch (Exception) { MessageBox.Show("Failed Adding / Editing Currency"); } }
private void btnSave_Click(object sender, EventArgs e) { try { taxitem ti = new taxitem(); TaxItemDB taxitemdb = new TaxItemDB(); ti.TaxItemID = txtID.Text; ti.Description = txtDescription.Text; ti.AccountCodeIN = txtAccountCodeIN.Text; ti.AccountNameIN = txtAccountNameIN.Text; ti.AccountCodeOUT = txtAccountCodeOUT.Text; ti.AccountNameOUT = txtAccountNameOut.Text; ti.status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btn.Text; if (taxitemdb.validateTaxItem(ti)) { if (btnText.Equals("Update")) { if (taxitemdb.updateTaxItem(ti)) { MessageBox.Show("Tax Item updated"); closeAllPanels(); ListTaxItem(); } else { MessageBox.Show("Failed to Tax Item"); } } else if (btnText.Equals("Save")) { if (taxitemdb.insertTaxItem(ti)) { MessageBox.Show("Tax Item Added"); closeAllPanels(); ListTaxItem(); } else { MessageBox.Show("Failed to Insert Tax Item"); } } } else { MessageBox.Show("Tax Item Data Validation failed"); } } catch (Exception) { MessageBox.Show("Failed Adding / Editing Tax Item"); } }
private void btnSave_Click(object sender, EventArgs e) { try { cataloguevalue catval = new cataloguevalue(); CatalogueValueDB catvalDB = new CatalogueValueDB(); catval.catalogueValueID = txtID.Text; catval.description = txtDescription.Text; catval.catalogueID = selectedCatalogueID; catval.status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btn.Text; if (catvalDB.validateCatalogue(catval)) { if (btnText.Equals("Update")) { if (catvalDB.updateCatalogueValue(catval)) { MessageBox.Show("Catalogue Value updated"); closeAllPanels(); ListCatalogueValues(selectedCatalogueID); } else { MessageBox.Show("Failed to update Catalogue Value Status"); } } else if (btnText.Equals("Save")) { if (catvalDB.insertCatalogueValue(catval)) { MessageBox.Show("Catalogue Value Added"); closeAllPanels(); ListCatalogueValues(selectedCatalogueID); } else { MessageBox.Show("Failed to Insert Catalogue Value"); } } } else { MessageBox.Show("Catalogue Value Data Validation failed"); } } catch (Exception) { MessageBox.Show("Failed Adding / Editing User Data"); } }
private void btnSave_Click(object sender, EventArgs e) { try { productTestDesc ptdesc = new productTestDesc(); ProductTestDescriptionDB ptdescDB = new ProductTestDescriptionDB(); ptdesc.TestDescriptionID = txtTestDescID.Text; ptdesc.TestDescription = txtTestDesc.Text; ptdesc.Status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btn.Text; { if (btnText.Equals("Update")) { if (ptdescDB.updateProductTestDescription(ptdesc)) { MessageBox.Show("Document Status updated"); closeAllPanels(); ListProductTestDesc(); } else { MessageBox.Show("Failed to update Document Status"); } } else if (btnText.Equals("Save")) { if (ptdescDB.validateProductTestDescription(ptdesc)) { if (ptdescDB.insertProductTestDescription(ptdesc)) { MessageBox.Show("Document data Added"); closeAllPanels(); ListProductTestDesc(); } else { MessageBox.Show("Failed to Insert Document"); } } else { MessageBox.Show("Document Data Validation failed"); } } } } catch (Exception) { MessageBox.Show("Failed Adding / Editing User Data"); } }
private void btnSave_Click(object sender, EventArgs e) { try { region reg = new region(); RegionDB regDB = new RegionDB(); reg.regionID = txtID.Text; reg.name = txtName.Text; reg.status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btn.Text; if (regDB.validateRegion(reg)) { if (btnText.Equals("Update")) { if (regDB.updateRegion(reg)) { MessageBox.Show("Region updated"); closeAllPanels(); ListRegion(); } else { MessageBox.Show("Failed to update Region"); } } else if (btnText.Equals("Save")) { if (regDB.insertRegion(reg)) { MessageBox.Show("Region Added"); closeAllPanels(); ListRegion(); } else { MessageBox.Show("Failed to Insert Region"); } } } else { MessageBox.Show("Region Data Validation failed"); } } catch (Exception) { MessageBox.Show("Failed Adding / Editing Region"); } }
private void grdList_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex < 0) { return; } string columnName = grdList.Columns[e.ColumnIndex].Name; if (columnName.Equals("Edit") || columnName.Equals("Approve") || columnName.Equals("View")) { clearData(); setButtonVisibility(columnName); prevcvi = new cvinr(); int rowID = e.RowIndex; prevcvi.ConversionDate = DateTime.Parse(grdList.Rows[e.RowIndex].Cells[0].Value.ToString()); try { prevcvi.CurrencyID = grdList.Rows[e.RowIndex].Cells[1].Value.ToString().Trim().Substring(0, grdList.Rows[e.RowIndex].Cells[1].Value.ToString().Trim().IndexOf('-')); prevcvi.CurrencyName = grdList.Rows[e.RowIndex].Cells[1].Value.ToString().Trim().Substring(grdList.Rows[e.RowIndex].Cells[1].Value.ToString().IndexOf('-') + 1); prevcvi.type = ComboFIll.getCurrencyConversionTypeCode(grdList.Rows[e.RowIndex].Cells[2].Value.ToString()); prevcvi.documentStatus = Convert.ToInt32(grdList.Rows[e.RowIndex].Cells[5].Value.ToString()); prevcvi.CreateUser = grdList.Rows[e.RowIndex].Cells[6].Value.ToString(); prevcvi.ForwarderList = grdList.Rows[e.RowIndex].Cells["ForwarderLists"].Value.ToString(); } catch (Exception) { prevcvi.CurrencyID = ""; prevcvi.CurrencyName = ""; } btnSave.Text = "Update"; dtDate.Value = DateTime.Parse(grdList.Rows[e.RowIndex].Cells[0].Value.ToString()); cmbCurrency.SelectedIndex = cmbCurrency.FindStringExact(grdList.Rows[e.RowIndex].Cells[1].Value.ToString()); cmbType.SelectedIndex = cmbType.FindStringExact(grdList.Rows[e.RowIndex].Cells[2].Value.ToString()); txtINRValue.Text = grdList.Rows[e.RowIndex].Cells[3].Value.ToString(); pnlCVINRInner.Visible = true; pnlCVINROuter.Visible = true; pnlCVINRList.Visible = false; } } catch (Exception) { } }
private void ListRegion() { try { grdList.Rows.Clear(); RegionDB dbrecord = new RegionDB(); List <region> Regions = dbrecord.getRegions(); foreach (region reg in Regions) { grdList.Rows.Add(reg.regionID, reg.name, ComboFIll.getStatusString(reg.status)); } } catch (Exception) { MessageBox.Show("Error in Region listing"); } enableBottomButtons(); pnlRegionList.Visible = true; }
private void ListProductTestDesc() { try { grdList.Rows.Clear(); ProductTestDescriptionDB ptDescDB = new ProductTestDescriptionDB(); List <productTestDesc> PTDescList = ptDescDB.getProductTestDescriptionList(); foreach (productTestDesc ptdesc in PTDescList) { grdList.Rows.Add(ptdesc.TestDescriptionID, ptdesc.TestDescription, ComboFIll.getStatusString(ptdesc.Status), ptdesc.CreateUser, ptdesc.CreateTime); //dbrecord.getEmpStatusString(emp.empStatus), emp.empPhoto); } } catch (Exception ex) { } enableBottomButtons(); pnlDocumentList.Visible = true; }
private void ListCurrency() { try { grdList.Rows.Clear(); CurrencyDB dbrecord = new CurrencyDB(); List <currency> Currencies = dbrecord.getCurrencies(); foreach (currency curr in Currencies) { grdList.Rows.Add(curr.CurrencyID, curr.name, curr.symbol, ComboFIll.getStatusString(curr.status)); } } catch (Exception) { MessageBox.Show("Error in Currency listing"); } enableBottomButtons(); pnlCurrencyList.Visible = true; }
private void Listdet() { try { grdList.Rows.Clear(); CompanyDetailDB dbrecord = new CompanyDetailDB(); List <cmpnydetails> details = dbrecord.getdetails(); foreach (cmpnydetails det in details) { grdList.Rows.Add(det.companyID, det.companyname, det.companyAddress, ComboFIll.getStatusString(det.status)); } } catch (Exception) { MessageBox.Show("Error in Region listing"); } enableBottomButtons(); pnlRegionList.Visible = true; }
private void ListTaxCode() { try { grdList.Rows.Clear(); TaxCodeDB taxcodedb = new TaxCodeDB(); List <taxcode> TaxCodes = taxcodedb.getTaxCode(); foreach (taxcode tc in TaxCodes) { grdList.Rows.Add(tc.TaxCode, tc.Description, ComboFIll.getStatusString(tc.status)); } } catch (Exception) { MessageBox.Show("Error in Tax Code listing"); } enableBottomButtons(); pnlList.Visible = true; }
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 ListDocCommentor() { try { grdList.Rows.Clear(); DocCommenterDB dcdb = new DocCommenterDB(); List <doccommenter> docCommList = dcdb.getDocCommList(); foreach (doccommenter doc in docCommList) { grdList.Rows.Add(doc.DocumentID, doc.DocumentName, doc.EmployeeName + "-" + doc.EmployeeID, ComboFIll.getStatusString(doc.DocumentStatus)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlDocumentList.Visible = true; }
private void ListFinancialYear() { try { grdList.Rows.Clear(); //FinancialYearDB fyDB = new FinancialYearDB(); List <financialyear> FYears = FinancialYearDB.getFinancialYear(); foreach (financialyear fyear in FYears) { grdList.Rows.Add(fyear.fyID, fyear.startDate, fyear.endDate, ComboFIll.getStatusString(fyear.status), getCurrentFYStatusString(fyear.IsCurrentFY), fyear.documentStatus); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlList.Visible = true; }
private void ListUser() { try { grdList.Rows.Clear(); txtSearch.Text = ""; MenuGroupDB dbrecord = new MenuGroupDB(); List <menugroup> mngrp = dbrecord.getMenuGroup(); foreach (menugroup mnr in mngrp) { grdList.Rows.Add(mnr.rowid, mnr.MenuGroup, ComboFIll.getStatusString(mnr.status)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlUserList.Visible = true; }
private void ListStoreEmpMapping() { try { grdList.Rows.Clear(); StoreEmpMappingDB semDB = new StoreEmpMappingDB(); List <storeempmapping> SEMs = semDB.getStockEmpMapping(); foreach (storeempmapping sem in SEMs) { grdList.Rows.Add(sem.StoreLocationID, sem.Description, sem.EmployeeID, sem.EmployeeName, ComboFIll.getStatusString(sem.Status)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlDocumentList.Visible = true; }
private void ListOffice() { try { grdList.Rows.Clear(); OfficeDB dbrecord = new OfficeDB(); List <office> Offices = dbrecord.getOffices(); foreach (office off in Offices) { grdList.Rows.Add(off.OfficeID, off.name, off.RegionID + "-" + off.RegionName, off.Address1, off.Address2, off.Address3, off.Address4, ComboFIll.getStatusString(off.status)); } } catch (Exception) { MessageBox.Show("Error in Office listing"); } enableBottomButtons(); pnlOfficeList.Visible = true; }
private void ListBankBranch() { try { grdList.Rows.Clear(); BankBranchDB bankbranchdb = new BankBranchDB(); List <bankbranch> BankBranches = bankbranchdb.getBankBranches(); foreach (bankbranch branch in BankBranches) { grdList.Rows.Add(branch.BankID, branch.BranchName, branch.Address1, branch.Address2, branch.Address3, branch.IFSCCode, branch.SWIFTCode, branch.MICRCode, branch.BSRCode, ComboFIll.getStatusString(branch.status), branch.BranchID); } } catch (Exception) { MessageBox.Show("Error in Office listing"); } enableBottomButtons(); pnlList.Visible = true; }
private void ListEmpFinLimit() { try { grdList.Rows.Clear(); FinancialLimitDB fdb = new FinancialLimitDB(); List <financiallimit> finList = fdb.getEmpFinancialLimit(); foreach (financiallimit flim in finList) { grdList.Rows.Add(flim.DocumentID, flim.DocumentName, flim.EmployeeName + "-" + flim.EmployeeID, flim.FinancialLimit, ComboFIll.getStatusString(flim.DocumentStatus)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlDocumentList.Visible = true; }
private void ListTaxItem() { try { grdList.Rows.Clear(); TaxItemDB taxitemdb = new TaxItemDB(); List <taxitem> TaxItems = taxitemdb.getTaxItems(); foreach (taxitem ti in TaxItems) { grdList.Rows.Add(ti.TaxItemID, ti.Description, ti.AccountCodeIN, ti.AccountCodeOUT, ComboFIll.getStatusString(ti.status)); } } catch (Exception) { MessageBox.Show("Error in Tax Item listing"); } enableBottomButtons(); pnlList.Visible = true; grdList.Visible = true; }
private void ListEmpFinLimit(string sefid) { try { grdList.Rows.Clear(); SEFCheckListDB fdb = new SEFCheckListDB(); List <sefcheck> finList = fdb.getSEFCheckList(sefid); foreach (sefcheck flim in finList) { grdList.Rows.Add(flim.rowid, flim.SEFID, flim.Sequenceno, flim.description, ComboFIll.getStatusString(flim.Status)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlDocumentList.Visible = true; }
////private void Form1_Load(object sender, EventArgs e) ////{ //// try //// { //// ListDocEmpMapping(); //// } //// catch (Exception) //// { //// } ////} private void ListDocEmpMapping() { try { grdList.Rows.Clear(); DocEmpMappingDB dbrecord = new DocEmpMappingDB(); List <docempmapping> DocEmpMappings = dbrecord.getDocEmpMapping(); foreach (docempmapping doc in DocEmpMappings) { grdList.Rows.Add(doc.DocumentID, doc.DocumentName, doc.EmployeeName + "-" + doc.EmployeeID, doc.SeniorEmployeeName + "-" + doc.SeniorEmployeeID, ComboFIll.getStatusString(doc.DocumentStatus)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlDocumentList.Visible = true; }
private void Listdata() { try { grdList.Rows.Clear(); CompanyDataDB dbrecord = new CompanyDataDB(); int index = 0; CatalogueValueDB ACDb = new CatalogueValueDB(); List <cataloguevalue> acList = ACDb.getCatalogueValues(); List <cmpnydata> data = dbrecord.getData(cmbcmpnysrch.SelectedItem.ToString().Trim().Substring(0, cmbcmpnysrch.SelectedItem.ToString().Trim().IndexOf('-')).Trim()); foreach (cataloguevalue cv in acList) { index = 0; if (cv.catalogueID == "CompanyData") { foreach (cmpnydata dat in data) { if (cv.catalogueValueID.Equals(dat.DataID)) { grdList.Rows.Add(dat.DataID, dat.DataValue, ComboFIll.getStatusString(dat.status)); index = 1; } } if (index == 0) { grdList.Rows.Add(cv.catalogueValueID, "", ""); } } } grdList.Visible = true; } catch (Exception ex) { MessageBox.Show("Error in CompanyData listing"); } enableBottomButtons(); pnlRegionList.Visible = true; }
private void btnSave_Click(object sender, EventArgs e) { try { cmpnydata dat = new cmpnydata(); CompanyDataDB dataDB = new CompanyDataDB(); string prevdaval = dat.DataValue; dat.CompanyID = Convert.ToInt32(cmbCmpnyID.SelectedItem.ToString().Trim().Substring(0, cmbCmpnyID.SelectedItem.ToString().Trim().IndexOf('-')).Trim()); dat.DataID = ((Structures.ComboBoxItem)cmbDataID.SelectedItem).HiddenValue; //dat.DataID = cmbDataID.SelectedItem.ToString().Trim().Substring(0, cmbDataID.SelectedItem.ToString().Trim().IndexOf('-')); dat.DataValue = txtDataValue.Text; dat.status = ComboFIll.getStatusCode(cmbStatus.SelectedItem.ToString()); System.Windows.Forms.Button btn = sender as System.Windows.Forms.Button; string btnText = btn.Text; if (dataDB.validateData(dat)) { if (dataDB.insertData(dat)) { MessageBox.Show("CompanyData Added"); closeAllPanels(); enabletop(); Listdata(); } else { MessageBox.Show("Failed to Insert CompanyData"); } } else { MessageBox.Show("CompanyData Validation failed"); } } catch (Exception) { MessageBox.Show("Failed Adding / Editing CompanyData"); } }
private void ListUser() { try { grdList.Rows.Clear(); ERPUserDB dbrecord = new ERPUserDB(); List <user> Users = dbrecord.getUsers(); foreach (user usr in Users) { if (usr.userStatus == 1) { grdList.Rows.Add(usr.userID, usr.userEmpName, ComboFIll.getUserTypeString(usr.userType)); } } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlMenuPrivilegeList.Visible = true; }
////private void Form1_Load(object sender, EventArgs e) ////{ //// ListMenuItems(); ////} private void ListMenuItems() { try { grdList.Rows.Clear(); MenuItemDB dbrecord = new MenuItemDB(); List <menuitem> menuitems = dbrecord.getMenuItems(); foreach (menuitem menu in menuitems) { grdList.Rows.Add(menu.menuItemID, menu.description, menu.shortDescription, dbrecord.getMenuItemTypeString(menu.menuitemType), menu.documentID + "-" + menu.documentName, menu.pageLink, menu.versionrequired, menu.menugrp, ComboFIll.getStatusString(menu.menuitemStatus)); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlMenuList.Visible = true; }