예제 #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int     allRecordCount = 0;
            string  sortname       = context.Request.Params["sortname"];
            string  sortorder      = context.Request.Params["sortorder"];
            int     page           = Convert.ToInt32(context.Request.Params["page"]) - 1; // 系统的索引从0开始,所以此处需要减1
            int     pagesize       = Convert.ToInt32(context.Request.Params["pagesize"]);
            string  fromWhere      = context.Request.QueryString["fromwhere"];
            string  qylx           = context.Request.QueryString["qylx"];
            string  qyId           = context.Request.QueryString["qyid"];
            string  rowid          = context.Request.QueryString["rowid"];
            string  befrom         = context.Request.QueryString["befrom"];
            string  dwlx           = context.Request.QueryString["dwlx"];
            object  sessionAppUser = context.Session[ConfigManager.GetSignInAppUserSessionName()];
            AppUser workUser       = (AppUser)sessionAppUser;

            BLL = new SzqyBLL(workUser);

            //排序
            string orderby = @" " + sortname + " " + sortorder + " ";
            //通过检索翻译 生成查询条件
            FilterTranslator ft = ContextExtension.GetGridData(context);
            //分页
            DataTable dt = new DataTable();

            switch (fromWhere)
            {
            case "Qyxx":
                dt = BLL.RetrieveQyxxList(qylx, ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "JsdwSsgc":
                string jsdwID = context.Request.QueryString["jsdwid"];
                dt = BLL.RetrieveJsdwSsgc(jsdwID).Result;
                break;

            case "Qyclgc":
                dt = BLL.RetrieveQyclgc(qyId, befrom, dwlx).Result;
                break;

            case "Qyzs":
                dt = BLL.RetrieveQyzs(qyId, befrom).Result;
                break;

            case "Zyry":
                dt = BLL.RetrieveZyry(qyId, ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "QyxxView":
                dt = BLL.RetrieveQyxxViewList(qyId).Result;
                break;
            }
            ft.Parms.Clear();
            string result = JSONHelper.DataTableToJson(dt);

            json = @"{""Rows"":[" + result + @"],""Total"":""" + allRecordCount + @"""}";
            context.Response.Write(json);
            context.Response.End();
        }
예제 #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int     allRecordCount = 0;
            string  sortname       = context.Request.Params["sortname"];
            string  sortorder      = context.Request.Params["sortorder"];
            int     page           = Convert.ToInt32(context.Request.Params["page"]) - 1; // 系统的索引从0开始,所以此处需要减1
            int     pagesize       = Convert.ToInt32(context.Request.Params["pagesize"]);
            string  fromWhere      = context.Request.QueryString["fromwhere"];
            string  rowid          = context.Request.QueryString["rowid"];
            object  sessionAppUser = context.Session[ConfigManager.GetSignInAppUserSessionName()];
            AppUser workUser       = (AppUser)sessionAppUser;

            xmxxBLL = new XmxxBLL(workUser);

            //排序
            string orderby = @" " + sortname + " " + sortorder + " ";
            //通过检索翻译 生成查询条件
            FilterTranslator ft = ContextExtension.GetGridData(context);
            //分页
            DataTable dt   = new DataTable();
            string    json = String.Empty;

            switch (fromWhere)
            {
            case "ajxxList":
                dt = xmxxBLL.RetrieveAjxxList(ft, pagesize, page, orderby, out allRecordCount);
                break;


            case "zjxxList":
                dt = xmxxBLL.RetrieveZjxxList(ft, pagesize, page, orderby, out allRecordCount);
                break;

            case "ajxx_ryxxList":
                string aqjdbm = context.Request.QueryString["aqjdbm"];
                dt = xmxxBLL.RetrieveAjxx_RyxxList(aqjdbm, ft, pagesize, page, orderby, out allRecordCount);
                break;

            case "zjxx_ryxxList":
                string zljdbm = context.Request.QueryString["zljdbm"];
                dt = xmxxBLL.RetrieveZjxx_RyxxList(zljdbm, ft, pagesize, page, orderby, out allRecordCount);
                break;

            case "lxxmList":
                dt = xmxxBLL.RetrieveLxxmList(ft, pagesize, page, orderby, out allRecordCount);
                break;
            }
            ft.Parms.Clear();

            string result = JSONHelper.DataTableToJson(dt);

            //result = Regex.Replace(result, @"[/n/r]", ""); //去掉字符串里所有换行符
            //result = result.TrimEnd((char[])"\n\r".ToCharArray());  //去掉换行符
            json = @"{""Rows"":[" + result + @"],""Total"":""" + allRecordCount + @"""}";
            context.Response.Write(json);
            context.Response.End();
        }
예제 #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int     allRecordCount = 0;
            string  json           = "";
            string  sortname       = context.Request.Params["sortname"];
            string  sortorder      = context.Request.Params["sortorder"];
            int     page           = Convert.ToInt32(context.Request.Params["page"]) - 1; // 系统的索引从0开始,所以此处需要减1
            int     pagesize       = Convert.ToInt32(context.Request.Params["pagesize"]);
            string  fromWhere      = context.Request.QueryString["fromwhere"];
            string  type           = context.Request.QueryString["type"];
            object  sessionAppUser = context.Session[ConfigManager.GetSignInAppUserSessionName()];
            AppUser workUser       = (AppUser)sessionAppUser;

            xytxBLL = new XytxBLL(workUser);
            //排序
            string orderby = @" " + sortname.ToString2() + " " + sortorder.ToString2() + " ";

            orderby = orderby.Trim();
            //通过检索翻译 生成查询条件
            FilterTranslator ft = ContextExtension.GetGridData(context);
            //分页
            DataTable dt = new DataTable();

            switch (fromWhere)
            {
            case "qyxykp":
                string qylx = context.Request.QueryString["qylx"];

                dt = xytxBLL.RetrieveQyxykp(qylx, ft, pagesize, page, orderby, out allRecordCount);

                break;

            case "xzcf":
                //throw new Exception("aaa");
                dt = xytxBLL.RetrieveXzcf(type, ft, pagesize, page, orderby, out allRecordCount);
                break;
            }
            ft.Parms.Clear();

            string result = JSONHelper.DataTableToJson(dt);

            //result = Regex.Replace(result, @"[/n/r]", ""); //去掉字符串里所有换行符
            //result = result.TrimEnd((char[])"\n\r".ToCharArray());  //去掉换行符
            json = @"{""Rows"":[" + result + @"],""Total"":""" + allRecordCount + @"""}";
            context.Response.Write(json);
            context.Response.End();
        }
예제 #4
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int    allRecordCount = 0;
            string sortname       = context.Request.Params["sortname"];
            string sortorder      = context.Request.Params["sortorder"];
            int    page           = Convert.ToInt32(context.Request.Params["page"]) - 1; // 系统的索引从0开始,所以此处需要减1
            int    pagesize       = Convert.ToInt32(context.Request.Params["pagesize"]);
            string fromWhere      = context.Request.QueryString["fromwhere"];

            object sessionAppUser = context.Session[ConfigManager.GetSignInAppUserSessionName()];

            BLL = new ZlctBLL((AppUser)sessionAppUser);

            //排序
            string orderby = @" " + sortname + " " + sortorder + " ";
            //通过检索翻译 生成查询条件
            FilterTranslator ft = ContextExtension.GetGridData(context);
            //分页
            DataTable dt = new DataTable();

            switch (fromWhere)
            {
            case "Gzzs_List":
                dt = BLL.RetrieveGzzs_List(ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "Zshf_all_List":
                dt = BLL.RetrieveZshf_all_List(ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "DxjbSendRecords_List":
                dt = BLL.RetrieveDxjbSendRecords_List(ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "YzDxjb_List":
                dt = BLL.RetrieveYzDxjb_List(ft, pagesize, page, orderby, out allRecordCount).Result;
                break;
            }
            ft.Parms.Clear();
            string result = JSONHelper.DataTableToJson(dt);

            json = @"{""Rows"":[" + result + @"],""Total"":""" + allRecordCount + @"""}";
            context.Response.Write(json);
            context.Response.End();
        }
예제 #5
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int    allRecordCount = 0;
            string sortname       = context.Request.Params["sortname"];
            string sortorder      = context.Request.Params["sortorder"];
            int    page           = Convert.ToInt32(context.Request.Params["page"]) - 1; // 系统的索引从0开始,所以此处需要减1
            int    pagesize       = Convert.ToInt32(context.Request.Params["pagesize"]);
            string fromWhere      = context.Request.QueryString["fromwhere"];
            //string qylx = context.Request.QueryString["qylx"];
            //string qyId = context.Request.QueryString["qyid"];
            string rowid = context.Request.QueryString["rowid"];

            object  sessionAppUser = context.Session[ConfigManager.GetSignInAppUserSessionName()];
            AppUser workUser       = (AppUser)sessionAppUser;

            BLL = new GzyjBLL((AppUser)sessionAppUser);

            //排序
            string orderby = @" " + sortname + " " + sortorder + " ";
            //通过检索翻译 生成查询条件
            FilterTranslator ft = ContextExtension.GetGridData(context);
            //分页
            DataTable dt = new DataTable();

            //switch (fromWhere)
            //{
            //case "qyzsgq":
            dt = BLL.Retrieve(fromWhere, workUser, ft, pagesize, page, orderby, out allRecordCount).Result;
            //        break;
            //    case "JsdwAjxm":
            //        dt = BLL.RetrieveJsdwAjxm(rowid, pagesize, page, orderby, out allRecordCount).Result;
            //        break;

            //    case "QyxxView":
            //        dt = BLL.RetrieveQyxxViewList(qyId, ft).Result;
            //        break;
            //}
            ft.Parms.Clear();
            string result = JSONHelper.DataTableToJson(dt);

            result = Regex.Replace(result, @"[\n\r]", ""); //去掉字符串里所有换行符
            json   = @"{""Rows"":[" + result + @"],""Total"":""" + allRecordCount + @"""}";
            context.Response.Write(json);
            context.Response.End();
        }
예제 #6
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int     allRecordCount = 0;
            string  sortname       = context.Request.Params["sortname"];
            string  sortorder      = context.Request.Params["sortorder"];
            int     page           = Convert.ToInt32(context.Request.Params["page"]) - 1; // 系统的索引从0开始,所以此处需要减1
            int     pagesize       = Convert.ToInt32(context.Request.Params["pagesize"]);
            string  fromWhere      = context.Request.QueryString["fromwhere"];
            string  xmlx           = context.Request.QueryString["xmlx"];
            string  rowid          = context.Request.QueryString["rowid"];
            string  zljdid         = context.Request.QueryString["zljdid"];
            string  aqjdid         = context.Request.QueryString["aqjdid"];
            string  sgxkid         = context.Request.QueryString["sgxkid"];
            string  sgxmtybh       = context.Request.QueryString["sgxmtybh"];
            string  qyId           = context.Request.QueryString["qyid"];
            string  befrom         = context.Request.QueryString["befrom"];
            object  sessionAppUser = context.Session[ConfigManager.GetSignInAppUserSessionName()];
            AppUser workUser       = (AppUser)sessionAppUser;

            BLL = new SzgcBLL(workUser);
            bll = new SzqyBLL(workUser);

            //排序
            string orderby = @" " + sortname + " " + sortorder + " ";
            //通过检索翻译 生成查询条件
            FilterTranslator ft = ContextExtension.GetGridData(context);
            //分页
            DataTable dt = new DataTable();

            switch (fromWhere)
            {
            case "Lxbd":
                dt = BLL.RetrieveLxbd(rowid, ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "Xmxx":
                dt = BLL.RetrieveSzgc(xmlx, workUser, ft, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "GcxmHtba":
                dt = BLL.RetrieveGcxmHtba(rowid, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "GcxmAqjd":
                dt = BLL.RetrieveGcxmAqjd(rowid, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "GcxmZljd":
                dt = BLL.RetrieveGcxmZljd(rowid, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "GcxmSgxk":
                dt = BLL.RetrieveGcxmSgxk(rowid, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "GcxmJgys":
                dt = BLL.RetrieveGcxmJgys(rowid, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "DwgcList":
                dt = BLL.RetrieveDwgcList(rowid, pagesize, page, orderby, out allRecordCount).Result;
                break;

            case "Aqbjxmzcy":
                dt = BLL.RetrieveAqbjxmzcy(rowid, befrom).Result;
                break;

            case "AqjdZljd":
                dt = BLL.RetrieveAqjdZljd(rowid).Result;
                break;

            case "AqjdSgxk":
                dt = BLL.RetrieveAqjdSgxk(rowid).Result;
                break;

            case "AqjdJgba":
                dt = BLL.RetrieveAqjdJgba(rowid).Result;
                break;

            case "zljdDtgc":
                dt = BLL.RetrieveZljdDtgc(rowid, befrom).Result;
                break;

            case "zljdSgxk":
                dt = BLL.RetrieveZljdSgxk(rowid).Result;
                break;

            case "zljdJgba":
                dt = BLL.RetrieveZljdJgba(rowid).Result;
                break;

            case "sgxk":
                dt = BLL.RetrieveSgxk(rowid).Result;
                break;

            case "sgxkJgba":
                dt = BLL.RetrieveSgxkJgba(rowid).Result;
                break;

            case "QyxxView":
                dt = bll.RetrieveQyxxViewList(qyId).Result;
                break;
            }
            ft.Parms.Clear();

            string result = JSONHelper.DataTableToJson(dt);

            //result = Regex.Replace(result, @"[/n/r]", ""); //去掉字符串里所有换行符
            //result = result.TrimEnd((char[])"\n\r".ToCharArray());  //去掉换行符
            json = @"{""Rows"":[" + result + @"],""Total"":""" + allRecordCount + @"""}";
            context.Response.Write(json);
            context.Response.End();
        }