Esempio n. 1
0
        private void BtnMusteriGiris_Click(object sender, EventArgs e)
        {
            string musteriNo = txt1KullaniciAdi.Text;
            string sifre     = txtSifre.Text;

            foreach (BireyselMusteri m in banka.bireyselMusteriler)
            {
                if (musteriNo == m.ID && sifre == m.Sifre)
                {
                    Form1 form1  = Application.OpenForms["Form"] as Form1; //Form1'e eriş
                    Panel panel1 = form1.Controls["Panel1"] as Panel;      //Form1de panele eriş
                    panel1.Controls.Clear();
                    FormMusteri formMusteri = new FormMusteri(banka, m);
                    formMusteri.TopLevel = false;
                    panel1.Controls.Add(formMusteri);
                    formMusteri.Show();
                    formMusteri.Dock = DockStyle.Fill;

                    MessageBox.Show($"HOŞGELDİNİZ. Sayın {m.Ad} {m.Soyad}");
                }
            }

            foreach (TicariMusteri m in banka.ticariMusteriler)
            {
                if (musteriNo == m.ID && sifre == m.Sifre)
                {
                    Form1 form1  = Application.OpenForms["Form"] as Form1; //Form1'e eriş
                    Panel panel1 = form1.Controls["Panel1"] as Panel;      //Form1de panele eriş
                    panel1.Controls.Clear();
                    FormMusteri formMusteri = new FormMusteri(banka, m);
                    formMusteri.TopLevel = false;
                    panel1.Controls.Add(formMusteri);
                    formMusteri.Show();
                    formMusteri.Dock = DockStyle.Fill;

                    MessageBox.Show($"HOŞGELDİNİZ. Sayın {m.Ad} {m.Soyad}");
                }
            }
        }
Esempio n. 2
0
        private void btnMusteriGiris_Click(object sender, EventArgs e) //Müşteri Girişi tıklanma olayı
        {
            string musteriNo = txtKullaniciAdi.Text;
            string sifre     = txtSifre.Text;

            foreach (BireyselMusteri m in banka.BireyselMusteriler)
            {
                if (musteriNo == m.ID && sifre == m.Sifre)
                {
                    FormAna f1     = Application.OpenForms["FormAna"] as FormAna;
                    Panel   panel1 = f1.Controls["panel1"] as Panel;
                    panel1.Controls.Clear();
                    FormMusteri formMusteri = new FormMusteri(banka, m);
                    formMusteri.TopLevel = false;
                    panel1.Controls.Add(formMusteri);
                    formMusteri.Show();
                    formMusteri.Dock = DockStyle.Fill;

                    MessageBox.Show("Hoşgeldiniz Sayın " + m.Ad + " " + m.Soyad);
                }
            }
            foreach (TicariMusteri m in banka.TicariMusteriler)
            {
                if (musteriNo == m.ID && sifre == m.Sifre)
                {
                    FormAna f1     = Application.OpenForms["FormAna"] as FormAna;
                    Panel   panel1 = f1.Controls["panel1"] as Panel;
                    panel1.Controls.Clear();
                    FormMusteri formMusteri = new FormMusteri(banka, m);
                    formMusteri.TopLevel = false;
                    panel1.Controls.Add(formMusteri);
                    formMusteri.Show();
                    formMusteri.Dock = DockStyle.Fill;

                    MessageBox.Show("Hoşgeldiniz Sayın " + m.Ad + " " + m.Soyad);
                }
            }
        }