Ejemplo n.º 1
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        public ActionResult Save()
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            acpt = new DcAcceptV3(Login_Info.User_ID, Login_Info.User_Name,
                                  Login_Info.Token);
            string OrderNO          = Request.Form["OrderNO"];
            string TrayNO           = Request.Form["TrayNO"];
            string Barcode          = Request.Form["Barcode"];
            string ProductDate      = Request.Form["ProductDate"];
            string shelfLife        = Request.Form["shelfLife"];
            string EffectiveDate    = Request.Form["EffectiveDate"];
            string StockBatchNO     = Request.Form["StockBatchNO"];
            string Qty              = Request.Form["Qty"];
            string BatchBuildTypeID = Request.Form["BatchBuildTypeID"];
            string IsAuto           = Request.Form["IsAuto"];

            try
            {
                acpt.SetParameter("OrderNO", OrderNO);
                acpt.SetParameter("Barcode", Barcode);
                acpt.SetParameter("TrayNO", TrayNO);
                acpt.SetParameter("ProductDate", ProductDate);
                acpt.SetParameter("shelfLife", shelfLife);
                acpt.SetParameter("EffectiveDate", EffectiveDate);
                acpt.SetParameter("Qty", Qty);
                acpt.SetParameter("OnlyAllowBoxAcpt", Request.Form["OnlyAllowBoxAcpt"]);
                acpt.SetParameter("StockBatchNO", StockBatchNO);
                acpt.SetParameter("BatchBuildTypeID", BatchBuildTypeID);
                acpt.SetParameter("IsAuto", IsAuto);
                acpt.ExecuteBusinessProcess("RF_DcAcptModify3");
                // acpt.Accept();
                //*************20140724**********************
                //acpt.paras.Clear();
                //acpt.SetParameter("Barcode", Barcode.Trim());
                //acpt.SetParameter("OrderNO", OrderNO);
                //DataTable dt = acpt.QueryDcacptQty();
                //if (dt != null && dt.Rows.Count > 0)
                //{
                //return Content(JsonHelper.ToJson(dt));
                //}
                //*******************************************
                if (acpt.paras["Complete"].Value.ToString() != "true")
                {
                    return(Content("0"));
                }
                else
                {
                    return(Content(""));
                }
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 2
0
        public ActionResult Over()
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            acpt = new DcAcceptV3(Login_Info.User_ID, Login_Info.User_Name,
                                  Login_Info.Token);
            string OrderNO       = Request.Form["OrderNO"];
            string TrayNO        = Request.Form["TrayNO"];
            string Barcode       = Request.Form["Barcode"];
            string ProductDate   = Request.Form["ProductDate"];
            string shelfLife     = Request.Form["shelfLife"];
            string EffectiveDate = Request.Form["EffectiveDate"];
            string Qty           = Request.Form["Qty"];

            try
            {
                acpt.SetParameter("OrderNO", OrderNO);
                acpt.SetParameter("Barcode", Barcode);
                acpt.SetParameter("TrayNO", TrayNO);
                acpt.SetParameter("ProductDate", ProductDate);
                acpt.SetParameter("shelfLife", shelfLife);
                acpt.SetParameter("EffectiveDate", EffectiveDate);
                acpt.SetParameter("Qty", Qty);
                acpt.ExecuteBusinessProcess("RF_DcGetAcptNO3");
                // acpt.Over();
                return(Content(""));
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }