Ejemplo n.º 1
0
 public ActionResult Setting(Settion model, string returnUrl, string Path, string integralenabled)
 {
     if (ModelState.IsValid)
     {
         var rr=false;
         var rrr=false;
         var r = GlobeInfo.SetWebSettings(model.Isneedcates, model.WebName, model.Beian, model.SeoKey, model.SeoValue, model.SeoDescription, model.Stock, model.QQKey, model.QQValue, model.SinaWeiBoKey, model.SinaWeiBoValue, model.AlipayKey, model.AlipayValue, model.QQUrl, model.SinaWeiBoUrl, model.AlipayUrl,model.Logo);
         if (integralenabled == null) rr = GlobeInfo.SetIntegralRequest(0, 0, 0);
         else if (!string.IsNullOrWhiteSpace(model.OneIntegralEqualMoney) && !string.IsNullOrWhiteSpace(model.TradeEndMoneyToCredit)) rr = GlobeInfo.SetIntegralRequest(integralenabled.TryTo(0), double.Parse(model.OneIntegralEqualMoney), int.Parse(model.TradeEndMoneyToCredit));
         else rr=true;
         if(!string.IsNullOrWhiteSpace(model.Minutes)) rrr = GlobeInfo.SetConfirmReceiptSettingRequest(int.Parse(model.Minutes));
         else  rrr=true;
         {
             if (r &&rr & rrr)
             {
                 TempData["success"] = "提交成功";
                 return RedirectToAction("Setting", "Partner", new { area = "Admin" });
             }
             else
             {
                 if (!rr||!rrr) TempData["errmsg"] = "积分或收货时间提交失败";
                 else TempData["errmsg"] = "提交失败";
                 return RedirectToAction("Setting", "Partner", new { area = "Admin" });
             }
         }
     }
     return View(model);
 }
Ejemplo n.º 2
0
        public ActionResult Setting()
        {
            if (GlobeInfo.GetWebInfo == null) return View(new Settion());

            var itemModel = new Settion()
            {
                Isneedcates = GlobeInfo.GetWebInfo.GetValue("isneedcates"),
                WebName = GlobeInfo.GetWebInfo.GetValue("webname"),
                Beian = GlobeInfo.GetWebInfo.GetValue("beian"),
                Logo = GlobeInfo.GetWebInfo.GetValue("logo"),
                SeoKey = GlobeInfo.GetWebInfo.GetValue("seokey"),
                SeoValue = GlobeInfo.GetWebInfo.GetValue("seovalue"),
                SeoDescription = GlobeInfo.GetWebInfo.GetValue("seodescription"),
                Stock = GlobeInfo.GetWebInfo.GetValue("stock"),
                QQKey = GlobeInfo.GetWebInfo.GetValue("qqkey"),
                QQValue = GlobeInfo.GetWebInfo.GetValue("qqvalue"),
                QQUrl = GlobeInfo.GetWebInfo.GetValue("qqurl"),
                SinaWeiBoKey = GlobeInfo.GetWebInfo.GetValue("sinaweibokey"),
                SinaWeiBoValue = GlobeInfo.GetWebInfo.GetValue("sinaweibovalue"),
                SinaWeiBoUrl = GlobeInfo.GetWebInfo.GetValue("sinaweibourl"),
                AlipayKey = GlobeInfo.GetWebInfo.GetValue("alipaykey"),
                AlipayValue = GlobeInfo.GetWebInfo.GetValue("alipayvalue"),
                AlipayUrl = GlobeInfo.GetWebInfo.GetValue("alipayurl"),
                IntegralEnabled = GlobeInfo.GetIntegralRequest() != null ? GlobeInfo.GetIntegralRequest().IntegralEnabled.ToString() : "",
                OneIntegralEqualMoney = GlobeInfo.GetIntegralRequest() != null ? GlobeInfo.GetIntegralRequest().OneIntegralEqualMoney.ToString() : "",
                Minutes =  GlobeInfo.GetConfirmReceiptSettingRequest() != null ? GlobeInfo.GetConfirmReceiptSettingRequest().ConfirmHours.ToString() : "",
                TradeEndMoneyToCredit = GlobeInfo.GetIntegralRequest() != null ? GlobeInfo.GetIntegralRequest().TradeEndMoneyToCredit.ToString() : "",
            };

            return View(itemModel);
        }