Exemple #1
0
 public bool ValidateGroup(tbl_Groups Group)
 {
     try
     {
         if (Group.Group_Id > 0)
         {
             return(dbContext.tbl_Groups.Any(x => x.Group_Name == Group.Group_Name && x.Group_Id != Group.Group_Id));
         }
         else
         {
             return(dbContext.tbl_Groups.Any(x => x.Group_Name == Group.Group_Name));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public bool SaveGroup(tbl_Groups Group)
 {
     try
     {
         var result = dbContext.SP_SaveGroup(Group.Group_Id, Group.Group_Name, Group.Menu_Access).ToList();
         if (result.Any())
         {
             if (result.FirstOrDefault().Result == 1)
             {
                 return(true);
             }
         }
         return(false);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public bool SaveGroup(tbl_Groups group)
 {
     return(dl.SaveGroup(group));
 }
 public bool ValidateGroup(tbl_Groups group)
 {
     return(dl.ValidateGroup(group));
 }