Exemple #1
0
        public static PostWCFReceivingGoodData Make(string poId, string itemCode, string quantity, string supplierName, string remark, string storeStaffID)
        {
            PostWCFReceivingGoodData goods = new PostWCFReceivingGoodData();

            goods.poId         = poId;
            goods.itemCode     = itemCode;
            goods.quantity     = quantity;
            goods.supplierName = supplierName;
            goods.remark       = remark;
            goods.storeStaffID = storeStaffID;

            return(goods);
        }
Exemple #2
0
        public void SavingGoodsReceivedWCF(PostWCFReceivingGoodData[] goodwcflist)
        {
            PostWCFReceivingGoodData good = goodwcflist[1];
            GoodsReceivedRecord      grr  = new GoodsReceivedRecord();

            grr.POID         = Convert.ToInt32(good.PoId);
            grr.StoreStaffID = Convert.ToInt32(good.StoreStaffID);
            grr.ReceivedDate = DateTime.Now;

            List <GoodsReceivedRecordDetail> grrdlist = new List <GoodsReceivedRecordDetail>();

            foreach (PostWCFReceivingGoodData wcfgood in goodwcflist)
            {
                GoodsReceivedRecordDetail gooddetail = new GoodsReceivedRecordDetail();
                gooddetail.ItemCode         = wcfgood.ItemCode;
                gooddetail.ReceivedQuantity = Convert.ToInt32(wcfgood.Quantity);
                good.Remark = wcfgood.Remark;
                grrdlist.Add(gooddetail);
            }

            Data.SavingGoodsReceived((int)grr.POID, grr, grrdlist);
        }