예제 #1
0
        public JsonResult Search()
        {
            // SelectWhere.selectwherestring(Request["sqlSet"]);
            int pageIndex = Request["page"] == null ? 1 : int.Parse(Request["page"]);
            int pageSize  = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            //string Where = Request["sqlSet"] == null ? "1=1" : SelectWhere.selectwherestring(Request["sqlSet"]);
            string Where = Request["sqlSet"] == null ? "1=1" : GetSql(Request["sqlSet"]);

            Where += " and (isDeleted=0) ";
            ////字段排序
            String    sortField = Request["sort"];
            String    sortOrder = Request["order"];
            PageClass pc        = new PageClass();

            pc.sys_Fields    = "*";
            pc.sys_Key       = "Id";
            pc.sys_PageIndex = pageIndex;
            pc.sys_PageSize  = pageSize;
            pc.sys_Table     = "TF_PersonnelFile";
            pc.sys_Where     = Where;
            pc.sys_Order     = " " + sortField + " " + sortOrder;
            DataSet ds = OPBiz.GetPagingDataP(pc);
            Dictionary <string, object> dic = new Dictionary <string, object>();


            // var mql = TF_PersonnelFileSet.Id.NotEqual("");
            dic.Add("rows", ds.Tables[0]);
            dic.Add("total", pc.RCount);
            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult GetUnitsNotOut(string Id)
        {
            int    pageIndex = Request["page"] == null ? 1 : int.Parse(Request["page"]);
            int    pageSize  = Request["rows"] == null ? 1000 : int.Parse(Request["rows"]);
            string Where     = " Id not in(select UnitsId from TF_PersonnelFile_Units_Out where PersonnelFileId='" + Id + "')";

            Where += " and (isDeleted=0) ";
            ////字段排序
            String    sortField = Request["sort"];
            String    sortOrder = Request["order"];
            PageClass pc        = new PageClass();

            pc.sys_Fields    = "*";
            pc.sys_Key       = "Id";
            pc.sys_PageIndex = pageIndex;
            pc.sys_PageSize  = pageSize;
            pc.sys_Table     = "TF_Units";
            pc.sys_Where     = Where;
            pc.sys_Order     = " " + sortField + " " + sortOrder;
            DataSet ds = OPBiz.GetPagingDataP(pc);
            Dictionary <string, object> dic = new Dictionary <string, object>();

            // var mql = TF_PersonnelFileSet.Id.NotEqual("");
            dic.Add("rows", ds.Tables[0]);
            dic.Add("total", pc.RCount);
            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        /// <summary>
        /// 单位可用
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        ///   [HttpPost]
        public JsonResult PersonnelFile_Units()
        {
            int    pageIndex = Request["page"] == null ? 1 : int.Parse(Request["page"]);
            int    pageSize  = Request["rows"] == null ? 1000 : int.Parse(Request["rows"]);
            string Where     = Request["sqlSet"] == null ? "1=1" : GetSql(Request["sqlSet"]);

            Where += "  and (isDeleted=0) ";
            string table = "TF_PersonnelFile";
//            if (UserData.UserTypes != 1)
//            {
//                Where += " and ( UnitsId='" + UserData.DepartmentId + "')";
//                table = "v_TF_PersonnelFile_Units_Out";
//            }
            ////字段排序
            String    sortField = Request["sort"];
            String    sortOrder = Request["order"];
            PageClass pc        = new PageClass();

            pc.sys_Fields    = "*";
            pc.sys_Key       = "Id";
            pc.sys_PageIndex = pageIndex;
            pc.sys_PageSize  = pageSize;
            pc.sys_Table     = table;
            pc.sys_Where     = Where;
            pc.sys_Order     = " " + sortField + " " + sortOrder;
            DataSet ds = OPBiz.GetPagingDataP(pc);
            Dictionary <string, object> dic = new Dictionary <string, object>();

            // var mql = TF_PersonnelFileSet.Id.NotEqual("");
            dic.Add("rows", ds.Tables[0]);
            dic.Add("total", pc.RCount);
            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        public JsonResult GetList()
        {
            int pageIndex = Request["page"] == null ? 1 : int.Parse(Request["page"]);
            int pageSize  = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            ////字段排序
            //String sortField = Request["sortField"];
            //String sortOrder = Request["sortOrder"];
            PageClass pc = new PageClass();

            pc.sys_Fields    = "*";
            pc.sys_Key       = "Id";
            pc.sys_PageIndex = pageIndex;
            pc.sys_PageSize  = pageSize;
            pc.sys_Table     = "V_UserRole";
            string DepartmentId = Request["DepartmentId"];

            if (string.IsNullOrEmpty(DepartmentId))
            {
                pc.sys_Where = "1=1";
            }
            else
            {
                pc.sys_Where = "DepartmentId='" + DepartmentId + "'";
            }
            //if (!UserData.UserInfo.RoleId.ToString().Equals("fb38f312-0078-4f44-9cda-1183c8042db8"))//不是系统管理员,限制一个医院
            //{
            //    pc.sys_Where += " and YH_HospitalId='" + UserData.UserInfo.YH_HospitalId + "'";
            //}


            pc.sys_Order = "Id";


            DataSet ds = OPBiz.GetPagingDataP(pc);
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("rows", ds.Tables[0]);
            dic.Add("total", pc.RCount);

            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public JsonResult ScatteredUserSearch()
        {
            // SelectWhere.selectwherestring(Request["sqlSet"]);
            int pageIndex = Request["page"] == null ? 1 : int.Parse(Request["page"]);
            int pageSize  = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            //string Where = Request["sqlSet"] == null ? "1=1" : SelectWhere.selectwherestring(Request["sqlSet"]);
            string Where = Request["sqlSet"] == null ? "1=1" : GetSql(Request["sqlSet"]);

            Where += " and (isDeleted=0) and SubmitState='零散'";
            ////字段排序
            String    sortField = Request["sort"];
            String    sortOrder = Request["order"];
            PageClass pc        = new PageClass();

            pc.sys_Fields    = "*";
            pc.sys_Key       = "Id";
            pc.sys_PageIndex = pageIndex;
            pc.sys_PageSize  = pageSize;
            pc.sys_Table     = "v_TF_PersonnelFile_Transmitting_Out";
            if (UserData.UserTypes == 1)
            {
                pc.sys_Where = Where;
            }
            else
            {
                pc.sys_Where = Where + " and   DepartmentId='" + UserData.DepartmentId + "'";
            }

            //pc.sys_Where = Where;
            pc.sys_Order = " " + sortField + " " + sortOrder;
            DataSet ds = OPBiz.GetPagingDataP(pc);
            Dictionary <string, object> dic = new Dictionary <string, object>();


            // var mql = TF_PersonnelFile_Transmitting_OutSet.Id.NotEqual("");
            dic.Add("rows", ds.Tables[0]);
            dic.Add("total", pc.RCount);
            return(Json(dic, JsonRequestBehavior.AllowGet));
        }