Beispiel #1
0
 public int AddPermission(int RoleID, string PageIDs, bool ISADMIN)
 {
     try
     {
         string sql = "";
         if (PageIDs != null && PageIDs != "")
         {
             string[] FuncIDs = PageIDs.Split(',');
             foreach (var item in FuncIDs)
             {
                 sql += "(" + RoleID + "," + item + "),";
             }
             sql = sql.Substring(0, sql.Length - 1);
         }
         int result = MyContext.CSF_PageRole_Add(RoleID, sql, ISADMIN);
         return(result);
     }
     catch (Exception ex)
     {
         Logs.WriteLog(ex);
         throw;
     }
 }