private void Save_Click(object sender, EventArgs e) { person.name = Ad.Text; person.Surname = Soyad.Text; person.phone = Phone.Text; person.mail = Mail.Text; person.home_adr = Home_adress.Text; person.work_adr = Work_adress.Text; people.Add(person); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine($"Ad: {person.name}"); stringBuilder.AppendLine($"Soyad: {person.Surname}"); stringBuilder.AppendLine($"Tel: {person.phone}"); stringBuilder.AppendLine($"Mail: {person.mail}"); stringBuilder.AppendLine($"Ev ünvanı: {person.home_adr}"); stringBuilder.AppendLine($"İş ünvanı: {person.work_adr}"); MessageBox.Show(stringBuilder.ToString(), "Məlumatlar"); Ad.Clear(); Soyad.Clear(); Phone.Clear(); Mail.Clear(); Work_adress.Clear(); Home_adress.Clear(); panel3.Visible = false; panel2.Visible = false; }
private IQueryable <BaseType.Ogrenci> SoyadQuery(IQueryable <BaseType.Ogrenci> queryable) { if (!string.IsNullOrEmpty(Soyad)) { return(queryable.Where(s => s.Soyad.Trim().ToLower().Contains(Soyad.Trim().ToLower()))); } return(queryable); }
public int CompareTo(object obj) { Person p = (Person)obj; int sonuc = Yas.CompareTo(p.Yas); if (sonuc == 0) { sonuc = Ad.CompareTo(p.Ad); if (sonuc == 0) { sonuc = Soyad.CompareTo(p.Soyad); } } return(sonuc); }
public string BasHarfler() => $"{Ad.Substring(0,1)}.{Soyad.Substring(0,1)}.";