示例#1
0
        public JsonResult Del(string IDSet)
        {
            int            f          = OPBiz.DelForSetDelete("Id", IDSet);
            HttpReSultMode ReSultMode = new HttpReSultMode();

            if (UserData.UserTypes != 1)
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg  = "没有权限删除生平信息,请联系管理员!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }

            if (f > 0)
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = f.ToString();
                ReSultMode.Msg  = "成功删除" + f + "条数据!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg  = "删除失败!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
        }
示例#2
0
        public JsonResult ChangeSignChangeSignadmin(string IDSet)
        {
            //int f
            //=0;

            var catmodle = OPBiz.GetEntity(TF_PersonnelFile_Transmitting_OutSet.SelectAll().Where(TF_PersonnelFile_Transmitting_OutSet.Id.Equal(IDSet)));

            catmodle.States          = 1;
            catmodle.WhereExpression = TF_PersonnelFile_Transmitting_OutSet.Id.Equal(IDSet);

            var            f          = OPBiz.Update(catmodle);
            HttpReSultMode ReSultMode = new HttpReSultMode();

            if (f > 0)
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = f.ToString();
                ReSultMode.Msg  = "提交成功!";
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.提交, "档案转出--提交", true, WebClientIP, "档案转出");
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg  = "提交失败!";
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.提交, "档案转出--提交", false, WebClientIP, "档案转出");
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
        }
        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     = "v_TS_ShopUserRole";
            pc.sys_Where     = Where;
            pc.sys_Order     = " " + sortField + " " + sortOrder;
            List <v_TS_ShopUserRole> list2 = OPBiz.GetPagingData <v_TS_ShopUserRole>(pc);

            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("rows", list2);
            dic.Add("total", pc.RCount);
            return(MyJson(dic, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        public JsonResult inpormt(string categoryTable)
        {
            List <TF_PersonnelFile> listItem = JsonHelper.JSONToList <TF_PersonnelFile>(categoryTable);
            //            int f = OPBiz.DelForSetDelete("Id", IDSet);
            HttpReSultMode ReSultMode = new HttpReSultMode();

            foreach (TF_PersonnelFile file in listItem)
            {
                file.Id         = Guid.NewGuid();
                file.CreateMan  = UserData.UserName;
                file.CreateTime = DateTime.Now;
                file.isValid    = true;
                file.isDeleted  = false;
                try
                {
                    OPBiz.Add(file);

                    ReSultMode.Code = 11;
                    ReSultMode.Data = file.Id.ToString();
                    ReSultMode.Msg  = "添加成功";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "人员档案库--导入", true, WebClientIP, "人员档案库");
                }
                catch (Exception e)
                {
                    ReSultMode.Code = -11;
                    ReSultMode.Data = e.ToString();
                    ReSultMode.Msg  = "添加失败";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "人员档案库--导入", false, WebClientIP, "人员档案库");
                    break;
                }
            }
            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }
示例#5
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));
        }
        string userId = "a3e8f66f-3552-4626-9ee2-f7ddd8b106d8";  //GetUData.User_Id;
        public ActionResult Index()
        {
            ViewBag.RuteUrl = RuteUrl();
            VipShopModel vshopMode = new VipShopModel();
            var          mql       = TT_ShopSet.SelectAll().Where(TT_ShopSet.UserId.Equal(userId));
            TT_Shop      item      = OPBiz.GetEntity(mql);

            if (item != null)
            {
                item.UserId = new Guid();//不显示给前端 安全考虑
                var mqlimg = TT_FilesTransactSet.SelectAll().Where(TT_FilesTransactSet.SourceTable.Equal("TT_Shop").And(TT_FilesTransactSet.ToId.Equal(item.ShopId.ToString())));
                List <TT_FilesTransact> listImg = OPFileBiz.GetOwnList(mqlimg);
                //List<FileJson> img = OPFileBiz.GetFList(listImg);
                //vshopMode.ImgList = img;

                vshopMode.ShopItem        = item;
                ViewBag.listImgJson       = OPFileBiz.GetJson(listImg);
                vshopMode.TransactionList = Transaction();

                //ViewData.Model = item;
                return(View(vshopMode));
            }
            else
            {
                return(RedirectToAction("Index", "User"));
            }
        }
示例#7
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));
        }
示例#8
0
        public JsonResult EditInfo(RMS_User RMS_UserModle)
        {
            bool IsAdd = false;

            if (!(RMS_UserModle.Id != null && !RMS_UserModle.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))  //id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                RMS_UserModle.Id         = Guid.NewGuid();
                RMS_UserModle.CreateTime = DateTime.Now;
                RMS_UserModle.ModifyTime = DateTime.Now;
                //rol.RoleDescription = RMS_UserModle.RoleDescription;
                //rol.RoleOrder = RMS_UserModle.RoleOrder;

                OPBiz.Add(RMS_UserModle);
                return(Json("ok", JsonRequestBehavior.AllowGet));
            }
            else
            {
                RMS_UserModle.WhereExpression = RMS_UserSet.Id.Equal(RMS_UserModle.Id);
                //  spmodel.GroupId = GroupId;
                if (OPBiz.Update(RMS_UserModle) > 0)
                {
                    return(Json("ok", JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json("Nok", JsonRequestBehavior.AllowGet));
                }
            }
        }
        public JsonResult GetInfo(string ID)
        {
            var             mql2   = TF_LifeCommentsSet.SelectAll().Where(TF_LifeCommentsSet.Id.Equal(ID));
            TF_LifeComments Rmodel = OPBiz.GetEntity(mql2);

            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetInfo(string ID)
        {
            var mql2 = TF_EntryAndExitRegistrationSet.SelectAll().Where(TF_EntryAndExitRegistrationSet.Id.Equal(ID));
            TF_EntryAndExitRegistration Rmodel = OPBiz.GetEntity(mql2);

            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
示例#11
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));
        }
示例#12
0
        public JsonResult DeleteInfo(string ID)
        {
            var mql2 = RMS_UserSet.Id.Equal(ID);
            int f    = OPBiz.Remove <RMS_UserSet>(mql2);

            return(Json("OK", JsonRequestBehavior.AllowGet));
        }
示例#13
0
        public JsonResult DeleteInfo(string ID)
        {
            var mql2 = RMS_UserSet.Id.Equal(ID);
            int f    = OPBiz.Remove <RMS_UserSet>(mql2);

            SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.除, "用户管理--删除", true, WebClientIP, "用户管理");
            return(Json("OK", JsonRequestBehavior.AllowGet));
        }
示例#14
0
        /// <summary>
        /// 获取项
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public JsonResult GetListItems(string ID)
        {
            var mql2 = TF_PersonnelFile_Transmitting_Out_ItemSet.SelectAll().Where(TF_PersonnelFile_Transmitting_Out_ItemSet.OwnerId.Equal(ID));
            List <TF_PersonnelFile_Transmitting_Out_Item> listItem = OPBiz.GetOwnList <TF_PersonnelFile_Transmitting_Out_Item>(mql2);

            //  groupsBiz.Add(rol);
            return(Json(listItem, JsonRequestBehavior.AllowGet));
        }
示例#15
0
        public JsonResult GetInfo(string ID)
        {
            var mql2 = TF_PersonnelFileSet.SelectAll().Where(TF_PersonnelFileSet.Id.Equal(ID));
            TF_PersonnelFile Rmodel = OPBiz.GetEntity(mql2);

            //  groupsBiz.Add(rol);
            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
示例#16
0
        public JsonResult GetInfo(string ID)
        {
            var      mql2   = RMS_UserSet.SelectAll().Where(RMS_UserSet.Id.Equal(ID));
            RMS_User Rmodel = OPBiz.GetEntity(mql2);

            //  groupsBiz.Add(rol);
            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult EditInfo(TF_LifeComments EidModle)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();
            bool           IsAdd      = false;

            EidModle.UpdateTime = DateTime.Now;
            if (!(EidModle.Id != null && !EidModle.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                EidModle.Id         = Guid.NewGuid();
                EidModle.CreateMan  = UserData.UserName;
                EidModle.CreateTime = DateTime.Now;
                EidModle.isValid    = true;
                EidModle.isDeleted  = false;
                EidModle.States     = -1;
                try
                {
                    OPBiz.Add(EidModle);

                    ReSultMode.Code = 11;
                    ReSultMode.Data = EidModle.Id.ToString();
                    ReSultMode.Msg  = "保存成功,请尽快提交审核!";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "生平管理--新增", true, WebClientIP, "生平管理");
                }
                catch (Exception e)
                {
                    ReSultMode.Code = -11;
                    ReSultMode.Data = e.ToString();
                    ReSultMode.Msg  = "添加失败";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "生平管理--新增", false, WebClientIP, "生平管理");
                }
            }
            else
            {
                EidModle.WhereExpression = TF_LifeCommentsSet.Id.Equal(EidModle.Id);
                // EidModle.ChangedMap.Remove("id");//移除主键值
                if (OPBiz.Update(EidModle) > 0)
                {
                    ReSultMode.Code = 11;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "保存成功,请尽快提交审核!";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "生平管理--修改", true, WebClientIP, "生平管理");
                }
                else
                {
                    ReSultMode.Code = -13;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "修改失败";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "生平管理--修改", false, WebClientIP, "生平管理");
                }
            }


            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }
        public JsonResult EditInfo(TF_EntryAndExitRegistration EidModle)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();
            bool IsAdd = false;

            EidModle.UpdateTime = DateTime.Now;
            if (!(EidModle.Id != null && !EidModle.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            //if (IsAdd)
            //{
            //    EidModle.Id = Guid.NewGuid();
            //    EidModle.CreateMan = UserData.UserName;
            //    EidModle.CreateTime = DateTime.Now;
            //    EidModle.isValid = true;
            //    EidModle.isDeleted = false;
            //    EidModle.ApprovalStates = -1;

            //    try
            //    {
            //        OPBiz.Add(EidModle);

            //        ReSultMode.Code = 11;
            //        ReSultMode.Data = EidModle.Id.ToString();
            //        ReSultMode.Msg = "添加成功";
            //    }
            //    catch (Exception e)
            //    {

            //        ReSultMode.Code = -11;
            //        ReSultMode.Data = e.ToString();
            //        ReSultMode.Msg = "添加失败";
            //    }

            //}
            //else
            //{
            EidModle.WhereExpression = TF_EntryAndExitRegistrationSet.Id.Equal(EidModle.Id);
            // EidModle.ChangedMap.Remove("id");//移除主键值
            if (OPBiz.Update(EidModle) > 0)
            {
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "证件审核--修改", true, WebClientIP, "证件审核");

                ReSultMode.Code = 11;
                ReSultMode.Data = "";
                ReSultMode.Msg = "修改成功";
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "";
                ReSultMode.Msg = "修改失败";
            }
            //}
            return Json(ReSultMode, JsonRequestBehavior.AllowGet);

        }
示例#19
0
        public JsonResult EditInfo(RMS_User EidModle)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();
            bool           IsAdd      = false;

            if (!(EidModle.Id != null && !EidModle.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                var  mql2 = RMS_UserSet.LoginName.Equal(EidModle.LoginName);
                long i    = OPBiz.GetCount <RMS_UserSet>(mql2);
                if (i > 0)
                {
                    ReSultMode.Code = -13;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "用户名已存在";
                }
                else
                {
                    EidModle.UserType   = 0;
                    EidModle.Id         = Guid.NewGuid();
                    EidModle.CreateTime = DateTime.Now;
                    EidModle.ModifyTime = DateTime.Now;
                    //rol.RoleDescription = EidModle.RoleDescription;
                    //rol.RoleOrder = EidModle.RoleOrder;

                    OPBiz.Add(EidModle);
                    ReSultMode.Code = 11;
                    ReSultMode.Data = EidModle.Id.ToString();
                    ReSultMode.Msg  = "添加成功";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "用户管理--新增", true, WebClientIP, "用户管理");
                }
            }
            else
            {
                EidModle.WhereExpression = RMS_UserSet.Id.Equal(EidModle.Id);
                //  spmodel.GroupId = GroupId;
                if (OPBiz.Update(EidModle) > 0)
                {
                    ReSultMode.Code = 11;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "修改成功";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "用户管理--修改", true, WebClientIP, "用户管理");
                }
                else
                {
                    ReSultMode.Code = -13;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "修改失败";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "用户管理--修改", false, WebClientIP, "用户管理");
                }
            }
            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }
示例#20
0
        public JsonResult GetInfo(string ID)
        {
            var mql2 = TF_PersonnelFile_Transmitting_OutSet.SelectAll().Where(TF_PersonnelFile_Transmitting_OutSet.Id.Equal(ID));
            TF_PersonnelFile_Transmitting_Out Rmodel = OPBiz.GetEntity(mql2);
            var mql3      = TF_PersonnelFile_Transmitting_Out_ItemSet.SelectAll().Where(TF_PersonnelFile_Transmitting_Out_ItemSet.OwnerId.Equal(ID));
            var ItemBlist = OPItemBiz.GetEntities(mql3);
            var df        = new { inmode = Rmodel, InItem = ItemBlist };

            //  groupsBiz.Add(rol);
            return(Json(df, JsonRequestBehavior.AllowGet));
        }
示例#21
0
        public FileContentResult GetImage(string id)
        {
            var df  = TF_PersonnelFile_Transmitting_OutSet.SelectAll().Where(TF_PersonnelFile_Transmitting_OutSet.Id.Equal(id));
            var dfw = OPBiz.GetEntity(df);


            if (dfw != null)
            {
                return(File(dfw.signatureimage, "jpg"));
            }
            else
            {
                return(null);
            }
        }
示例#22
0
        public FileResult CommonExportNewport(string Title, string Columns, string Data)
        {
            string ChildCategoryTableID = "";

            if (Request.Form["ChildCategoryTableID"] != null)
            {
                ChildCategoryTableID = Request.Form["ChildCategoryTableID"];
            }
            string CategoryTableID = "";

            if (Request.Form["CategoryTableID"] != null)
            {
                CategoryTableID = Request.Form["CategoryTableID"];
            }
            DataTable _datatable = new DataTable();

            if (Request.Form["dataGetter"] != null)
            {
                _datatable = JsonConvert.DeserializeObject <DataTable>(Request.Form["dataGetter"]);
            }

            var sqlc2 = MainAssociationSet.SelectAll().Where(MainAssociationSet.CategoryTableID.Equal(CategoryTableID).And(MainAssociationSet.ChildCategoryTableID.Equal(ChildCategoryTableID)));

            var newmodle = Mabiz.GetEntity(sqlc2);

            var sqlc = VcorrelateColumnsSet.SelectAll().Where(VcorrelateColumnsSet.MainAssociationID.Equal(newmodle.ID));
            var dic  = Vcbiz.GetEntities(sqlc);

            var ddsql = CategoryTableSet.SelectAll().Where(CategoryTableSet.ID.Equal(ChildCategoryTableID));
            var CategoryTablemodle = OPBiz.GetEntity(ddsql);

            var       list = CCBiz.ExecuteSqlToOwnList("select * from ColumnCharts where CategoryTableID='" + ChildCategoryTableID + "'  and IsEnable=1 and MergeHeader<>1 and (title<>'ck')  ORDER BY  SortNo");
            DataTable dt2  = new DataTable();

            dt2.Columns.Add("ID");
            for (int i = 0; i < list.Count; i++)
            {
                dt2.Columns.Add(list[i].field);
            }
            UniteDataTable(_datatable, dt2, dic);
            string filename = Guid.NewGuid().ToString() + ".xlsx";
            var    ff       = Exporter.NewInstance(Server.MapPath("~/temp/" + filename), dt2, CategoryTablemodle.ChineseName).Download();

            return(File(Server.MapPath("~/temp/" + filename), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", string.Format("{0}.xlsx", Title)));
            // return File(ff, "application/ms-excel", string.Format("{0}.xls", "czc"));
        }
示例#23
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";


            List <V_UserRole>           list2 = OPBiz.GetPagingData <V_UserRole>(pc);
            Dictionary <string, object> dic   = new Dictionary <string, object>();


            // var mql = RMS_UserSet.Id.NotEqual("");
            dic.Add("rows", list2);
            dic.Add("total", pc.RCount);

            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
示例#24
0
        public JsonResult NewRegister(RMS_User EidModle)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();
            bool           IsAdd      = false;

            if (!(EidModle.Id != null && !EidModle.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                EidModle.UserType = 0;
                var  mql2 = RMS_UserSet.LoginName.Equal(EidModle.LoginName);
                long i    = OPBiz.GetCount <RMS_UserSet>(mql2);
                if (i > 0)
                {
                    ReSultMode.Code = -13;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "用户名已存在";
                }
                else
                {
                    EidModle.Id         = Guid.NewGuid();
                    EidModle.CreateTime = DateTime.Now;
                    EidModle.ModifyTime = DateTime.Now;
                    OPBiz.Add(EidModle);

                    //设置默认角色
                    List <RMS_Role> listRole = URBiz.GetOwnList <RMS_Role>(RMS_RoleSet.SelectAll().Where(RMS_RoleSet.RoleTypes.Equal(0)));//所有的姓名登录角色
                    RMS_UserRole    urItem   = new RMS_UserRole();
                    urItem.Id     = Guid.NewGuid();
                    urItem.UserId = EidModle.Id;
                    urItem.RoleId = listRole[0].Id;
                    urBiz.Add(urItem);

                    ReSultMode.Code = 11;
                    ReSultMode.Data = EidModle.Id.ToString();
                    ReSultMode.Msg  = "注册成功!";
                }
            }

            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Del(string IDSet)
        {
            int            f          = OPBiz.DelForSetDelete("Id", IDSet);
            HttpReSultMode ReSultMode = new HttpReSultMode();

            if (f > 0)
            {
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.除, "证件登记--删除", true, WebClientIP, "证件登记");
                ReSultMode.Code = 11;
                ReSultMode.Data = f.ToString();
                ReSultMode.Msg  = "成功删除" + f + "条数据!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg  = "删除失败!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
        }
        public JsonResult Del(string IDSet)
        {
            var mql2 = TS_ShopUserSet.Id.In(IDSet.Split(','));
            // int f = OPBiz.Remove<TS_ShopUserSet>(mql2);
            int            f          = OPBiz.DelForSetDelete("Id", IDSet);
            HttpReSultMode ReSultMode = new HttpReSultMode();

            if (f > 0)
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = f.ToString();
                ReSultMode.Msg  = "成功删除" + f + "条数据!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg  = "删除失败!";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
        }
        public JsonResult Approve(string ID, string state = "0")
        {//ApprovalStates 状态(-1;--未提交;0--待审核;1--审核通过;2--审核不通过)
            string sql = string.Format("update TF_EntryAndExitRegistration set ApprovalStates={0},AprovalTime=getdate() Where Id='{1}'", state, ID);
            int f = OPBiz.ExecuteSqlWithNonQuery(sql);
            HttpReSultMode ReSultMode = new HttpReSultMode();
            if (f > 0)
            {
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.审核, "证件审核--审核", true, WebClientIP, "证件审核");

                ReSultMode.Code = 11;
                ReSultMode.Data = f.ToString();
                ReSultMode.Msg = "审核处理成功!";
                return Json(ReSultMode, JsonRequestBehavior.AllowGet);
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg = "审核处理失败!";
                return Json(ReSultMode, JsonRequestBehavior.AllowGet);
            }
        }
示例#28
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));
        }
        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='false'";
            ////字段排序
            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_EntryAndExitRegistration";
            if (UserData.UserTypes == 1)
            {
                pc.sys_Where = Where;
            }
            else
            {
                pc.sys_Where = Where + " and CreateMan='" + UserData.UserName + "'";
            }

            pc.sys_Order = " " + sortField + " " + sortOrder;
            List <TF_EntryAndExitRegistration> list2 = OPBiz.GetPagingData <TF_EntryAndExitRegistration>(pc);
            Dictionary <string, object>        dic   = new Dictionary <string, object>();


            // var mql = TF_EntryAndExitRegistrationSet.Id.NotEqual("");
            dic.Add("rows", list2);
            dic.Add("total", pc.RCount);
            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Approve(string ID, string state = "-1")
        {//States 状态(已审核--2、审核中--1,已提交--0,编辑中--1)
            string         sql        = string.Format("update TF_LifeComments set States={0} Where Id='{1}'", state, ID);
            int            f          = OPBiz.ExecuteSqlWithNonQuery(sql);
            HttpReSultMode ReSultMode = new HttpReSultMode();

            if (f > 0)
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = f.ToString();
                ReSultMode.Msg  = "提交审核成功!";
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.提交, "生平管理--用户提交", true, WebClientIP, "生平管理");
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            else
            {
                ReSultMode.Code = -13;
                ReSultMode.Data = "0";
                ReSultMode.Msg  = "提交审核失败!";
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.提交, "生平管理--用户提交", false, WebClientIP, "生平管理");
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
        }