public ActionResult BuyBackWizard(BaseMainConfigModel postModel)
        {
            var mainConfigModel = new BaseMainConfigModel();
            objBaseMainConfigAdmin.IwebBuyBackConfig.DisplayPrices = postModel.DisplayPrices;
            objBaseMainConfigAdmin.IwebBuyBackConfig.RetailBooks = postModel.RetailBooks;
            objBaseMainConfigAdmin.IwebBuyBackConfig.WholesaleBooks = postModel.WholeSaleBooks;
            objBaseMainConfigAdmin.IwebBuyBackConfig.ShowBuyBackNeed = postModel.ShowBuyBackNeed;
            objBaseMainConfigAdmin.IwebBuyBackConfig.StoreCredit = postModel.StoreCredit;
            objBaseMainConfigAdmin.IwebBuyBackConfig.Vouchers = postModel.Vouchers;
            objBaseMainConfigAdmin.IwebBuyBackConfig.VoucherExpire = Convert.ToInt32(postModel.VoucherExpire);
            objBaseMainConfigAdmin.IwebBuyBackConfig.RequireLogin = postModel.RequireLogin;

            TextWriter tr = new StreamWriter(Server.MapPath("~/contentfiles/sellbackdisclaimer.txt"), false);
            tr.Write(postModel.Disclaimer);
            tr.Close();
            SellBackSerivces.SetSellBackParams(StoreNumber, postModel.StoreCreditPercent??"",
                                               postModel.RetailPercent??"",
                                               postModel.RetailRounding,
                                               postModel.RetailCoin,
                                               postModel.WholeSalePercent??"",
                                               postModel.WholeSaleRounding,
                                               postModel.WholeSaleCoin, UvUsername, UvPassword, DbType,
                                               UvAddress,UvAccount,
                                               CacheTime, CacheTime, Strd3PortNumber, UseEncryption, Strd3PortNumber);

            objBaseMainConfigAdmin.SaveValues();
            //write to pick the other values for percents

            return RedirectToAction("Index", "Admin");
        }
        public ActionResult BuyBackWizard()
        {
            if (!HasAdminPrivilege())
            {
                return RedirectToAction("Logon", "Account", new { ReturnUrl = Request.Url.PathAndQuery });
            }
            var mainConfigModel=new BaseMainConfigModel();
            TextReader sr = new StreamReader(Server.MapPath("~/contentfiles/SellBackDisclaimer.txt"));

            mainConfigModel.Disclaimer = sr.ReadToEnd();
            sr.Close();
            mainConfigModel.DisplayPrices = objBaseMainConfigAdmin.IwebBuyBackConfig.DisplayPrices;
            mainConfigModel.RequireLogin = objBaseMainConfigAdmin.IwebBuyBackConfig.RequireLogin;
            mainConfigModel.RetailBooks = objBaseMainConfigAdmin.IwebBuyBackConfig.RetailBooks;
            mainConfigModel.ShowBuyBackNeed = objBaseMainConfigAdmin.IwebBuyBackConfig.ShowBuyBackNeed;
            mainConfigModel.StoreCredit = objBaseMainConfigAdmin.IwebBuyBackConfig.StoreCredit;
            mainConfigModel.VoucherExpire = objBaseMainConfigAdmin.IwebBuyBackConfig.VoucherExpire.ToString(CultureInfo.InvariantCulture);
            mainConfigModel.Vouchers = objBaseMainConfigAdmin.IwebBuyBackConfig.Vouchers;
            mainConfigModel.WholeSaleBooks = objBaseMainConfigAdmin.IwebBuyBackConfig.WholesaleBooks;
               object myVar = new { STOREID = StoreNumber };
               //SellBackSerivces.GetSellBackParams(StoreNumber, myVar, UvUsername, UvPassword, DbType, UvAddress, UvAccount,
               //                                   CacheTime, CacheTime, Strd3PortNumber, UseEncryption, Strd3PortNumber);
            return View(mainConfigModel);
        }