Beispiel #1
0
        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" }));
        }
Beispiel #2
0
        protected override void OnInitialize()
        {
            ActivationHost.Faulted += PartHost_Faulted;

            if (Providers != null)
            {
                foreach (var movieProvider in Providers)
                {
                    var model = new ProviderViewModel(movieProvider);
                    ProviderViewModels.Add(model);
                }
            }
        }
Beispiel #3
0
        // 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));
        }
Beispiel #4
0
        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));
        }