Beispiel #1
0
 public string[] GetCompletionList(string prefixText, int count, string contextKey)
 {
     return(ItemDAL.GetCompletionList(prefixText, count, contextKey));
 }
Beispiel #2
0
 public ItemBNL()
 {
     Connector = new ItemDAL();
 }
Beispiel #3
0
 private void ShowItems()
 {
     GridView1.DataSource = ItemDAL.GetItemsExcel();
     GridView1.DataBind();
 }
Beispiel #4
0
 private void GetItemHistory(string _name)
 {
     gvItemHistory.DataSource = ItemDAL.GetItemHistoryByCRPRTDR(_name);
     gvItemHistory.DataBind();
 }
Beispiel #5
0
 public ItemBl()
 {
     itemDAL = new ItemDAL();
 }
Beispiel #6
0
        public ActionResult GetItem(int categoryID)
        {
            List <ItemsViewModel> models = ItemDAL.GetDataByCategoryID(categoryID);

            return(PartialView("_Index", models));
        }
Beispiel #7
0
        public ActionResult Load()
        {
            List <ListItemViewModel> models = ItemDAL.GetData();

            return(PartialView("_Index", models));
        }
Beispiel #8
0
        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);
 }
Beispiel #10
0
 public ItemBL()
 {
     idal = new ItemDAL();
 }