public ActionResult Sale(SaleViewModel vm)
 {
     try
     {
         vm.InvoiceNumber = IMDAL.GenerateInvoiceNumber();
         IMDAL.AddUpdate <Sale>(vm.ToEntity());
     }
     catch (Exception e)
     {
     }
     return(RedirectToAction("Sale"));
 }
        public ActionResult AddInventory(InventoryViewModel vm)
        {
            try
            {
                IMDAL.AddUpdate <Product>(new Product()
                {
                    Price       = vm.Price,
                    ProductName = vm.ProductName,
                    Quantity    = vm.Quantity,
                    Remarks     = vm.Remarks,
                    VendorName  = vm.VendorName
                });
            }
            catch (Exception e)
            {
            }

            return(RedirectToAction("Inventory"));
        }