Ejemplo n.º 1
0
        protected override object GetEditObject(GridRecord row)
        {
            if (facade == null)
            {
                facade = new WarehouseFacade(base.DataProvider);
            }

            object obj = facade.GetAsndetail(int.Parse(row.Items.FindItemByKey("stline").Value.ToString()), row.Items.FindItemByKey("ASN").Value.ToString());

            if (obj != null)
            {
                return((Asndetail)obj);
            }

            return(null);
        }
Ejemplo n.º 2
0
        public string OnShelves(DataTable dt, string cartonNO, string locationNo, string UserCode)
        {
            ShareLib.ShareKit kit     = new ShareLib.ShareKit();
            string            message = string.Empty;



            if (dt.Rows.Count <= 0)
            {
                return("无上架的数据!");
            }

            List <Asndetail> asnDetailList = new List <Asndetail>();//add by sam



            WarehouseFacade facade = new WarehouseFacade(DataProvider);

            foreach (DataRow row in dt.Rows)
            {
                object obj = facade.GetAsndetail(int.Parse(row["STLINE"].ToString()), row["STNO"].ToString());
                if (obj == null)
                {
                    throw new Exception("行中获取的ASN明细为空!");
                }

                Asndetail asndetail = obj as Asndetail;
                asndetail.LocationCode1 = locationNo;
                asnDetailList.Add(asndetail);
            }

            bool result = kit.OnShelf(cartonNO.ToUpper(), locationNo.ToUpper(), asnDetailList, DataProvider, out message, UserCode);

            if (result)
            {
                message = "上架成功!";
            }
            return(message);
        }