コード例 #1
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public string DelInfo(string id)
 {
     if (id.Length > 0)
     {
         Common_BLL  pg      = new Common_BLL();
         Sys_MenuBLL bllMenu = new Sys_MenuBLL();
         if (pg.Delete(TableName, TableKey, "'" + id + "'", ""))
         {
             //删除待办事项
             new RoleConfig().DeleteMatterTasks(id.Replace("'", ""));
             string   rtnUrl    = Request.RawUrl;
             Sys_Menu MenuModel = bllMenu.FindByURL(rtnUrl);
             if (MenuModel != null)
             {
                 if (!string.IsNullOrEmpty(MenuModel.Menu_Name))
                 {
                     pg.AddLog(MenuModel.Menu_Name, id, "删除", "ID=" + id + "", bg.CurrUserInfo().UserID, bg.CurrUserInfo().DepartmentCode);
                 }
             }
             return("1");
         }
         else
         {
             return("0");
         }
     }
     else
     {
         return("0");
     }
 }
コード例 #2
0
        /// <summary>
        /// 判定是否存在子菜单
        /// </summary>
        /// <param name="menuModel"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        public string isSubMenuExists(View_Sys_RolePurviewAndMenu menuModel, int level)
        {
            List <Sys_Menu> list = new Sys_MenuBLL().GetList(p => p.Menu_ParentCode == menuModel.Menu_Code).ToList();

            if (list.Count > 0)
            {
                return("icon-nav2");
            }
            else
            {
                return("icon-nav" + menuModel.Menu_Name + "");
            }
        }
コード例 #3
0
        public string UpdateIconStyle(HttpContext context)
        {
            string pcode = context.Request.QueryString["pcode"];

            bool isIconClass = new Sys_MenuBLL().IconMenu(System.Web.HttpContext.Current.Server.MapPath("/Content/Icons/iconMenu.css"));

            if (isIconClass)
            {
                return("1");
            }
            else
            {
                return("0");
            }
        }
コード例 #4
0
 /// <summary>
 /// 批量删除数据
 /// </summary>
 public string BatchDelInfo(string id)
 {
     if (id.Length > 0)
     {
         Common_BLL    pg      = new Common_BLL();
         Sys_MenuBLL   bllMenu = new Sys_MenuBLL();
         StringBuilder sqlstr  = new StringBuilder();
         List <string> listId  = new List <string>();
         listId = id.Split(',').ToList();
         foreach (var item in listId)
         {
             sqlstr.Append("'" + item + "',");
         }
         string sql = sqlstr.ToString().Remove(sqlstr.Length - 1);
         if (pg.Delete(TableName, TableKey, sql, ""))
         {
             //删除待办事项
             new RoleConfig().DeleteBatchMatterTasks(sql);
             string   rtnUrl    = Request.RawUrl;
             Sys_Menu MenuModel = bllMenu.FindByURL(rtnUrl);
             if (MenuModel != null)
             {
                 if (!string.IsNullOrEmpty(MenuModel.Menu_Name))
                 {
                     pg.AddLog(MenuModel.Menu_Name, "", "批量删除成功", "批量删除通过:" + listId, bg.CurrUserInfo().UserID, bg.CurrUserInfo().DepartmentCode);
                 }
             }
             return("1");
         }
         else
         {
             return("0");
         }
     }
     else
     {
         return("0");
     }
 }
コード例 #5
0
ファイル: DataGrid.aspx.cs プロジェクト: cuongpv88/HSCompany
        /// <summary>
        /// 删除一条数据
        /// </summary>
        protected string DelInfo(string id)
        {
            if (id.Length > 0)
            {
                Common_BLL       pg       = new Common_BLL();
                Sys_MenuBLL      bllMenu  = new Sys_MenuBLL();
                BasePage         page     = new BasePage();
                SessionUserModel userInfo = page.CurrUserInfo();
                if (pg.Delete(UCEasyUIDataGrid.TableName, UCEasyUIDataGrid.TableKey, "'" + id + "'", ""))
                {
                    //删除日志
                    //DeleteLog();


                    //删除待办事项
                    new RoleConfig().DeleteMatterTasks(id.Replace("'", ""));

                    string rtnUrl = Request.RawUrl;

                    Sys_Menu MenuModel = bllMenu.FindByURL(rtnUrl);
                    if (MenuModel != null)
                    {
                        if (!string.IsNullOrEmpty(MenuModel.Menu_Name))
                        {
                            pg.AddLog(MenuModel.Menu_Name, id, "删除", "ID=" + id + "", userInfo.UserID, userInfo.DepartmentCode);
                        }
                    }
                    return("1");
                }
                else
                {
                    return("0");
                }
            }
            else
            {
                return("0");
            }
        }
コード例 #6
0
 public Sys_MenuController(Sys_MenuBLL Bll)
 {
     bll = Bll;
 }
コード例 #7
0
 public MenuController(Sys_MenuBLL bll)
 {
     this.bll = bll;
 }
コード例 #8
0
        /// <summary>
        /// 菜单树
        /// </summary>
        /// <returns></returns>
        public string GetMenuTree()
        {
            string json = Sys_MenuBLL.GetMenuTree();

            return(json);
        }
コード例 #9
0
        /// <summary>
        /// 用户菜单
        /// </summary>
        /// <param name="menuid"></param>
        /// <returns></returns>
        public string GetUserMenu(string menuid, string currentuser)
        {
            string json = Sys_MenuBLL.GetMenuList(menuid, currentuser);

            return(json);
        }
コード例 #10
0
 public HomeController(Sys_MenuBLL Bll)
 {
     bll = Bll;
 }