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(); }
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(); //} }
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(); //} }
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(); }
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(); } }
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(); } }
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(); } }
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(); } }
public EmployeesController(CmimDBContext context) { _context = context; }
public BuController(CmimDBContext context) { _context = context; }
public list(CmimDBContext contextd) { context = contextd; }
public Remboussement(CmimDBContext dcontext) { context = dcontext; }
public StatistiqueController(CmimDBContext context) { _context = context; }
public RegularisationController(CmimDBContext context) { _context = context; }
public GetEmployeesForSelectControllerController(CmimDBContext context) { _context = context; }
public SiteController(CmimDBContext context) { _context = context; }
public DashboardController(CmimDBContext context) { _context = context; }
public UserService(IOptions <AppSettings> appSettings, CmimDBContext context) { _appSettings = appSettings.Value; _context = context; _users = _context.Users.ToList(); }
public NonPayee(CmimDBContext context) { this._context = context; }
public BordereauxController(CmimDBContext context) { _context = context; }
public ActivityPlacesController(CmimDBContext context) { _context = context; }