Esempio n. 1
0
        //
        // POST: /StockInBill/DownInBillMaster/
        public ActionResult DownInBillMaster(string beginDate, string endDate, string wareCode, string billType, bool isInDown)
        {
            bool bResult = false;
            DownUnitBll ubll = new DownUnitBll();
            DownProductBll pbll = new DownProductBll();
            DownInBillBll ibll = new DownInBillBll();
            DownDecidePlanBll planBll = new DownDecidePlanBll();
            string errorInfo = string.Empty;
            try
            {
                beginDate = Convert.ToDateTime(beginDate).ToString("yyyyMMdd");
                endDate = Convert.ToDateTime(endDate).ToString("yyyyMMdd");
                if (!SystemParameterService.SetSystemParameter())
                {
                    ubll.DownUnitCodeInfo();
                    pbll.DownProductInfo();
                    if (isInDown)
                        bResult = ibll.GetInBill(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo);
                    else
                        bResult = planBll.GetInBillMiddle(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo);
                }
                else
                {
                    ubll.DownUnitInfo();
                    pbll.DownProductInfos();
                    if (isInDown)
                        bResult = ibll.GetInBills(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo);
                    else
                        bResult = planBll.GetInBillMiddle(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo);
                }
            }
            catch (Exception e)
            {
                errorInfo += e.Message;
            }

            string msg = bResult ? "下载成功" : "下载失败";
            return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet);
        }
Esempio n. 2
0
        //主单结单
        // POST: /StockOutBill/DownOutBillMaster/
        public ActionResult DownOutBillMaster(string beginDate, string endDate, string wareCode, string billType)
        {
            string errorInfo = string.Empty;
            beginDate = Convert.ToDateTime(beginDate).ToString("yyyyMMdd");
            endDate = Convert.ToDateTime(endDate).ToString("yyyyMMdd");
            bool bResult = false;
            DownUnitBll ubll = new DownUnitBll();
            DownProductBll pbll = new DownProductBll();
            DownOutBillBll ibll = new DownOutBillBll();
            DownCustomerBll custBll = new DownCustomerBll();
            try
            {
                if (!SystemParameterService.SetSystemParameter())
                {
                    ubll.DownUnitCodeInfo();
                    pbll.DownProductInfo();
                    custBll.DownCustomerInfo();
                }
                else
                {
                    ubll.DownUnitInfo();//创联
                    pbll.DownProductInfos();//创联
                    custBll.DownCustomerInfos();//创联
                }
                bResult = ibll.GetOutBills(beginDate, endDate, this.User.Identity.Name.ToString(), out errorInfo, wareCode, billType);

            }
            catch (Exception e)
            {
                errorInfo += e.Message;
            }

            string msg = bResult ? "下载成功" : "下载失败";
            return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet);
        }