public static void loadStocks(MSComboBox comboBox, String type) { try { if (stockLocationDataTable == null) { stockLocationDataTable = new DataTable(); stockLocationDataTable.Columns.Add("ID", typeof(int)); stockLocationDataTable.Columns.Add("name", typeof(String)); } else { stockLocationDataTable.Rows.Clear(); } List <StockLocation> list = stockManagerImpl.getActivedStockLocations(); foreach (StockLocation stockLocation in list) { stockLocationDataTable.Rows.Add(stockLocation.Id, stockLocation.Name); } comboBox.OptionGroup = stockLocationDataTable; comboBox.SelectedIndex = 0; if (type == "b") { comboBox.SelectedValue = Convert.ToInt32(Session.Preference["defaultBuyingStock"]); } else if (type == "s") { comboBox.SelectedValue = Convert.ToInt32(Session.Preference["defaultSellingStock"]); } else { comboBox.SelectedIndex = 0; } } catch (Exception) { } }
public BankManagerControler(AddBank addBank, MSComboBox mSComboBox) { // TODO: Complete member initialization this.addBank = addBank; this.mSComboBox = mSComboBox; bankManagerImpl = new BankManagerImpl(addBank); }
internal static void itemsForCategoryAndCompany(MSComboBox comboBox_item_selectItem, int categoryId, int companyId) { try { DataTable data = new DataTable(); data.Columns.Add("ID", typeof(int)); data.Columns.Add("name", typeof(String)); data.Rows.Add(0, "- Select -"); if (categoryId > 0 || companyId > 0) { if (categoryId < 1) { categoryId = -1; } if (companyId < 1) { companyId = -1; } List <Item> list = itemManagerImpl.getItemsForCategoryAndCompany(categoryId, companyId); foreach (Item item in list) { data.Rows.Add(item.Id, item.Name); } } comboBox_item_selectItem.OptionGroup = data; comboBox_item_selectItem.SelectedIndex = 0; } catch (Exception) { } }
public static void sellingPriceForItemAndMode(MSComboBox comboBox, int itemId, String mode, AddSellingPrice addSellingPrice) { try { DataTable dataTable = new DataTable(); dataTable.Columns.Add("ID", typeof(int)); dataTable.Columns.Add("price", typeof(String)); List <SellingPrice> list = sellingPriceManagerImpl.getSellingPriceByItemAndMode(itemId, mode); foreach (SellingPrice sellingPrice in list) { dataTable.Rows.Add(sellingPrice.Id, sellingPrice.Price.ToString("#,##0.00")); } if (Session.Permission["canAddSellingPrice"] == 1) { comboBox.AddLinkWindow = addSellingPrice; addSellingPrice.Mode = mode; addSellingPrice.ItemId = itemId; addSellingPrice.ComboBox = comboBox; } else { comboBox.AddLinkWindow = null; } int index = dataTable.Rows.Count - 1; comboBox.OptionGroup = dataTable; if (index > -1) { comboBox.SelectedIndex = index; } } catch (Exception) { } }
public CustomerManagerControler(AddCustomer addCustomer, MSComboBox mSComboBox) { // TODO: Complete member initialization this.addCustomer = addCustomer; this.mSComboBox = mSComboBox; customerManagerImpl = new CustomerManagerImpl(addCustomer); }
public CompanyManagerControler(AddCompany addCompany, MSComboBox mSComboBox) { // TODO: Complete member initialization this.addCompany = addCompany; this.mSComboBox = mSComboBox; companyManagerImpl = new CompanyManagerImpl(addCompany); }
public static void vendorsForAddBuyingInvoice(MSComboBox comboBox) { try { if (vendorDataTable == null) { vendorDataTable = new DataTable(); vendorDataTable.Columns.Add("ID", typeof(int)); vendorDataTable.Columns.Add("name", typeof(String)); } else { vendorDataTable.Rows.Clear(); } List <Vendor> list = vendorManagerImpl.getAllActivedVendors(); foreach (Vendor vendor in list) { vendorDataTable.Rows.Add(vendor.Id, vendor.Name); } if (Session.Permission["canAddVendor"] == 1 && comboBox.AddLinkWindow == null) { if (addVendor == null) { addVendor = new AddVendor(comboBox); } comboBox.AddLinkWindow = addVendor; } comboBox.IsPermissionDenied = Session.Permission["canAddVendor"] == 0 ? true : false; comboBox.OptionGroup = vendorDataTable; } catch (Exception) { } }
public void customersForAddSellingInvoice(MSComboBox comboBox) { try { if (this.customerDataTable == null) { this.customerDataTable = new DataTable(); this.customerDataTable.Columns.Add("ID", typeof(int)); this.customerDataTable.Columns.Add("name", typeof(String)); } else { this.customerDataTable.Rows.Clear(); } List <Customer> list = customerManagerImpl.getAllActivedCustomers(); foreach (Customer customer in list) { customerDataTable.Rows.Add(customer.Id, customer.Name); } if (Session.Permission["canAddCustomer"] == 1 && comboBox.AddLinkWindow == null) { if (addCustomer == null) { addCustomer = new AddCustomer(comboBox); } comboBox.AddLinkWindow = addCustomer; } comboBox.IsPermissionDenied = Session.Permission["canAddCustomer"] == 0 ? true : false; comboBox.OptionGroup = customerDataTable; comboBox.SelectedValue = 1; } catch (Exception) { } }
public static void unitsForAddItem(MSComboBox comboBox) { try { if (unitDataTable == null) { unitDataTable = new DataTable(); unitDataTable.Columns.Add("ID", typeof(int)); unitDataTable.Columns.Add("name", typeof(String)); } else { unitDataTable.Rows.Clear(); } List <Unit> list = unitManagerImpl.get(new Unit()); foreach (Unit unit in list) { unitDataTable.Rows.Add(unit.Id, unit.Name); } if (Session.Permission["canAddUnit"] == 1 && comboBox.AddLinkWindow == null) { if (addUnit == null) { addUnit = new AddUnit(comboBox); } comboBox.AddLinkWindow = addUnit; } comboBox.IsPermissionDenied = Session.Permission["canAddUnit"] == 0 ? true : false; comboBox.OptionGroup = unitDataTable; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void unitsForFilter(MSComboBox comboBox) { try { if (unitDataTableFilter == null) { unitDataTableFilter = new DataTable(); unitDataTableFilter.Columns.Add("ID", typeof(int)); unitDataTableFilter.Columns.Add("name", typeof(String)); } else { unitDataTableFilter.Rows.Clear(); } List <Unit> list = unitManagerImpl.get(new Unit()); unitDataTableFilter.Rows.Add(-1, "All"); foreach (Unit unit in list) { unitDataTableFilter.Rows.Add(unit.Id, unit.Name); } comboBox.IsPermissionDenied = Session.Permission["canAddUnit"] == 0 ? true : false; comboBox.OptionGroup = unitDataTableFilter; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void banksForSelect(MSComboBox comboBox) { try { if (bankDataTable == null) { bankDataTable = new DataTable(); bankDataTable.Columns.Add("ID", typeof(int)); bankDataTable.Columns.Add("name", typeof(String)); } else { bankDataTable.Rows.Clear(); } List <Bank> list = bankManagerImpl.getAllBanks(); foreach (Bank bank in list) { bankDataTable.Rows.Add(bank.Id, bank.Name); } if (Session.Permission["canAddBank"] == 1 && comboBox.AddLinkWindow == null) { if (addBank == null) { addBank = new AddBank(comboBox); } comboBox.AddLinkWindow = addBank; } comboBox.IsPermissionDenied = Session.Permission["canAddBank"] == 0 ? true : false; comboBox.OptionGroup = bankDataTable; } catch (Exception) { } }
public static void vendorsForFilter(MSComboBox comboBox) { try { if (vendorDataTableFilter == null) { vendorDataTableFilter = new DataTable(); vendorDataTableFilter.Columns.Add("ID", typeof(int)); vendorDataTableFilter.Columns.Add("name", typeof(String)); } else { vendorDataTableFilter.Rows.Clear(); } List <Vendor> list = vendorManagerImpl.getAllActivedVendors(); vendorDataTableFilter.Rows.Add(-1, "All"); foreach (Vendor vendor in list) { vendorDataTableFilter.Rows.Add(vendor.Id, vendor.Name); } comboBox.IsPermissionDenied = Session.Permission["canAddVendor"] == 0 ? true : false; comboBox.OptionGroup = vendorDataTableFilter; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void usersForFilter(MSComboBox comboBox) { try { if (userDataTable == null) { userDataTable = new DataTable(); userDataTable.Columns.Add("ID", typeof(int)); userDataTable.Columns.Add("name", typeof(String)); } else { userDataTable.Rows.Clear(); } List <User> list = userManagerImpl.getAllUsers(); userDataTable.Rows.Add(-1, "All"); foreach (User user in list) { /*if(user.IsFake == 0) { * userDataTable.Rows.Add(user.Id, user.FirstName + " " + user.LastName); * }*/ userDataTable.Rows.Add(user.Id, user.FirstName + " " + user.LastName); } comboBox.OptionGroup = userDataTable; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void yesNoForAdd(MSComboBox comboBox) { try { if (yesNoForAddDataTable == null) { yesNoForAddDataTable = new DataTable(); yesNoForAddDataTable.Columns.Add("ID", typeof(int)); yesNoForAddDataTable.Columns.Add("name", typeof(String)); yesNoForAddDataTable.Rows.Add(1, "Yes"); yesNoForAddDataTable.Rows.Add(0, "No"); } comboBox.OptionGroup = yesNoForAddDataTable; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void reason(MSComboBox comboBox) { try { if (reasonDataTable == null) { reasonDataTable = new DataTable(); reasonDataTable.Columns.Add("ID", typeof(int)); reasonDataTable.Columns.Add("name", typeof(String)); reasonDataTable.Rows.Add(1, "Normal"); reasonDataTable.Rows.Add(2, "CR"); reasonDataTable.Rows.Add(3, "GR"); reasonDataTable.Rows.Add(4, "WR"); } comboBox.OptionGroup = reasonDataTable; } catch (Exception) { } }
public static void sellingInvoiceStatusForSelect(MSComboBox comboBox) { try { if (sellingInvoiceStatusDataTable == null) { sellingInvoiceStatusDataTable = new DataTable(); sellingInvoiceStatusDataTable.Columns.Add("ID", typeof(int)); sellingInvoiceStatusDataTable.Columns.Add("name", typeof(String)); sellingInvoiceStatusDataTable.Rows.Add(-1, "All"); sellingInvoiceStatusDataTable.Rows.Add(1, "Sold"); sellingInvoiceStatusDataTable.Rows.Add(3, "Draft"); } comboBox.OptionGroup = sellingInvoiceStatusDataTable; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void chequeStatus(MSComboBox comboBox) { try { if (chequeStatusDataTable == null) { chequeStatusDataTable = new DataTable(); chequeStatusDataTable.Columns.Add("ID", typeof(int)); chequeStatusDataTable.Columns.Add("name", typeof(String)); chequeStatusDataTable.Rows.Add(-1, "All"); chequeStatusDataTable.Rows.Add(0, "On Hand"); chequeStatusDataTable.Rows.Add(1, "Banked"); chequeStatusDataTable.Rows.Add(2, "Changed"); chequeStatusDataTable.Rows.Add(3, "Returned"); } comboBox.OptionGroup = chequeStatusDataTable; } catch (Exception) { } }
public static void banksForFilter(MSComboBox comboBox) { try { if (bankDataTableFilter == null) { bankDataTableFilter = new DataTable(); bankDataTableFilter.Columns.Add("ID", typeof(int)); bankDataTableFilter.Columns.Add("name", typeof(String)); } else { bankDataTableFilter.Rows.Clear(); } bankDataTableFilter.Rows.Add(-1, "All"); List <Bank> list = bankManagerImpl.getAllBanks(); foreach (Bank bank in list) { bankDataTableFilter.Rows.Add(bank.Id, bank.Name); } comboBox.OptionGroup = bankDataTableFilter; } catch (Exception) { } }
public static void loadStocksForFilter(MSComboBox comboBox) { try { if (stockLocationDataTableFilter == null) { stockLocationDataTableFilter = new DataTable(); stockLocationDataTableFilter.Columns.Add("ID", typeof(int)); stockLocationDataTableFilter.Columns.Add("name", typeof(String)); } else { stockLocationDataTableFilter.Rows.Clear(); } List <StockLocation> list = stockManagerImpl.getActivedStockLocations(); stockLocationDataTableFilter.Rows.Add(-1, "All"); foreach (StockLocation stockLocation in list) { stockLocationDataTableFilter.Rows.Add(stockLocation.Id, stockLocation.Name); } comboBox.OptionGroup = stockLocationDataTableFilter; comboBox.SelectedIndex = 0; } catch (Exception) { } }
public static void companiesForSelect(MSComboBox comboBox) { try { if (companyDataTable == null) { companyDataTable = new DataTable(); companyDataTable.Columns.Add("ID", typeof(int)); companyDataTable.Columns.Add("name", typeof(String)); } else { companyDataTable.Rows.Clear(); } companyDataTable.Rows.Add(0, "- Select -"); List <Company> coms = companyManagerImpl.getAllCompanies(); foreach (Company company in coms) { companyDataTable.Rows.Add(company.Id, company.Name); } comboBox.OptionGroup = companyDataTable; comboBox.SelectedIndex = 0; } catch (Exception) { } }
internal static void companiesForCategory(MSComboBox comboBox_company_selectItem, int categoryId) { try { if (categoryId == 0) { companiesForSelect(comboBox_company_selectItem); } else { List <int> companyIds = itemManagerImpl.getCompanyIdsForCategory(categoryId); DataTable data = new DataTable(); data.Columns.Add("ID", typeof(int)); data.Columns.Add("name", typeof(String)); data.Rows.Add(0, "- Select -"); foreach (int id in companyIds) { data.Rows.Add(id, companyManagerImpl.getCompanyNameById(id)); } comboBox_company_selectItem.OptionGroup = data; comboBox_company_selectItem.SelectedIndex = 0; } } catch (Exception) { } }
public UnitManagerControler(AddUnit addUnit, MSComboBox mSComboBox) { this.addUnit = addUnit; this.mSComboBox = mSComboBox; unitManagerImpl = new UnitManagerImpl(addUnit); }
public CategoryManagerControler(AddCategory addCategory, MSComboBox mSComboBox) { this.addCategory = addCategory; this.mSComboBox = mSComboBox; categoryManagerImpl = new CategoryManagerImpl(addCategory); }
public AddCompany(MSComboBox comboBox) { InitializeComponent(); this.mSComboBox = comboBox; companyManagerControler = new CompanyManagerControler(this, mSComboBox); }
public AddUnit(MSComboBox comboBox) { InitializeComponent(); this.mSComboBox = comboBox; unitManagerControler = new UnitManagerControler(this, mSComboBox); }
public VendorManagerControler(AddVendor addVendor, MSComboBox mSComboBox) { this.addVendor = addVendor; this.mSComboBox = mSComboBox; vendorManagerImpl = new VendorManagerImpl(addVendor); }
public AddBank(MSComboBox mSComboBox) { InitializeComponent(); this.mSComboBox = mSComboBox; bankManagerControler = new BankManagerControler(this, mSComboBox); }
public AddCustomer(MSComboBox comboBox) { InitializeComponent(); this.mSComboBox = comboBox; customerManagerControler = new CustomerManagerControler(this, mSComboBox); }
public AddVendor(MSComboBox mSComboBox) { InitializeComponent(); this.mSComboBox = mSComboBox; vendorManagerControler = new VendorManagerControler(this, mSComboBox); }