コード例 #1
0
        public UsersController(IUserService userService, CmimDBContext context)
        {
            _userService = userService;
            _context     = context;
            //if(_context.Users.)
            var user = new User
            {
                FirstName = "dfé",
                LastName  = "sqa",
                Username  = "******",
                Email     = "*****@*****.**",
                Password  = "******",
                Role      = Role.Admin
            };


            var user1 = new User
            {
                FirstName = "dfé",
                LastName  = "sqa",
                Username  = "******",
                Email     = "*****@*****.**",
                Password  = "******",
                Role      = Role.User
            };

            _context.Users.Add(user);
            _context.Users.Add(user1);
            _context.SaveChangesAsync();
        }
コード例 #2
0
 public EmployeesController(CmimDBContext context)
 {
     _context = context;
     //if (_context.employees.Count() == 0)
     //{
     //	_context.employees.Add(new Employee { matricule = "EMOOSDFSD", first_name = "oussama", last_name = "barrady", adresse = "adresse",company="VEM",PlaceplacdeId=1 });
     //	_context.employees.Add(new Employee { matricule = "EMSSDFDSF", first_name = "oussama", last_name = "barrady", adresse = "adresse", company = "VEAS", PlaceplacdeId = 1 });
     //	_context.employees.Add(new Employee { matricule = "EMFSDFSDF", first_name = "oussama", last_name = "barrady", adresse = "adresse", company = "VEM", PlaceplacdeId = 1 });
     //	_context.employees.Add(new Employee { matricule = "EMCVBCHFG", first_name = "oussama", last_name = "barrady", adresse = "adresse", company = "SVL", PlaceplacdeId = 1 });
     //	_context.SaveChangesAsync();
     //}
 }
コード例 #3
0
ファイル: EnfantsController.cs プロジェクト: Driss-Nfifi/CMIM
 public EnfantsController(CmimDBContext context)
 {
     _context = context;
     Console.WriteLine("ffffffffffffffffffffffff");
     //if (_context.Enfant.Count() == 0)
     //{
     //    _context.Enfant.Add(new Enfant { employeematricule = "EMCVBCHFG", DateNs = DateTime.Now, DateVs = DateTime.Now, Firstname = "Oussama", Lastname = "barrady", ConjointId = 37 });
     //    _context.Enfant.Add(new Enfant { employeematricule = "EMCVBCHFG", DateNs = DateTime.Now, DateVs = DateTime.Now, Firstname = "cccew", Lastname = "ecwce", ConjointId = 37 });
     //    _context.Enfant.Add(new Enfant { employeematricule = "EMCVBCHFG", DateNs = DateTime.Now, DateVs = DateTime.Now, Firstname = "hgfhhf", Lastname = "cwecwef", ConjointId = 37 });
     //    _context.Enfant.Add(new Enfant { employeematricule = "EMCVBCHFG", DateNs = DateTime.Now, DateVs = DateTime.Now, Firstname = "vbnbvn", Lastname = "tertert", ConjointId = 37 });
     //    _context.SaveChangesAsync();
     //}
 }
コード例 #4
0
 public DossiersController(CmimDBContext context)
 {
     _context = context;
     //var emp = _context.employees.Include(b => b.dossies).First();
     //var dos = new Dossier
     //{
     //	referance = "RF123456",
     //	date = DateTime.Now,
     //	montant = 10000,
     //	avance = 1069,
     //	rembourse = 1000,
     //	diff = 69,
     //	etat = "ouvert"
     //};
     //_context.SaveChangesAsync();
 }
コード例 #5
0
 public UsersController(IUserService userService, CmimDBContext context)
 {
     _userService = userService;
     _context     = context;
     if (_context.Users.Where(U => U.Role == "Admin").Count() == 0)
     {
         _context.Users.Add(new CMIM.Models.User
         {
             Etat      = true,
             FirstName = "Administrateur",
             LastName  = "Administrateur",
             Password  = "******",
             Role      = Role.Admin,
             Username  = "******"
         });
         _context.SaveChangesAsync();
     }
 }
コード例 #6
0
ファイル: BuController.cs プロジェクト: Driss-Nfifi/CMIM
 public BuController(CmimDBContext context)
 {
     _context = context;
     if (_context.bu.Count() == 0)
     {
         _context.bu.Add(new BU {
             name = "Act1"
         });
         _context.bu.Add(new BU {
             name = "Act2"
         });
         _context.bu.Add(new BU {
             name = "Act3"
         });
         _context.bu.Add(new BU {
             name = "Act4"
         });
         _context.SaveChangesAsync();
     }
 }
コード例 #7
0
 public ActivityPlacesController(CmimDBContext context)
 {
     _context = context;
     if (_context.ActivityPlace.Count() == 0)
     {
         _context.ActivityPlace.Add(new ActivityPlace {
             name = "Act1"
         });
         _context.ActivityPlace.Add(new ActivityPlace {
             name = "Act2"
         });
         _context.ActivityPlace.Add(new ActivityPlace {
             name = "Act3"
         });
         _context.ActivityPlace.Add(new ActivityPlace {
             name = "Act4"
         });
         _context.SaveChangesAsync();
     }
 }
コード例 #8
0
 public SiteController(CmimDBContext context)
 {
     _context = context;
     if (_context.ActivityPlace.Count() == 0)
     {
         _context.sites.Add(new Site {
             name = "site1"
         });
         _context.sites.Add(new Site {
             name = "site2"
         });
         _context.sites.Add(new Site {
             name = "site3"
         });
         _context.sites.Add(new Site {
             name = "site4"
         });
         _context.SaveChangesAsync();
     }
 }
コード例 #9
0
 public EmployeesController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #10
0
 public BuController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #11
0
ファイル: list.cs プロジェクト: Driss-Nfifi/CMIM
 public list(CmimDBContext contextd)
 {
     context = contextd;
 }
コード例 #12
0
 public Remboussement(CmimDBContext dcontext)
 {
     context = dcontext;
 }
コード例 #13
0
 public StatistiqueController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #14
0
 public RegularisationController(CmimDBContext context)
 {
     _context = context;
 }
 public GetEmployeesForSelectControllerController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #16
0
 public SiteController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #17
0
 public DashboardController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #18
0
 public UserService(IOptions <AppSettings> appSettings, CmimDBContext context)
 {
     _appSettings = appSettings.Value;
     _context     = context;
     _users       = _context.Users.ToList();
 }
コード例 #19
0
ファイル: NonPayee.cs プロジェクト: Driss-Nfifi/CMIM
 public NonPayee(CmimDBContext context)
 {
     this._context = context;
 }
コード例 #20
0
 public BordereauxController(CmimDBContext context)
 {
     _context = context;
 }
コード例 #21
0
 public ActivityPlacesController(CmimDBContext context)
 {
     _context = context;
 }