示例#1
0
        public ActionResult Data_DB_ClassifyByWhere()
        {
            string page = this.Request.QueryString["page"];
            string rows = this.Request.QueryString["rows"];

            string where = this.Request.QueryString["Num"];
            /// string order = this.Request.Form["order"];

            string order      = " Classify_sortno asc, Classify_addtime desc  ";
            bool   IsNotEmpty = !string.IsNullOrEmpty(where);

            if (IsNotEmpty)
            {
                where = string.Format(" Classify_Num=''{0}''  ", where);
            }

            int _page = 0, _rows = 0;

            int.TryParse(page, out _page);
            int.TryParse(rows, out _rows);
            if (_page == 0)
            {
                _page = 1;
            }
            if (_rows == 0)
            {
                _rows = 220;
            }

            BLL.DB_Classify           dal = new BLL.DB_Classify();
            List <NModel.DB_Classify> inModel = new List <NModel.DB_Classify>();

            inModel = dal.GetSortAndWherePagerList(_page, _rows, order, where);

            NModel.PageData <NModel.DB_Classify> outModel = BLL.Fun.SetDJsonData <NModel.DB_Classify>(inModel, DataApped_DB_Classify);

            // inModel[0].Count_Show
            dal.Close();

            return(View(outModel));
        }
示例#2
0
        public ActionResult Data_DB_Classify()
        {
            string[] keys = this.Request.Form.AllKeys;
            string   page = this.Request.Form["page"];
            string   rows = this.Request.Form["rows"];

            string where = this.Request.Form["where"];
            string order = this.Request.Form["order"];

            //   where = Server.UrlDecode(where);
            //1=1  and file_name like &#39;%va%&#39;

            int _page = 0, _rows = 0;

            int.TryParse(page, out _page);
            int.TryParse(rows, out _rows);
            if (_page == 0)
            {
                _page = 1;
            }
            if (_rows == 0)
            {
                _rows = 20;
            }

            BLL.DB_Classify           dal = new BLL.DB_Classify();
            List <NModel.DB_Classify> inModel = new List <NModel.DB_Classify>();

            inModel = dal.GetSortAndWherePagerList(_page, _rows, order, where);

            NModel.PageData <NModel.DB_Classify> outModel = BLL.Fun.SetDJsonData <NModel.DB_Classify>(inModel, DataApped_DB_Classify);

            // inModel[0].Count_Show
            dal.Close();

            return(View(outModel));
        }