示例#1
0
 private void frm_MusteriListele_Load(object sender, EventArgs e)
 {
     using (var musteriSoapClient = new MusteriWebServiceSoapClient())
     {
         dataGridView1.DataSource = musteriSoapClient.SelectAllMusteris();
     }
 }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (var musteriSoapClient = new MusteriWebServiceSoapClient())
     {
         dataGridView1.DataSource = musteriSoapClient.SelectAllMusteris();
     }
 }
示例#3
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            int kullaniciId;

            KullaniciService.Kullanici kullanici = new KullaniciService.Kullanici()
            {
                kullaniciAd   = txtKullaniciAdi.Text,
                kullaniciTuru = "yetkili",
                parola        = txtKullaniciSifre.Text
            };
            using (var kullaniciSoapClient = new KullaniciWebServiceSoapClient())
            {
                kullaniciSoapClient.InsertKullanici(kullanici);
                kullaniciId = kullaniciSoapClient.MaxKullaniciId();
            }
            Musteri musteri = new Musteri()
            {
                ad    = txtAd.Text,
                soyad = txtSoyad.Text
            };

            using (var musteriSoapClient = new MusteriWebServiceSoapClient())
            {
                if (musteriSoapClient.InsertMusteri(musteri))
                {
                    MessageBox.Show("Müşteri Başarıyla Eklendi");
                    txtSoyad.Text          = "";
                    txtAd.Text             = "";
                    txtKullaniciAdi.Text   = "";
                    txtKullaniciSifre.Text = "";
                }
                else
                {
                    MessageBox.Show("Kayıt Yapılırken bir hata oluştu!");
                }
            }
        }