private void byn_kaydet_Click_1(object sender, EventArgs e) { int returnValue = 0; if (Temp != null) { TempDoldur(); returnValue = otomatikYikamaOperation.Guncelle(Temp.ID, Temp, yetkili_); if (returnValue > 0) { MessageBox.Show($"{Temp.Te_MusteriAdi}' ye ait Otomatik Yıkama Makinesi Güncellendi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } else { MessageBox.Show("Güncelleme Sırasında Hata Oluştu Tekrar Deneyiniz.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { Temp = new OtomatikHaliYikama(); Temp.ID = Guid.NewGuid(); Temp.MusteriID = musteri.ID; TempDoldur(); returnValue = otomatikYikamaOperation.Kaydet(Temp, yetkili_); if (returnValue > 0) { MessageBox.Show($"{Temp.Te_MusteriAdi}' Firma/Kişisine ait '{Temp.Te_UretimNo}' 'Üretim Numaralı Otomatik Yıkama Makinesi Başarıyla Eklendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information); TxtBosalt(); } else { MessageBox.Show("İşlem Sırasında Hata Oluştu", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public OtomatikYikamaEkle(Yetkili yetkili, OtomatikHaliYikama makine) { InitializeComponent(); Temp = makine; otomatikYikamaOperation = new BLLOtomatikYikamaOperation(); musteriOperation = new BLLMusteriOperation(); yetkili_ = yetkili; this.Text = "OTOMATİK YIKAMA GÜNCELLE"; }