public ActionResult providerCreate(ProviderViewModels data) { ProviderBussines.GetProviderResponse request = new ProviderBussines.GetProviderResponse() { Provider = data.Provider }; result = ProviderBussines.Insert.Provider(request).Message; return(RedirectToAction("providerView", new { successful = true, ResultAction = "All Changes was successful" })); }
protected override void OnInitialize() { ActivationHost.Faulted += PartHost_Faulted; if (Providers != null) { foreach (var movieProvider in Providers) { var model = new ProviderViewModel(movieProvider); ProviderViewModels.Add(model); } } }
// GET: Provider #region View public ActionResult providerView(bool successful = false, string ResultAction = "") { ViewBag.Title = "Provider"; ViewBag.successful = successful; ViewBag.Message = ResultAction; var BussinesData = ProviderBussines.Select.GetProviderList(); var model = new ProviderViewModels() { Error = BussinesData.Error, ProviderList = BussinesData.ProviderList }; return(View(model)); }
public ActionResult providerUpdate(int id) { ViewBag.Title = "Update Provider"; ViewBag.Message = ""; ProviderBussines.GetProviderRequest request = new ProviderBussines.GetProviderRequest() { ProviderID = id }; Provider p = ProviderBussines.Select.GetProvider(request).Provider; var model = new ProviderViewModels() { Provider = p }; return(PartialView(model)); }