private void button5_Click(object sender, EventArgs e) { DataLogic.MUSTERI musteri = new DataLogic.MUSTERI(); Entities.MUSTERI d = new Entities.MUSTERI(); d.AdiSoyadi = textBox1.Text; d.Telefonu = textBox2.Text; d.Adresi = textBox3.Text; int a = -1; if (textBoxID.Text != "") //ID nin tutulduğu textBox { d.MusteriID = Convert.ToInt32(textBoxID.Text); a = musteri.guncelleMusteri(d); } else { a = musteri.kaydetMusteri(d); } if (a == 1) { MessageBox.Show("İşleminiz Gerçekleştirildi", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Information); temizle(); musterileriGetir(); } else { MessageBox.Show("İşleminiz Yapılamadı", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
async void LoginAction() { IsBusy = true; var SuankiKullanici = _kullaniciRepository.QueryKullaniciAsync(x => x.Adi == Email && x.Sifre == Password).GetAwaiter().GetResult().FirstOrDefault(); if (SuankiKullanici.IsNull()) { var sorularPage = new SorularSayfasi(); var HastaneKayitSayfasi = new HastaneKayit(); var DoktorKayitSayfasi = new DoktorKayit(); AnaEkran anaekran = new AnaEkran(); EnteredUserInfos.Current = SuankiKullanici; IsBusy = false; var doktorHemsiresayfasi = new DoktorHemsireSayfasi(); //Navigation.PushModalAsync(new NavigationPage(doktorHemsiresayfasi)).GetAwaiter(); //doktorHemsiresayfasi.BindingContext = new DoktorHemsireSayfasiViewModel(Navigation, _sorularRepository, // _doktorRepository, _hastaneRepository, // _hemsireRepository, _odaRepository, // _koridorRepository, _nesneRepository); //Navigation.PushModalAsync(DoktorKayitSayfasi).GetAwaiter(); // DoktorKayitSayfasi.BindingContext = new DoktorKayitViewModel(_doktorRepository,_hastaneRepository); // ---- Navigation.PushModalAsync(new NavigationPage(anaekran)).GetAwaiter(); anaekran.BindingContext = new AnaEkranViewModel(Navigation, _sorularRepository, _doktorRepository, _hastaneRepository, _hemsireRepository, _odaRepository, _koridorRepository, _nesneRepository, _kullaniciRepository); } else { Application.Current.MainPage.DisplayAlert("Hata", "Hatali giriþ yaptýnýz", "OK").GetAwaiter(); IsBusy = false; // ------ // Navigation.PushModalAsync(HastaneKayitSayfasi).GetAwaiter(); // HastaneKayitSayfasi.BindingContext = new HastaneKayitViewModel(_hastaneRepository); // Navigation.PushModalAsync(sorularPage).GetAwaiter(); // sorularPage.BindingContext = new SorularViewModel(_sorularRepository); } //TODO - perform your login action + navigate to the next page //Simulate an API call to show busy/progress indicator // Task.Delay(20000).ContinueWith((t) => IsBusy = false); //Show the Cancel button after X seconds //Task.Delay(5000).ContinueWith((t) => IsShowCancel = true); }
private void button5_Click(object sender, EventArgs e) { DataLogic.KULLANICILAR kullanicilar = new DataLogic.KULLANICILAR(); Entities.KULLANICILAR d = new Entities.KULLANICILAR(); d.AdSoyad = textBox1.Text; d.KullaniciAdi = textBox2.Text; d.Sifre = textBox3.Text; if (comboBox1.SelectedIndex == 0) { d.KullaniciTuru = true; } else { d.KullaniciTuru = false; } int a = -1; if (textBoxID.Text != "") //ID nin tutulduğu textBox { d.KullanicilarID = Convert.ToInt32(textBoxID.Text); a = kullanicilar.guncelleKullanicilar(d); } else { a = kullanicilar.kaydetKullanicilar(d); } if (a == 2 || a == 3) { MessageBox.Show("İşleminiz Gerçekleştirildi", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Information); temizle(); } else { MessageBox.Show("İşleminiz Yapılamadı", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Error); } tabloyuDoldur(); }
private void button2_Click(object sender, EventArgs e) { if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "" || textBox4.Text.Trim() == "" || comboBox1.SelectedIndex == -1 || comboBox2.SelectedIndex == -1) { MessageBox.Show("Bütün Alanlar Doldurulmak Zorundadır", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } DataLogic.URUN urun = new DataLogic.URUN(); Entities.URUN d = new Entities.URUN(); d.Adi = textBox1.Text.ToUpper(); d.Barkodu = textBox2.Text; d.SatisFiyati = Convert.ToDouble(textBox4.Text); d.BirimID = Convert.ToInt32(comboBox1.SelectedValue.ToString()); d.KategoriID = Convert.ToInt32(comboBox2.SelectedValue.ToString()); int a = -1; if (textBoxID.Text != "") //ID nin tutulduğu textBox { d.UrunID = Convert.ToInt32(textBoxID.Text); a = urun.guncelleUrun(d); } else { a = urun.kaydetUrun(d); } if (a == 1) { MessageBox.Show("İşleminiz Gerçekleştirildi", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Information); temizle(); urunleriGetir(); } else { MessageBox.Show("İşleminiz Yapılamadı", "Satış Programı", MessageBoxButtons.OK, MessageBoxIcon.Error); } }