public string Serialize() => string.Join(";", FirstName, LastName, Email, Birthdate.ToString("d.M.yyyy.", null), Enum.GetName(typeof(WorkStatuses), WorkStatus), IsAccreditationPrinted.ToString(), CreatedOn.ToString(Constants.DateTimeFormat, null));
public override string ToString() { return("Id: " + Id + "\r\nEmployeeName: " + EmployeeName + "\r\nBirthdate: " + Birthdate.ToString("MM/dd/yyyy") + "\r\nSalary: " + Salary + "\r\nDateHired: " + DateHired.ToString("MM/dd/yyyy") + "\r\nInvalid: " + (Invalid ? "invalid" : "valid") + "\r\n\r\n"); }
public override object Clone() { return(new Manager( FirstName, LastName, Birthdate.ToString("d"), Pesel, gender, experience )); }
public override string ToString() { return ("---" + Environment.NewLine + "ID " + Id + Environment.NewLine + " Name : " + FirstName + " " + LastName + Environment.NewLine + " Birthdate : " + Birthdate.ToString() + " nullable " + (NullableBirthdate != null ? NullableBirthdate.ToString() : "(null)") + Environment.NewLine + " Age : " + Age + " nullable " + (NullableAge != null ? NullableAge.ToString() : "(null)") + Environment.NewLine + " Type : " + Type.ToString() + " nullable " + NullableType + Environment.NewLine + " Notes : " + Notes + Environment.NewLine + " Handsome : " + IsHandsome); }
public string ToJson() { return($@" {{ ""Id"": ""{Id}"", ""Number"": {Number}, ""Address"": {{ ""Street"": ""{Address.Street}"", ""HouseNumber"": ""{Address.HouseNumber}"" }}, ""UserName"": ""{UserName}"", ""Birthdate"": ""{Birthdate.ToString("s")}"" }}".Replace("\r\n", "")); }
public override string ToString() { return($"1. Фамилия: {Lastname}\n" + $"2. Имя: {Firstname}\n" + $"3. Отчество: {(Midname != null && Midname.Length > 0 ? Midname : "не указано")}\n" + $"4. Номер телефона: {Phonenumber}\n" + $"5. Страна: {Country}\n" + $"6. Дата рождения: {(Birthdate.Ticks != 0 ? Birthdate.ToString("dd.MM.yyyy") : "не указано")}\n" + $"7. Организация: {(Organisation != null && Organisation.Length > 0 ? Organisation : "не указано")}\n" + $"8. Должность: {(Position != null && Position.Length > 0 ? Position : "не указано")}\n" + $"9. Заметки: {(Other != null && Other.Length > 0 ? Other : "не указано")}\n"); }
public string ToString() { return($"STUDENT: {Environment.NewLine}" + $"Index: {Index.ToString()}, {Environment.NewLine}" + $"Imie: { FirstName.ToString() }, Naziwsko: {LastName.ToString()},{Environment.NewLine}" + $"Data Urodzenia: {Birthdate.ToString()},{Environment.NewLine}" + $"Email: {Email.ToString()},{Environment.NewLine}" + $"Imie Matki: {MothersName.ToString()}, Imie Ojca: {FathersName.ToString()}, {Environment.NewLine}" + $"Kierunek Studiów: {StudiesName.ToString()}, Tryb: {StudiesType.ToString()}{Environment.NewLine}" + $"########################################################################## {Environment.NewLine } {Environment.NewLine }" ); }
// Generate new social security number based on birthdate. public void GenerateSocialSec() { Random rng = new Random(); SocialSecNr = Birthdate.ToString("yyMMdd") + rng.Next(99).ToString().PadLeft(2, '0'); for (int i = 1; i <= 2; i++) { int randomnr = rng.Next(9999); SocialSecNr += " " + randomnr.ToString().PadLeft(4, '0'); } }
public override object Clone() { return(new Member( FirstName, LastName, Birthdate.ToString("d"), Pesel, gender, position, registrationDate.ToString("d") )); }
public void WriteString() { Clear(); Write("Для вывода введите номер элемента\n 0 - выход\n 1 - имя\n 2 - фамилия\n 3 - возраст\n 4 - рост\n 5 - вес\n 6 - национальность\n" + " 7 - день рождения\n 8 - пол\n 9 - имя отца\n 10 - имя матери\n 11 - оклад\n 12 - трудовой стаж\n 13 - стаж в руководящей должности\n" + " 14 - множитель за другие заслуги\n 15 - кол-во дней больничного\n 16 - кол-во дней отпуска\n 17 - образование\n" + " 18 - специализация\n 19 - должность\n "); int choose = int.Parse(ReadLine()); switch (choose) { case 0: return; case 1: WriteLine(_Name.Name); break; case 2: WriteLine(_Name.Surname); break; case 3: WriteLine(Age); break; case 4: WriteLine(High); break; case 5: WriteLine(Weight); break; case 6: WriteLine(Nationality); break; case 7: WriteLine(Birthdate.ToString("D")); break; case 8: WriteLine(Sex); break; case 9: WriteLine(_parent[0]); break; case 10: WriteLine(_parent[1]); break; case 11: WriteLine(Salary); break; case 12: WriteLine(EmploymentHistory); break; case 13: WriteLine(ManagerialExperience); break; case 14: WriteLine(OtherAllowances); break; case 15: WriteLine(DaysOfSick); break; case 16: WriteLine(DaysOfVacation); break; case 17: WriteLine(Education); break; case 18: WriteLine(Specialization); break; case 19: WriteLine(Job); break; } }
public override string ToString() { string familyStatus; if (FamilyStatus) { familyStatus = "женат/замужем"; } else { familyStatus = "холост/не замужем"; } string dB = Birthdate.ToString("dd.MM.yy"); return("ФИО: " + Name + " " + Surname + "\n\nЛичные данные: " + "\n\tНомер паспорта: " + PassportData + ", \n\tНомер телефона: " + Tel + ", \n\tСемейный статус: " + familyStatus + ", \n\tДата рождения: " + dB + ", \n\tEmail: " + Email); }
public override string ToString() { return($"Name: {Name} (ID {ID})\nAnimal Type: {Type}\nColor: {Color}\nBirthDate: {Birthdate.ToString("dd/MM/yyyy")}" + $"\nPrice: {Price.ToString("n2")} DKK\nStatus: {((Owner == null) ? "NOT SOLD" : $"SOLD TO {Owner.FirstName} {Owner.LastName} ({SoldDate})")}");
public override string ToString() { return("User name: " + Name + ", he/she " + Age + " years old, " + "and birthday: " + Birthdate.ToString()); }
public String ToString() { return($"{Firstname} {Lastname} - {Birthdate.ToString("dd.MM.yyyy")} [{IsMale}, {HasDriversLicence}]"); }
public override string ToString() { return(string.Format("{0} {1}, born in {2}, loves {3} color, is a {4}", Name, LastName, Birthdate.ToString("M/d/yyyy"), FavoriteColor, Gender)); }
public override string ToString() { return($"Id: {Id}, Firstname: {Firstname}, Lastname: {Lastname}, " + $"Birthdate: {Birthdate.ToString("dd/MM/yyyy")}, Email: {Email}"); }
private async void RegisterBtn_Clicked(object sender, EventArgs e) { try { isenabled = false; string userdata = ""; Boolean isvalid = true; if (Username.Text == "" || Username.Text.Length < 5) { requser.IsVisible = true; isvalid = false; } if (Email.Text == "" || Email.TextColor == Color.Red) { reqemail.IsVisible = true; isvalid = false; } if (Password.Text == "" || Password.Text.Length < 8) { reqpass.IsVisible = true; isvalid = false; } if (nationalid.Text.Length != 14) { reqssn.IsVisible = true; isvalid = false; } if (phonenum.Text.Length != 11) { reqphonenum.IsVisible = true; isvalid = false; } if (Birthdate.ToString() == "") { reqAge.IsVisible = true; isvalid = false; } if (isvalid) { var client = new HttpClient(); client.BaseAddress = new Uri(Settings.Ngrok + "Patient/Registration"); userdata = JsonConvert.SerializeObject(user); var content = new StringContent(userdata, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PostAsync("Registration", content); if (response.IsSuccessStatusCode) { await Navigation.PopModalAsync(); await Navigation.PushModalAsync(new MainPage()); } else { DependencyService.Get <Toast>().Show("Faild"); } } else { DependencyService.Get <Toast>().Show("Check Data Again"); } } catch (Exception exception) { DependencyService.Get <Toast>().Show("No internet connection"); } isenabled = true; }