コード例 #1
0
        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;
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: kdrkrgz/Data-Structures
 public string BasHarfler() => $"{Ad.Substring(0,1)}.{Soyad.Substring(0,1)}.";