예제 #1
0
 public bool Insert(CsAdmMenu admProfilUsers)
 {
     try
     {
         Galatee.Entity.Model.ADMMENU admProfilUser = Galatee.Tools.Utility.ConvertEntity <Galatee.Entity.Model.ADMMENU, CsAdmMenu>(admProfilUsers);
         using (galadbEntities context = new galadbEntities())
         {
             return(Entities.InsertEntity <Galatee.Entity.Model.ADMMENU>(admProfilUser));
         };
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 public List <CsAdmMenu> GetAllModuleFonction()
 {
     try
     {
         List <CsAdmMenu> lesModule             = new List <CsAdmMenu>();
         galadbEntities   context               = new galadbEntities();
         List <Galatee.Entity.Model.ADMMENU> dt = AdminProcedures.RetourneListeToutMenuProfilTotal(context);
         foreach (Galatee.Entity.Model.ADMMENU item in dt)
         {
             CsAdmMenu leModule = new CsAdmMenu();
             leModule = Entities.ConvertObject <CsAdmMenu, Galatee.Entity.Model.ADMMENU>(item);
             leModule.lstMenuProfil = Entities.ConvertObject <CsMenuDuProfil, Galatee.Entity.Model.MENUSDUPROFIL>(item.MENUSDUPROFIL.ToList());
             lesModule.Add(leModule);
         }
         context.Dispose();
         return(lesModule);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }