public LigneGantt(employe emp) { this.idEmploye = emp.id_employe; this.valeurs = new List<JourEmp>(); this.nomEmploye = emp.prenom + " " + emp.nom.ToUpper(); this.nomService = emp.groupe.nom; }
public EmailInfoConnexion(employe emp) { this.nom_employe = emp.nom; this.prenom_employe = emp.prenom; this.identifiant = emp.utilisateur.identifiant; this.password = emp.utilisateur.mot_passe; this.horairesMat = emp.horaires_matin + "-" + emp.horaires_matin_fin; this.horairesApres = emp.horaires_apresmidi + "-" + emp.horaires_apresmidi_fin; this.email = emp.email; this.tache = emp.tache.nom_tache; this.service = emp.groupe.nom; }
public ActionResult Editer(UtilisateurView userview) { if (ModelState.IsValid) { employe emp; if (userview.id==null) { emp = new employe(); utilisateur user = new utilisateur(); emp.utilisateur = user; emp.utilisateur.mot_passe = this.RandomString(); } else { emp = cnx.employe.Where(e => e.id_employe == userview.id).Single(); } emp.updateFromView(userview); emp.utilisateur.UpdateFromView(userview); if (emp.isUnique()) { if (userview.id == null) { cnx.employe.AddObject(emp); cnx.SaveChanges(); // on envoie un email à l'employé EmailInfoConnexion email = new EmailInfoConnexion(emp); new MailController().BienvenueEmail(email).Deliver(); } else { cnx.ObjectStateManager.ChangeObjectState(emp, EntityState.Modified); cnx.SaveChanges(); } return Json(new { succes = 1 }); } else { ModelState.AddModelError("", "Votre identifiant doit être unique"); } } return Json(new { succes = 0, erreurs = ModelState.ListeErreurs() }); }
/// <summary> /// Create a new employe object. /// </summary> /// <param name="id_employe">Initial value of the id_employe property.</param> public static employe Createemploye(global::System.Int32 id_employe) { employe employe = new employe(); employe.id_employe = id_employe; return employe; }
/// <summary> /// Deprecated Method for adding a new object to the employe EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToemploye(employe employe) { base.AddObject("employe", employe); }
public void UpadeEmploye(employe emp) { this.nom_employe = emp.nom; this.prenom_employe = emp.prenom; this.id_employe = emp.id_employe; }
public void updateFromModel(employe emp) { this.id=emp.id_employe; this.nom=emp.nom; this.prenom = emp.prenom; this.email = emp.email; this.id_groupe = emp.id_groupe; this.id_role = emp.id_role; this.id_tache = emp.id_tache; this.horaires_matin = emp.horaires_matin; this.horaires_matin_fin = emp.horaires_matin_fin; this.horaires_apresmidi_fin = emp.horaires_apresmidi_fin; this.horaires_apresmidi = emp.horaires_apresmidi; this.identifiant = emp.utilisateur.identifiant; }