public ActionResult AddVat() { var products = _iProductManager.GetAllProducts(); foreach (var product in products) { var model = new Vat { VatAmount = 250, UpdateByUserId = 6, UpdateDate = DateTime.Now, ProductId = product.ProductId }; _iVatManager.Add(model); } return(View()); }
public ActionResult AddVat(Vat model) { if (ModelState.IsValid) { var user = (ViewUser)Session["user"]; model.UpdateByUserId = user.UserId; if (_iVatManager.Add(model)) { ModelState.Clear(); ViewData["Message"] = "Vat info Saved successfully..!"; } } return(View()); }