Exemple #1
0
 public void deleteEmployer(BE.Employer em)
 {
     if (getEmployer(em.idOrNumber) == null)
     {
         throw new Exception("ERROR :this employer doesn't exist");
     }
     else
     {
         DataSources.employerList.Remove(em);
     }
 }
Exemple #2
0
        private XElement ConvertEmployer(BE.Employer employer)
        {
            XElement newEmployer = new XElement("employers",
                                                new XElement("employerID", employer.Id),
                                                new XElement("Isprivate", employer.IsPrivate),
                                                new XElement("Lastname", employer.LastName),
                                                new XElement("Firstname", employer.FirstName),
                                                new XElement("Companyname", employer.CompanyName),
                                                new XElement("PhoneNumber", employer.PhoneNumber),
                                                new XElement("adress", employer.Adress),
                                                new XElement("CompanyDateCreation", employer.CompanyDateCreation),
                                                new XElement("dateContractSigned", employer.DateContractSigned),
                                                new XElement("domain", employer.Domain)
                                                );

            return(newEmployer);
        }
Exemple #3
0
        private XElement Convertemployer(BE.Employer employer)
        {
            XElement newemployer = new XElement("employer",
                                                new XElement("ID", employer.companyID),
                                                //  new XElement("company name", employer.companyName),

                                                new XElement("lastname", employer.lastName),
                                                new XElement("firstname", employer.firstName),
                                                new XElement("phone", employer.phone),
                                                new XElement("adresse", employer.adresse),
                                                new XElement("city", employer.city),

                                                                                            //  new XElement("creation date", employer.creationDate),
                                                new XElement("discipline", employer.discipline),
                                                                                            // new XElement("number employee", employer.numberEmployee),
                                                new XElement("private", employer.isPrivate) /* */
                                                );

            return(newemployer);
        }
Exemple #4
0
        public override bool Equals(object obj)
        {
            Employer other = obj as Employer;

            return(other != null && other.id == id);
        }
Exemple #5
0
 public Contract(Employer e, Worker w)
 {
     EmployerID = e.ID;
     WorkerID   = w.ID;
 }