Пример #1
0
        public IList <Podetail> Create_PoDetail(string pokey_mm, string pokey_infor)
        {
            IList <Podetail> poDetails = new List <Podetail>();
            string           sql       = string.Format("MM_GET_INFORMATION_PODETAIL '{0}'", pokey_mm);
            DataTable        dt        = DAL.SELECT_SQL(sql);

            int count = DAL.IntReturn(dt.Rows.Count);

            for (int i = 0; i < count; i++)
            {
                try
                {
                    Podetail poDetail = new Podetail();
                    poDetail.pokey     = pokey_infor;
                    poDetail.storerkey = "OW9600";
                    string sku = dt.Rows[i]["Article_Number"].ToString().Trim().TrimStart('0');
                    poDetail.sku        = sku;
                    poDetail.qtyordered = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                    poDetail.susr1      = dt.Rows[i]["Order_Quantity"].ToString();
                    poDetail.whseid     = "wmwhse10";
                    poDetail.addwho     = "wmsadmin";
                    poDetail.editwho    = "wmsadmin";

                    poDetails.Add(poDetail);
                }
                catch (Exception e)
                {
                    string step = string.Format(Constant.MODEL_PODETAIL, "SOUTH");
                    resultMapping.Handle_Error_Mapping(code, e.ToString(), step);
                    continue;
                }
            }
            return(poDetails);
        }
Пример #2
0
        public IList <Podetail> Create_PoDetail(string pokey_mm, string pokey_infor)
        {
            IList <Podetail> poDetails = new List <Podetail>();
            string           sql       = string.Format("select * from MM_PO_DETAIL where Order_Number = '{0}' and STATUS='' and Warehouse_Number='90072'  order by Article_Number asc", pokey_mm);
            DataTable        dt        = DAL.SELECT_SQL(sql);

            int count = DAL.IntReturn(dt.Rows.Count);

            for (int i = 0; i < count; i++)
            {
                try
                {
                    Podetail poDetail = new Podetail();
                    poDetail.pokey     = pokey_infor;
                    poDetail.storerkey = "N0528";
                    string sku = dt.Rows[i]["Article_Number"].ToString().Trim().TrimStart('0');
                    poDetail.sku        = sku;
                    poDetail.qtyordered = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                    poDetail.whseid     = "wmwhse3";
                    poDetail.addwho     = "wmsadmin";
                    poDetail.editwho    = "wmsadmin";

                    poDetails.Add(poDetail);
                }
                catch (Exception e)
                {
                    string step = string.Format(Constant.MODEL_PODETAIL, "NORTH");
                    resultMapping.Handle_Error_Mapping(code, e.ToString(), step);
                    continue;
                }
            }
            return(poDetails);
        }
Пример #3
0
        public IList <Podetail> Create_PoDetail_South(string pokey_MM, string pokey_Infor)
        {
            IList <Podetail> poDetails = new List <Podetail>();
            string           sql       = string.Format("select * from MM_PO_DETAIL where Order_Number = '{0}' and STATUS=''", pokey_MM);
            DataTable        dt        = DAL.SELECT_SQL(sql);

            int count = DAL.IntReturn(dt.Rows.Count);

            for (int i = 0; i < count; i++)
            {
                Podetail poDetail = new Podetail();
                poDetail.pokey      = pokey_Infor;
                poDetail.storerkey  = "ow9305";
                poDetail.sku        = dt.Rows[i]["Article_Number"].ToString();
                poDetail.qtyordered = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                poDetail.whseid     = "wmwhse7";
                poDetail.addwho     = "wmsadmin";
                poDetail.editwho    = "wmsadmin";

                poDetails.Add(poDetail);
            }
            return(poDetails);
        }