コード例 #1
0
        /// <summary>
        /// 导出渠道订单
        /// </summary>
        /// <returns></returns>
        public FileResult ExportExcel(string qdbh = "", string ddstart = "", string ddend = "", string yystart = "", string yyend = "", string xm = "", string dh = "", string tczt = "")
        // public FileResult ExportExcel(string ddbh )
        {
            Hashtable ht = new Hashtable();

            ht.Add("yybh", GLYadmin.YYID);
            ht.Add("ddly", "0");
            ht.Add("dsfbz", qdbh);
            ht.Add("ddstart", ddstart);
            ht.Add("ddend", ddend);
            ht.Add("yystart", yystart);
            ht.Add("yyend", yyend);
            ht.Add("dh", dh);
            ht.Add("xm", xm);
            ht.Add("tczt", tczt);

            //string ddbhs = "'" + ddbh.TrimEnd(',').Replace(",", "','") + "'";
            DataTable dtExport = new Service.DdyymxbService().ExportOrderYyQdList(ht);

            if (dtExport.Rows.Count > 0)
            {
                dtExport.TableName = "报表数据";
                MemoryStream ms = Common.ExcelTool.RenderToExcel(dtExport);
                ms.Seek(0, SeekOrigin.Begin);
                return(File(ms, "application/vnd.ms-excel", DateTime.Now.ToString("yyyy-MM-dd") + "渠道订单.xls"));
            }
            else
            {
                //context.Response.Write("数据为空不能导出");
                return(null);
            }
        }
コード例 #2
0
        /// <summary>
        /// 渠道订单
        /// </summary>
        /// <param name="page"></param>
        /// <param name="sfqy"></param>
        /// <param name="qdbh"></param>
        /// <param name="tcmc"></param>
        /// <returns></returns>
        public ActionResult Order(int page = 1, string qdbh = "", string ddstart = "", string ddend = "", string yystart = "", string yyend = "", string xm = "", string dh = "", string tczt = "", string tcmc = "")
        {
            XtJgbModel jgModel = new Service.XtjgbService().GetJg(GLYadmin.YYID);;

            ViewBag.Jg = jgModel;

            int       count = 0;
            Hashtable ht    = new Hashtable();

            ht.Add("yybh", GLYadmin.YYID);
            ht.Add("ddly", "0");
            ht.Add("qdbh", qdbh);
            ht.Add("ddstart", ddstart);
            ht.Add("ddend", ddend);
            ht.Add("yystart", yystart);
            ht.Add("yyend", yyend);
            ht.Add("dh", dh);
            ht.Add("xm", xm);
            ht.Add("tczt", tczt);
            ht.Add("tcmc", tcmc);
            List <DdjbxxModel> list = new Service.DdyymxbService().OrderYyQdList(ht, page, PageSize, ref count);
            int recordCount         = count;//总记录数

            ViewBag.Zdbz  = jgModel.zdbz;
            ViewBag.Pager = PagingNewHelper.ShowFPageForBootstrapAdmin(page, PageSize, count);//生成分页条
            if (Request.IsAjaxRequest())
            {
                return(PartialView("OrderPart", list));
            }
            else
            {
                List <QuDaoJbxx>     liQd = new QuDaoJbxxService().GetYyQudao(GLYadmin.YYID, "");
                List <KeyValueModel> li   = new List <KeyValueModel>();
                foreach (QuDaoJbxx model in liQd)
                {
                    li.Add(new KeyValueModel()
                    {
                        key = model.Bh.ToString(), values = model.Mc
                    });
                }

                ViewBag.QdList = li;
            }
            return(View(list));
        }
コード例 #3
0
        public JsonResult BatchComplete(string ddbhs, int ddzt)
        {
            var result = new Service.DdyymxbService().BatchComplete(ddbhs, ddzt);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        /// <summary>
        /// 渠道订单详情
        /// </summary>
        /// <param name="ddbh"></param>
        /// <returns></returns>
        public ActionResult OrderDetail(string ddbh)
        {
            DdjbxxModel model = new Service.DdyymxbService().GetBydsfddxx(ddbh);

            return(View(model));
        }