Beispiel #1
0
        private void btnBul_Click(object sender, EventArgs e)
        {
            OdaBL      obl = new OdaBL();
            MusteriBL  mbl = new MusteriBL();
            Musteri    m   = mbl.MusteriBul(txtTcKNo.Text);
            frmMusteri frm = (frmMusteri)Application.OpenForms["frmMusteri"];

            frm.MusteriID       = m.MusteriKayitID;
            frm.txtEAdi.Text    = m.Ad;
            frm.txtESoyadi.Text = m.Soyad;
            frm.txtETcKNo.Text  = m.TcKNo;
            frm.dtpECikTar.Text = m.CikTar.ToString();
            if (obl.MusOdaBosalt(m.OdaNo))
            {
                List <Oda> lst = obl.BosOdaListesi();
                lst.Insert(0, new Oda {
                    OdaNoAndTip = "----Seçiniz----"
                });
                frm.cmEBosOda.DataSource    = lst;
                frm.cmEBosOda.SelectedValue = m.OdaNo;
            }
            frm.dtpEGirTar.Text   = m.GirTar.ToString();
            frm.btnMusEkle.Text   = "Güncelle";
            frm.BtnSil.Visible    = true;
            frm.btnVazgec.Visible = true;
            frm.Text = "Müşteri Güncelleme";
            this.Dispose();
        }
Beispiel #2
0
        private void btnara_Click(object sender, EventArgs e)
        {
            MusteriBL mbl  = new MusteriBL();
            Musteri   mstr = mbl.MusteriBul(txtmustericep.Text);

            if (mstr == null)
            {
                MessageBox.Show("Müşteri Bulunamadı!");
            }
            else
            {
                form1.musteriid         = mstr.Musteriid;
                form1.txtad.Text        = mstr.Musteriad;
                form1.txtsoyad.Text     = mstr.Musterisoyad;
                form1.txtcep.Text       = mstr.Mustericep;
                form1.txtadres.Text     = mstr.Musteriadres;
                form1.txtmail.Text      = mstr.Musterimail;
                form1.btnvazgec.Visible = true;
                form1.btnekle.Text      = "Güncelle";
                form1.btnsil.Visible    = true;
                this.Visible            = false;
            }
        }