public Boolean createAdjustmentVoucher(string vID, string empID, double totalPrice)
        {
            bool status = false;
            SA43Team2StoreDBEntities ctx = new SA43Team2StoreDBEntities();
            Adjustment abo = new Adjustment();

            abo.VoucherID              = vID;
            abo.EmpID                  = empID;
            abo.AdjustmentStatus       = "Pending";
            abo.VoucherDate            = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
            abo.AuthorisedBySupervisor = "No";
            abo.AuthorisedByManager    = "No";
            abo.TotalPrice             = Convert.ToDecimal(totalPrice);
            ctx.Adjustments.Add(abo);

            if (ctx.SaveChanges() > 0)
            {
                status = true;
            }
            else
            {
                status = false;
            }
            return(status);
        }
        public void createAdjustmentVoucherDetails(string adNum, string vID, string itemNum, string qty, string supp, string reason)
        {
            SA43Team2StoreDBEntities ctx = new SA43Team2StoreDBEntities();
            AdjustmentDetail         ad  = new AdjustmentDetail();

            ad.AdjustmentDetailsID = adNum;
            ad.VoucherID           = vID;
            ad.ItemNumber          = itemNum;
            ad.QuantityAdjustment  = Convert.ToInt32(qty);
            ad.SupplierID          = supp;
            ad.Reason = reason;
            ctx.AdjustmentDetails.Add(ad);

            ctx.SaveChanges();
        }