public ActionResult SetAgent(int id)
        {
            MerchantModel        WebMerchant = MerchantServiceInstance.GetMerchant(id);
            MerchantPricingModel ToShow      = new MerchantPricingModel();

            ToShow.ID           = WebMerchant.ID;
            ToShow.MerchantName = WebMerchant.MerchantName;
            return(View(ToShow));
        }
        public ActionResult SetPricing(int id)
        {
            MerchantModel        WebMerchant = MerchantServiceInstance.GetMerchant(id);
            MerchantPricingModel ToShow      = new MerchantPricingModel();

            ToShow.ID           = WebMerchant.ID;
            ToShow.MerchantName = WebMerchant.MerchantName;
            ToShow.PricingID    = WebMerchant.Pricing;
            IPriceService         Prices         = new PriceService();
            List <SelectListItem> PriceSelection = Prices.GetPricesForSelection();

            ViewBag.Prices = PriceSelection;
            return(View(ToShow));
        }
        public ActionResult SetAgent(MerchantPricingModel WebData)
        {
            try
            {
                MerchantServiceInstance.SetMerchantPricing(WebData);
                ModelState.AddModelError("", "Merchant Assigned to that Agent");
            }
            catch (Exception Ex)
            {
                ModelState.AddModelError("", Common.StandardExceptionErrorMessage(Ex));
            }

            // redisplay the page
            return(View(WebData));
        }
        public ActionResult SetPricing(MerchantPricingModel WebData)
        {
            try
            {
                MerchantServiceInstance.SetMerchantPricing(WebData);
                ModelState.AddModelError("", "Merchant Updated with that pricing");
            }
            catch (Exception Ex)
            {
                ModelState.AddModelError("", Common.StandardExceptionErrorMessage(Ex));
            }

            // redisplay the page
            IPriceService         Prices         = new PriceService();
            List <SelectListItem> PriceSelection = Prices.GetPricesForSelection();

            ViewBag.Prices = PriceSelection;
            return(View(WebData));
        }