public void Edit()
        {
            var newCandidate = new DataLayer.EfClasses.Candidate
            {
                CandidateNumber        = CandidateToEdit.CandidateNumber,
                CandidateFirstName     = FirstName,
                CandidateMiddleName    = MiddleName,
                CandidateLastName      = LastName,
                CandidateGender        = Gender,
                CandidateAddress       = Address,
                CandidateBirthDate     = Birthdate,
                CandidateContactNumber = ContactNum,
                CandidateEmail         = Email
            };

            CandidateToEdit.FirstName     = FirstName;
            CandidateToEdit.MiddleName    = MiddleName;
            CandidateToEdit.LastName      = LastName;
            CandidateToEdit.Gender        = Gender;
            CandidateToEdit.Birthdate     = Birthdate.ToShortDateString();
            CandidateToEdit.Address       = Address;
            CandidateToEdit.Email         = Email;
            CandidateToEdit.ContactNumber = ContactNum;
            CandidateToEdit.Age           = newCandidate.CandidateAge;


            _candidateService.UpdateCandidate(newCandidate);
        }
Пример #2
0
 /// <summary>
 /// Returns the Female class values: FirstName, LastName, Title, Age, Birthdate
 /// </summary>
 /// <returns>Title, FirstName, LastName, Age, Birthdate</returns>
 public override string ToString()
 {
     return("\n  [ ====== Male Person ====== ]" + "\n First Name     : " + title + ". " + firstName + "\n Last Name      : "
            + maleLastName + "\n SSN            : " + SocialSecurityNumber.ToString() + "\n Email          : " + maleEmail + "\n Age Today      : "
            + GetAge() + "\n BirthDate      : " + Birthdate.ToShortDateString() + maleInternet.ToString()
            + maleFavoriteColor.ToString() + address.ToString() + company);
 }
        public void GeneratePayslip(string root)
        {
            string path = root + " " + $"{Name}.txt";

            using StreamWriter sw = File.CreateText(path);
            {
                sw.WriteLine("------------------------------------------------------");
                sw.WriteLine($"PAYSLIP {DateTime.Now.ToString("MMMM yyyy")}");
                sw.WriteLine("------------------------------------------------------");
                sw.WriteLine($"Name                        :   {Name}");
                sw.WriteLine($"Social Securty              :   {SocialSecNr}");
                sw.WriteLine($"Bank account                :   {Bankaccount}");
                sw.WriteLine($"Sex                         :   {(Sex ? "Male" : "Female")}");
                sw.WriteLine($"Birthdate                   :   {Birthdate.ToShortDateString()}");
                sw.WriteLine($"Join date                   :   {JoinDate.ToShortDateString()}");
                sw.WriteLine($"Function                    :   {Title}");
                sw.WriteLine($"Fulltime                    :   {Hours}");
                sw.WriteLine($"Company car                 :   {(CompanyCar ? "Yes" : "No")}");
                sw.WriteLine("------------------------------------------------------");
                sw.WriteLine($"Starting salary             :   €{Print(StartingSalary)}");
                sw.WriteLine($"Seniority                   : + €{Print(AddSeniority())}");
                sw.WriteLine($"                            :   €{Print(Salary)}");
                sw.WriteLine($"Social security             : - €{Print(DeductSocialSecurity())}");
                sw.WriteLine($"                            :   €{Print(Salary)}");
                sw.WriteLine($"Withholding tax             : - €{Print(DeductWitholdingTax())}");
                sw.WriteLine($"                            :   €{Print(Salary)}");
                sw.WriteLine($"Net salary                  :   €{Print(Salary)}");
            }
        }
Пример #4
0
 public override string ToString()
 {
     return($"~ Číslo účtu: {AccountNumber,2}; " +
            $"Jméno a příjmení: {Name,2} {Surname,0}; " +
            $"Datum narození: {Birthdate.ToShortDateString(),2}; " +
            $"Typ účtu: {AccountType,2}; " +
            $"Finance: {MoneyValue,2} Kč");
 }
Пример #5
0
 public void Print()
 {
     Console.WriteLine("ФИО:{0} {1} {2}", Surname, Name, Patronymic);
     Console.WriteLine("Дата рождения:{0}", Birthdate.ToShortDateString());
     Console.WriteLine("Возраст: {0}", Age);
     Console.WriteLine("Должность: {0}", Post);
     Console.WriteLine("Стаж работы: {0}", WorkExperience);
 }
Пример #6
0
        public override string ToString()
        {
            string holder = "ID: " + ID + " - ";

            if (Title != "")
            {
                holder += title + " ";
            }
            holder += FirstName + " " + LastName + " - Birthdate: " + Birthdate.ToShortDateString();
            if (Country != "Not specified")
            {
                holder += " - " + Country;
            }
            return(holder);
        }
 public override string ToString()
 {
     return($"ID Client : {Id_client}, Nom : {Nom}, Prénom : {Prenom}, né le : {Birthdate.ToShortDateString()}, domicilé au {Adresse} {Codep} {Ville}");
 }
Пример #8
0
 public override string ToString()
 {
     return($"{Name} {Surname} - {Birthdate.ToShortDateString()} - {PersonalIdentificationNumber}");
 }
Пример #9
0
 public override string ToString()
 {
     return(FirstName + "," + LastName + "," + Address + "," + Phone + "," + Birthdate.ToShortDateString() + "," + Blood.ToFormattedString());
 }
Пример #10
0
        private void cmd_Save_Click(object sender, EventArgs e)
        {
            if (input_Validity() == true)
            {
                Database.DBRetailers edit = new Database.DBRetailers();
                edit.Update(DateRegistered, Wallet_ID, Firstname, Lastname, Birthdate, Barangay, City, Province, BlockStr);

                int selectedIndex = this.dataGridView_Retailer.CurrentCell.RowIndex;
                this.dataGridView_Retailer.Rows[selectedIndex].SetValues(Wallet_ID, DateRegistered.ToShortDateString(), Firstname, Lastname, Birthdate.ToShortDateString(), BlockStr, Barangay, City, Province);


                input_enableStatus(false);
                buttonEnable(false);
                this.cmd_Edit.Enabled = true;
            }
        }