public override string ToString() { return($"Full Name: {FullName}\n" + $"Date of Birth: {BirthDay.ToShortDateString()}\n" + $"Place of Birth: {PlaceOfBirth}\n" + $"Passport ID: {PassportId}\n"); }
/// <summary> /// Calculates the Ages of each Household Member and sets those values in the form and in the database /// </summary> public bool calcAllHHMemAges(DateTime BaseDate) { int[] AgeGroupsTotals = new int[6] { 0, 0, 0, 0, 0, 0 }; DateTime BirthDay; if (clsHH.UseFamilyList == true) { for (int i = 0; i < clsHHmem.RowCount; i++) { HHMemberItem clsHHMemberItem = new HHMemberItem(clsHHmem.DSet.Tables[0].Rows[i], clsHHmem.DSet.Tables[0].Columns, null, null); int newAge = 0; if (clsHHMemberItem.Inactive == false && clsHHMemberItem.NotCounted == false) { newAge = clsHHMemberItem.Age; if (clsHHMemberItem.UseAge == false || (clsHHMemberItem.BirthDate.ToShortDateString() != CCFBGlobal.OURNULLDATE && clsHHMemberItem.BirthDate.ToShortDateString() != CCFBGlobal.OUROTHERNULLDATE)) { BirthDay = clsHHMemberItem.BirthDate; if (BirthDay != null && BirthDay.ToShortDateString() != "" && BirthDay != DateTime.MaxValue) { newAge = CCFBGlobal.calcAge(BirthDay, BaseDate); clsHHMemberItem.Age = newAge; } } clsHHMemberItem.AgeGroup = clsHHmem.GetEFAPAgeGroup(newAge); AgeGroupsTotals[clsHHMemberItem.AgeGroup]++; } } int totalFamily = AgeGroupsTotals[CCFBGlobal.ageGroup_Infant] + AgeGroupsTotals[CCFBGlobal.ageGroup_Youth] + AgeGroupsTotals[CCFBGlobal.ageGroup_Teen] + AgeGroupsTotals[CCFBGlobal.ageGroup_Eighteen] + AgeGroupsTotals[CCFBGlobal.ageGroup_Adult] + AgeGroupsTotals[CCFBGlobal.ageGroup_Senior]; if (clsHH.Infants != AgeGroupsTotals[CCFBGlobal.ageGroup_Infant] || clsHH.Youth != AgeGroupsTotals[CCFBGlobal.ageGroup_Youth] || clsHH.Teens != AgeGroupsTotals[CCFBGlobal.ageGroup_Teen] || clsHH.Eighteens != AgeGroupsTotals[CCFBGlobal.ageGroup_Eighteen] || clsHH.Adults != AgeGroupsTotals[CCFBGlobal.ageGroup_Adult] || clsHH.Seniors != AgeGroupsTotals[CCFBGlobal.ageGroup_Senior] || clsHH.TotalFamily != totalFamily) { clsHH.Infants = AgeGroupsTotals[CCFBGlobal.ageGroup_Infant]; clsHH.Youth = AgeGroupsTotals[CCFBGlobal.ageGroup_Youth]; clsHH.Teens = AgeGroupsTotals[CCFBGlobal.ageGroup_Teen]; clsHH.Eighteens = AgeGroupsTotals[CCFBGlobal.ageGroup_Eighteen]; clsHH.Adults = AgeGroupsTotals[CCFBGlobal.ageGroup_Adult]; clsHH.Seniors = AgeGroupsTotals[CCFBGlobal.ageGroup_Senior]; clsHH.TotalFamily = totalFamily; return(true); } } return(false); }
public override string ToString() { var sb = new StringBuilder(); sb.AppendLine($"FirstName: {FirstName}"); sb.AppendLine($"LastName: {LastName}"); sb.AppendLine($"BirthDay: {BirthDay.ToShortDateString()}"); sb.AppendLine($"Gender: {Gender}"); sb.AppendLine($"Status: {Status}"); sb.AppendLine($"Recommendations: {Recommendations}"); sb.AppendLine($"Owns: {Owns}"); return(sb.ToString().Trim()); }
public string getVCard() { string result = "BEGIN:VCARD\r\nVERSION:3.0\r\n"; result += getNamevCard() + "\r\n"; //N: result += "FN:" + Fullname + "\r\n"; //FN: foreach (var ad in Addresses) //ADR: { result += ad.getvCardString + "\r\n"; } foreach (var em in Emails) //EMAIL: { result += "EMAIL:" + em.Address + "\r\n"; } foreach (var tel in Numbers) //TEL: { result += tel.getvCardString + "\r\n"; } foreach (string url in Urls) //URL { result += "URL:" + url + "\r\n"; } result += BirthDay.Year != 1 ? "BDAY:" + BirthDay.ToShortDateString() + "\r\n" : ""; result += Note != "" ? "NOTE:" + Note + "\r\n" : ""; result += Organization != "" ? "ORG:" + Organization + "\r\n" : ""; result += RoleInOrg != "" ? "ROLE:" + RoleInOrg + "\r\n" : ""; result += JobTitle != "" ? "TITLE:" + JobTitle + "\r\n" : ""; result += TimeZone != "" ? "TZ:" + TimeZone + "\r\n" : ""; result += Revision.Year == 1 ? "REV:" + Revision.ToString() + "\r\n" : ""; result += Photo != null?getImagevCard() : ""; result += "\r\n"; result += "END:VCARD\r\n"; return(result); }
public override string ToString() { return(String.Format(ID + "; " + Surname + "; " + Name + "; " + SecondName + "; " + BirthDay.ToShortDateString() + "; " + EmploymentDate.ToShortDateString() + "; " + Position + "; " + Division + "; " + Room + "; " + Phone + "; " + Email + "; " + Salary + "; " + Notes)); }
public override string ToString() { return(Surname + " " + Name + " " + SecondName + " (" + Sex + ", " + BirthDay.ToShortDateString() + ")"); }
public override string ToString() { return($"{FullName} {BirthDay.ToShortDateString()} {Phone} {Email} {Address} {Debt}"); }
public override string ToString() { return($"{LastName} {FirstName} {MiddleName}, дата рождения: {BirthDay.ToShortDateString()}, {UserAge} лет/год(а) "); }
public override string ToString() { return($"Name: {Name}, Surname: {Surname}BirthDay: {BirthDay.ToShortDateString()}, {StudentCard}"); }
public int CompareTo(Student other) { return(string.Compare(string.Concat(this, $"{BirthDay.ToShortDateString()}"), string.Concat(other, $"{other.BirthDay.ToShortDateString()}"))); }
public object ToLiquid() { return(new { Name, Surname, LastName, BirthDay = BirthDay.ToShortDateString(), YearsOld, Phone, City, Country, Email, Photo }); }
public override string GetBirthDayMessage() { return($"{BirthDay.ToShortDateString()} is you birthday!"); }
public override string ToString() { return($"\r\n{FirstName} {LastName} \r\nurodzony: {BirthDay.ToShortDateString()} \r\nAdres zamieszkania: {Addres} \r\nTel: {PhoneNumber} \r\nEmail: {Email} \r\nWzrost: {Height}, Waga: {Weight} \r\nŚrednie miesięczne zarobki: {MonthlyEarnings} zł(brutto)"); }
public override string ToString() { return($"Name: {Name}\nSurname: {Surname}\nFather Name: {FatherName}\nCountry: {Country}\nCity: {City}\nPhone: {Phone}\nBirthday: {BirthDay.ToShortDateString()}\nGender: {Gender}"); }
public override string ToString() { return(FirstName + " " + LastName + " " + Index + " " + Mail + " " + BirthDay.ToShortDateString() + " " + MoName + " " + FaName + " " + Studies.ToString()); }