Exemple #1
0
 /// <summary>
 /// 收入统计汇总
 /// </summary>
 /// <param name="form"></param>
 /// <returns></returns>
 public ActionResult IncomeManagecollect(FormCollection form)
 {
     IncomeAnalysisParam pra = new IncomeAnalysisParam();
     if (form.Count > 0)
     {
         if (form["SelTime"] != "" && form["SelTime"] != null)
         {
             pra.selTime = Convert.ToDateTime(form["SelTime"] + "-01");
         }
         else
         {
             pra.selTime = DateTime.Now;
         }
         pra.opusName = form["SelOpusName"];
     }
     ExtentionIncomeAnalysis result = new Admin_ExcelResourceForMonthLogic().GetIncomeAnalysiscollect(this.pageSize, this.page, out this.totalCount, pra);
     return View(result);
 }
Exemple #2
0
        public ActionResult MonthManage(FormCollection form)
        {
            ExtentionMonthBag cbag = new ExtentionMonthBag();
            if (form.Count != 0 || Request.QueryString.Count != 0)//有选择条件
            {
                MonthParam pra = new MonthParam();
                //post请求
                if (Request.HttpMethod.Equals("POST", StringComparison.OrdinalIgnoreCase))
                {
                    if (form["SelTime"] != "" && form["SelTime"] != null)
                    {
                        pra.seltime = Convert.ToDateTime(form["SelTime"]);
                    }
                    else
                    {
                        pra.seltime = new DateTime(1970, 1, 1);
                    }
                }
                else if (DTRequest.GetQueryString("seltime") != "")
                {
                    pra.seltime = Convert.ToDateTime(DTRequest.GetQueryString("seltime"));
                }
                else
                {
                    pra.seltime = new DateTime(1970, 1, 1);
                }

                //post请求
                if (Request.HttpMethod.Equals("POST", StringComparison.OrdinalIgnoreCase))
                {
                    if (form["selOpusName"] != "" && form["selOpusName"] != null)
                    {
                        pra.selOpusName = form["selOpusName"];
                    }
                    else
                    {
                        pra.selOpusName = "";
                    }
                }
                else if (DTRequest.GetQueryString("selOpusName") != "")
                {
                    pra.selOpusName = DTRequest.GetQueryString("selOpusName");
                }
                else
                {
                    pra.selOpusName = "";
                }

                //post请求
                if (Request.HttpMethod.Equals("POST", StringComparison.OrdinalIgnoreCase))
                {
                    if (form["selCPName"] != "" && form["selCPName"] != null)
                    {
                        pra.selCPName = form["selCPName"];
                    }
                    else
                    {
                        pra.selCPName = "";
                    }
                }
                else if (DTRequest.GetQueryString("selCPName") != "")
                {
                    pra.selCPName = DTRequest.GetQueryString("selCPName");
                }
                else
                {
                    pra.selCPName = "";
                }

                this.pageSize = GetPageSize(25); //每页数量
                //post请求,点击查询返回第一页
                if (Request.HttpMethod.Equals("POST", StringComparison.OrdinalIgnoreCase))
                {
                    this.page = 1;
                }
                else
                {
                    this.page = DTRequest.GetQueryInt("page", 1);
                }
                ViewBag.txtKeywords = this.keywords;
                cbag = new Admin_ExcelResourceForMonthLogic().GetMonthList(this.pageSize, this.page, out this.totalCount, pra);
                //绑定页码
                ViewBag.txtPageNum = this.pageSize.ToString();
                string pageUrl = Utils.CombUrlTxt("../admin/MonthManage", "SelTime={0}&selOpusName={1}&selCPName={2}&page={3}", pra.seltime.ToString(), pra.selOpusName, pra.selCPName, "__id__");
                ViewBag.PageContent = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
                return View(cbag);
            }
            else
            {
                MonthParam pra = new MonthParam();
                pra.seltime = form["SelTime"] == "" || form["SelTime"] == null ? new DateTime(1970, 1, 1) : Convert.ToDateTime(form["SelTime"]);
                pra.selOpusName = "";
                pra.selCPName = "";

                this.pageSize = GetPageSize(25); //每页数量
                this.page = DTRequest.GetQueryInt("page", 1);
                ViewBag.txtKeywords = this.keywords;
                cbag = new Admin_ExcelResourceForMonthLogic().GetMonthList(this.pageSize, this.page, out this.totalCount, pra);
                //绑定页码
                ViewBag.txtPageNum = this.pageSize.ToString();
                string pageUrl = Utils.CombUrlTxt("../admin/MonthManage", "SelTime={0}&selOpusName={1}&selCPName={2}&page={3}", pra.seltime.ToString(), pra.selOpusName, pra.selCPName, "__id__");
                ViewBag.PageContent = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
                return View(cbag);
            }
        }