private void cmb_receiver_SelectedIndexChanged(object sender, EventArgs e) { Payer payer = (Payer)cmb_receiver.SelectedItem; txtRAdress.Text = payer.Address.ToString(); txtRPhone.Text = payer.Phone.ToString(); txtRContactName.Text = payer.ContactName.ToString(); }
private void BtnDelete_Click(object sender, EventArgs e) { var ID = (Guid)lstPayer.SelectedValue; payer = (from p in _db.Payers where p.ID == (Guid)ID select p).SingleOrDefault(); _db.Payers.Remove(payer); _db.KontrolluKaydet(RecordDeleted); Helper.RecordReload += ListReload; }
private void BtnUpdateForm_Click(object sender, EventArgs e) { payer = lstPayer.SelectedItem as Payer; FormPayersUpdate frm = new FormPayersUpdate(payer, _db); Helper.RecordReload += ListReload; frm.MdiParent = this.MdiParent; frm.Show(); frm.RecordUpdated += ListReload; }
private void BtnAdd_Click(object sender, EventArgs e) { Payer payer = new Payer() { ID = Guid.NewGuid(), City = txtCity.Text, CompanyName = txtCompanyName.Text, ContactName = txtContactName.Text, Address = txtAddress.Text, Phone = txtPhone.Text, TypeID = Convert.ToByte(cbbMusteriType.SelectedValue) }; _db.Payers.Add(payer); _db.KontrolluKaydet(KayitGirdim); }
private void UpdatePayer() { #region Validation if (txtCompanyName.Text.Trim() == string.Empty || txtContactName.Text.Trim() == string.Empty || txtCity.Text.Trim() == string.Empty || txtPhone.Text.Trim() == string.Empty || txtAddress.Text.Trim() == string.Empty) { MessageBox.Show("Şirket adı,muhattap kişi,şehir,telefon,adres bilgileri boş bırakılamaz."); return; } #endregion _payer = (from p in SingletonDb.Context.Payers where p.ID == _payer.ID select p).SingleOrDefault(); _payer.CompanyName = txtCompanyName.Text; _payer.ContactName = txtContactName.Text; _payer.City = txtCity.Text; _payer.Phone = txtPhone.Text; _payer.Address = txtAddress.Text; _payer.TypeID = Convert.ToByte(cbxPayerType.SelectedValue); _payer.IsActive = chxActive.Checked; SingletonDb.Context.SaveChangesControll(UpdatePayerEvent); }
public FormPayersUpdate(Payer payer) { InitializeComponent(); _payer = payer; }
public FormPayersUpdate(Payer payer, SevkiyatDBEntities context) { InitializeComponent(); _payer = payer; _db = context; }
private void BtnUpdateForm_Click(object sender, EventArgs e) { Payer payer = lstPayer.SelectedItem as Payer; this.MdiBroShow <FormPayersUpdate, Payer>(payer); }
private void BtnDelete_Click(object sender, EventArgs e) { payer = lstPayer.SelectedItem as Payer; payer.IsDeleted = true; Db.Context.KontrolluKaydet(RecordDeleted); }