Example #1
0
        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"));
        }
Example #3
0
 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);
     }
 }
Example #4
0
 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);
     }
 }
Example #5
0
        private void purchaseVoucherToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PurchaseVoucher pv = new PurchaseVoucher();

            pv.ShowDialog();
        }
Example #6
0
 public void Add(PurchaseVoucher voucher)
 {
     context.PurchaseVoucher.Add(voucher);
     Save();
 }