public string[] GetCompletionList(string prefixText, int count, string contextKey) { return(ItemDAL.GetCompletionList(prefixText, count, contextKey)); }
public ItemBNL() { Connector = new ItemDAL(); }
private void ShowItems() { GridView1.DataSource = ItemDAL.GetItemsExcel(); GridView1.DataBind(); }
private void GetItemHistory(string _name) { gvItemHistory.DataSource = ItemDAL.GetItemHistoryByCRPRTDR(_name); gvItemHistory.DataBind(); }
public ItemBl() { itemDAL = new ItemDAL(); }
public ActionResult GetItem(int categoryID) { List <ItemsViewModel> models = ItemDAL.GetDataByCategoryID(categoryID); return(PartialView("_Index", models)); }
public ActionResult Load() { List <ListItemViewModel> models = ItemDAL.GetData(); return(PartialView("_Index", models)); }
public void CreateShelfItems(DisplayWShelfItemDetails obj) { if (obj != null) { var connString = ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString; var itemDal = new ItemDAL(connString); var listItems = obj.DisplayWItemQuantity; WShelfItemDetailsDAL shelfDAl = new WShelfItemDetailsDAL(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString); obj.CreatedUserId = Convert.ToInt32(Session["LoggedUserID"].ToString()); var supplierIdForInhouse = 8; var itemHouse = shelfDAl.GetItemBySupplierIdAndItemCode(obj.SupplierItemCode.Trim(), supplierIdForInhouse); if (string.IsNullOrEmpty(obj.Length)) { obj.Length = "0"; } if (string.IsNullOrEmpty(obj.Weight)) { obj.Weight = "0"; } if (string.IsNullOrEmpty(obj.Height)) { obj.Height = "0"; } if (string.IsNullOrEmpty(obj.Width)) { obj.Width = "0"; } if (itemHouse.ItemID > 0) { var cog = float.Parse(obj.COG); var managerPrice = float.Parse(obj.RepUnitPrice); int qty = 0; if (!string.IsNullOrEmpty(obj.Quantity)) { qty = Convert.ToInt32(obj.Quantity); } double?dsb = null; if (!string.IsNullOrEmpty(obj.DSB)) { dsb = Convert.ToDouble(obj.DSB); } if (!string.IsNullOrEmpty(itemHouse.Quantity)) { qty = qty + Convert.ToInt32(itemHouse.Quantity); } shelfDAl.UpdateItem(itemHouse.ItemID, obj.Description.Trim(), cog, managerPrice, supplierIdForInhouse, obj.SupplierItemCode.Trim(), "Y", "Y", "N", qty, dsb, obj.OEMCode); var itemIdINShelf = shelfDAl.CheckItemIdExistOrNotInShelf(itemHouse.ItemID); obj.ItemId = itemHouse.ItemID; if (itemIdINShelf > 0) { obj.Id = itemIdINShelf; shelfDAl.UpdateWShelfItemDetailsAndWItemQuantity(obj); } else { shelfDAl.CreateWShelfItemDetailsAndWItemQuantity(obj); } } else { int qty = 0; var cog = float.Parse(obj.COG); var managerPrice = float.Parse(obj.RepUnitPrice); if (!string.IsNullOrEmpty(obj.Quantity)) { qty = Convert.ToInt32(obj.Quantity); } double?dsb = null; if (!string.IsNullOrEmpty(obj.DSB)) { dsb = Convert.ToDouble(obj.DSB); } shelfDAl.AddNewItem(supplierIdForInhouse.ToString(), obj.SupplierItemCode.Trim(), obj.Description.Trim(), cog, managerPrice, "Y", "N", qty, dsb, obj.OEMCode); var user = "******"; var itemId = shelfDAl.GetLastInsertedItemId(obj.SupplierItemCode, supplierIdForInhouse, user); //insert item and create itemshelf obj.ItemId = itemId; shelfDAl.CreateWShelfItemDetailsAndWItemQuantity(obj); } } }
public ItemProcessor() { DataErrDAL = new DataErrorDAL(); ItmDAL = new ItemDAL(DataErrDAL); }
public ItemBL() { idal = new ItemDAL(); }