Beispiel #1
0
        public FileStreamResult CreateExcelToClient()
        {
            int    page = 0, rows = 0;
            string billNo = Request.QueryString["billNo"];

            System.Data.DataTable dt1 = OutBillDetailService.GetOutBillDetail(page, rows, billNo);
            System.Data.DataTable dt2 = OutBillAllotService.AllotSearch(page, rows, billNo);
            string headText1 = "出库单据分配";
            string headText2 = "出库单据分配明细";
            string headFont = "微软雅黑"; Int16 headSize = 20;
            string colHeadFont = "Arial"; Int16 colHeadSize = 10;

            string[] HeaderFooder =
            {
                "……"                           //眉左
                , "……"                         //眉中
                , "……"                         //眉右
                , "&D"                         //脚左 日期
                , "……"                         //脚中
                , "&P"                         //脚右 页码
            };
            System.IO.MemoryStream ms = THOK.Common.ExportExcel.ExportDT(dt1, dt2, headText1, headText2, headFont, headSize
                                                                         , 0, true, colHeadFont, colHeadSize, 0, true, 0, HeaderFooder, null, 0);
            return(new FileStreamResult(ms, "application/ms-excel"));
        }
Beispiel #2
0
        public ActionResult AllotCancel(string billNo)
        {
            string strResult = string.Empty;
            bool   bResult   = OutBillAllotService.AllotCancel(billNo, out strResult);
            string msg       = bResult ? "取消分配成功" : "取消分配失败";

            return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
        public ActionResult AllotAdd(string billNo, long id, string productCode, string cellCode, int allotQuantity)
        {
            string strResult = string.Empty;
            bool   bResult   = OutBillAllotService.AllotAdd(billNo, id, productCode, cellCode, allotQuantity, out strResult);
            string msg       = bResult ? "添加分配成功" : "添加分配失败";

            return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet));
        }
Beispiel #4
0
        public ActionResult AllotConfirm(string billNo)
        {
            string strResult = string.Empty;
            bool   bResult   = OutBillAllotService.AllotConfirm(billNo, this.User.Identity.Name.ToString(), ref strResult);
            string msg       = bResult ? "确认分配成功" : "确认分配失败";

            return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet));
        }
Beispiel #5
0
        public ActionResult AllotDelete(string billNo, long id)
        {
            string strResult = string.Empty;
            bool   bResult   = OutBillAllotService.AllotDelete(billNo, id, out strResult);
            string msg       = bResult ? "删除分配明细成功" : "删除分配明细失败";

            return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet));
        }
Beispiel #6
0
        public ActionResult AllotAdds(string billNo, long id, string cellCode, string productName)
        {
            string  strResult     = string.Empty;
            decimal allotQuantity = 0;
            bool    bResult       = OutBillAllotService.AllotAdd(billNo, id, cellCode, productName, out strResult, out allotQuantity);
            string  msg           = bResult ? "" : "添加分配失败";

            return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult, allotQuantity), "text", JsonRequestBehavior.AllowGet));
        }
Beispiel #7
0
        public FileStreamResult CreateExcelToClient()
        {
            int    page = 0, rows = 0;
            string billNo = Request.QueryString["billNo"];

            ExportParam ep = new ExportParam();

            ep.DT1        = OutBillDetailService.GetOutBillDetail(page, rows, billNo);
            ep.DT2        = OutBillAllotService.AllotSearch(page, rows, billNo);
            ep.HeadTitle1 = "出库单据分配";
            ep.HeadTitle2 = "出库单据分配明细";
            return(PrintService.Print(ep));
        }
Beispiel #8
0
        public ActionResult Search(string billNo, int page, int rows)
        {
            var result = OutBillAllotService.Search(billNo, page, rows);

            return(Json(result, "text", JsonRequestBehavior.AllowGet));
        }