예제 #1
0
        public IList <Orderdetail_South> Create_OrderDetail_Return(string po_mm, string orderkey_infor)
        {
            IList <Orderdetail_South> orderDetails = new List <Orderdetail_South>();
            string    sql = string.Format("select * from V_MM_SO_RETURN_DETAIL_SOUTH where Order_Number = '{0}'", po_mm);
            DataTable dt  = DAL.SELECT_SQL(sql);

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

            for (int i = 0; i < count; i++)
            {
                try
                {
                    Orderdetail_South orderDetail = new Orderdetail_South();
                    orderDetail.orderkey  = orderkey_infor;
                    orderDetail.storerkey = "OW9600";
                    string sku = dt.Rows[i]["Article_Number"].ToString().Trim().TrimStart('0');
                    orderDetail.sku                   = sku;
                    orderDetail.uom                   = "MU";
                    orderDetail.openqty               = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                    orderDetail.originalqty           = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                    orderDetail.susr2                 = dt.Rows[i]["SUPPLIER"].ToString().Trim();
                    orderDetail.lottable10            = po_mm.TrimStart('0');
                    orderDetail.newallocationstrategy = "RTV";
                    orderDetail.whseid                = "wmwhse10";
                    orderDetail.addwho                = "wmsadmin";
                    orderDetail.editwho               = "wmsadmin";

                    orderDetails.Add(orderDetail);
                }
                catch (Exception e)
                {
                    string step = string.Format(Constant.MODEL_SODETAIL, "RETURN_SOUTH");
                    resultMapping.Handle_Error_Mapping(code, e.ToString(), step);
                    continue;
                }
            }
            return(orderDetails);
        }
예제 #2
0
        public IList <Orderdetail_South> Create_OrderDetail(string orderkey_mm, string orderkey_infor)
        {
            IList <Orderdetail_South> orderDetails = new List <Orderdetail_South>();
            string    sql = string.Format("select * from MM_ORDERS_DETAIL where Order_Number = '{0}' and STATUS='' and Warehouse_Number='90071' ", orderkey_mm);
            DataTable dt  = DAL.SELECT_SQL(sql);

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

            for (int i = 0; i < count; i++)
            {
                try
                {
                    Orderdetail_South orderDetail = new Orderdetail_South();
                    string            sku         = dt.Rows[i]["Article_Number"].ToString().Trim().TrimStart('0');

                    orderDetail.orderkey              = orderkey_infor;
                    orderDetail.storerkey             = "OW9600";
                    orderDetail.sku                   = sku;
                    orderDetail.uom                   = "MU";
                    orderDetail.openqty               = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                    orderDetail.originalqty           = DAL.IntReturn(dt.Rows[i]["Order_Quantity"]);
                    orderDetail.newallocationstrategy = "INPROCESS";
                    orderDetail.susr2                 = dt.Rows[i]["Article_Selling_Price"].ToString().Trim();
                    orderDetail.whseid                = "wmwhse10";
                    orderDetail.addwho                = "wmsadmin";
                    orderDetail.editwho               = "wmsadmin";

                    orderDetails.Add(orderDetail);
                }
                catch (Exception e)
                {
                    string step = string.Format(Constant.MODEL_SODETAIL, "CS_SOUTH");
                    resultMapping.Handle_Error_Mapping(code, e.ToString(), step);
                    continue;
                }
            }
            return(orderDetails);
        }