Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            liste.Add(new Personel());
            string psayi = liste.Count.ToString();

            lbl_personel_sayi.Text = Resources.sablon1.Replace("0", psayi);
            string ort = liste.Average(x => x.Maas).ToString("C");

            lbl_ort_maas.Text = Resources.sablon2.Replace("0", ort);
            Personel son = liste.Last();

            lblYas.Text  = Resources.sablon3.Replace("0", son.Yas.ToString());
            lblMaas.Text = Resources.sablon4.Replace("0", son.Maas.ToString());
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            liste.Add(new Personel());
            string psayisi = liste.Count.ToString();

            lbl_personelsayi.Text = Resources.sablon1.Replace("0", psayisi);
            string ort = liste.Average(x => x.Maas).ToString("C"); //("C") tl cinsinden gösteriyor kuruşuyla berber

            lbl_personelmaasortalama.Text = Resources.sablon2.Replace("0", ort);
            liste.Last();
            Personel sonkisi = liste.Last();

            lbl_maas.Text        = Resources.sablon4.Replace("0", sonkisi.Maas.ToString());
            lbl_personelyas.Text = Resources.sablon3.Replace("0", sonkisi.Yas.ToString());
        }
Exemplo n.º 3
0
        private void btn_NewEmployee_Click(object sender, EventArgs e)
        {
            liste.Add(new Personel());

            string psayi = liste.Count.ToString();

            lbl_EmployeeCount.Text = Resources.sablon1.Replace("0", psayi);

            string ort = liste.Average(x => x.Maas).ToString("C"); // C --> para birimi olduğunu belirtir.

            lbl_AvgSalary.Text = Resources.sablon2.Replace("0", ort);
            Personel son = liste.Last();

            lbl_Age.Text    = Resources.sablon3.Replace("0", son.Yas.ToString());
            lbl_Salary.Text = Resources.sablon4.Replace("0", son.Maas.ToString());
        }
Exemplo n.º 4
0
        private void btn_yeniPers_Click(object sender, EventArgs e)
        {
            liste.Add(new Personel());
            string pSayi = liste.Count.ToString();

            lbl_personel_sayi.Text = Properties.Resources.sablon1.Replace("0", pSayi);
            string ortMaas = liste.Average(x => x.Maas).ToString("C");

            lbl_ort_maas.Text = Resources.sablon2.Replace("0", ortMaas);

            /*
             * var sonYas = liste.Last().Yas.ToString();
             * lbl_yas.Text = Resources.sablon3.Replace("0", sonYas);
             * var sonMaas = liste.Last().Maas.ToString();
             * lbl_maas.Text = Resources.sablon4.Replace("0", sonMaas);
             */
            Personel p1 = liste.Last();

            lbl_yas.Text  = Resources.sablon3.Replace("0", p1.Yas.ToString());
            lbl_maas.Text = Resources.sablon3.Replace("0", p1.Maas.ToString());
        }