private void PurchaseVoucherBtn_Click(object sender, EventArgs e) { PurchaseVoucher aPurchaseVoucher = new PurchaseVoucher(); aPurchaseVoucher.Show(); //aPurchaseVoucher.MdiParent = this; UpdateMain(); }
public IActionResult SaveNew(NewPurchaseVoucherVM model) { var purchaseVoucher = new PurchaseVoucher() { VoucherCode = model.VoucherCode, ExpirationDate = model.ExpirationDate, Discount = model.Discount }; _repo.Add(purchaseVoucher); return(RedirectToAction("List")); }
private void NewPurchaseVoucherRbnBtn_Click(object sender, EventArgs e) { if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.PurchaseVoucher) == EventStatus.Permit) { PurchaseVoucher aPurchaseVoucher = new PurchaseVoucher(); __AddTabPage(aPurchaseVoucher, __PurchaseColor); } else { MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void newPurchaseVoucherToolStripMenuItem_Click(object sender, EventArgs e) { if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.PurchaseVoucher) == EventStatus.Permit) { PurchaseVoucher aPurchaseVoucher = new PurchaseVoucher(); aPurchaseVoucher.Show(); // aPurchaseVoucher.MdiParent = Helper.Instance.ActiveMainWindow; } else { MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void purchaseVoucherToolStripMenuItem_Click(object sender, EventArgs e) { PurchaseVoucher pv = new PurchaseVoucher(); pv.ShowDialog(); }
public void Add(PurchaseVoucher voucher) { context.PurchaseVoucher.Add(voucher); Save(); }