public SellingPriceManagerImpl(AddSellingPrice addSellingPrice) { this.addSellingPrice = addSellingPrice; dao = SellingPriceDao.getInstance(); }
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 SellingPriceManagerControler(AddSellingPrice addSellingPrice) { this.addSellingPrice = addSellingPrice; sellingPriceManagerImpl = new SellingPriceManagerImpl(addSellingPrice); }