예제 #1
0
 /// <summary>
 /// 商家入驻协议
 /// </summary>
 /// <returns></returns>
 public static string GetSellerAgreement()
 {
     Himall.Model.AgreementInfo model = _iSystemAgreementService.GetAgreement(Himall.Model.AgreementInfo.AgreementTypes.Seller);
     if (model != null)
     {
         return(model.AgreementContent);
     }
     else
     {
         return("");
     }
 }
예제 #2
0
        public ActionResult RegisterAgreement()
        {
            ViewBag.Logo = CurrentSiteSetting.Logo;
            AgreementInfo model = _iSystemAgreementService.GetAgreement(0);

            return(View(model));
        }
예제 #3
0
        public JsonResult UpdateAgreement(int agreementType, string agreementContent)
        {
            JsonResult jsonResult;
            ISystemAgreementService systemAgreementService = this._iSystemAgreementService;
            AgreementInfo           agreement = systemAgreementService.GetAgreement((AgreementInfo.AgreementTypes)agreementType);

            agreement.AgreementType    = agreementType;
            agreement.AgreementContent = agreementContent;
            if (!systemAgreementService.UpdateAgreement(agreement))
            {
                BaseController.Result result = new BaseController.Result()
                {
                    success = false,
                    msg     = "更新协议失败!"
                };
                jsonResult = base.Json(result);
            }
            else
            {
                BaseController.Result result1 = new BaseController.Result()
                {
                    success = true,
                    msg     = "更新协议成功!"
                };
                jsonResult = base.Json(result1);
            }
            return(jsonResult);
        }
예제 #4
0
        public ActionResult RegisterAgreement()
        {
            ViewBag.Logo = SiteSettings.Logo;
            var model = _iSystemAgreementService.GetAgreement(0);

            ViewBag.Keyword = SiteSettings.Keyword;
            return(View(model));
        }
예제 #5
0
        public AgreementModel GetManagementModel(Himall.Model.AgreementInfo.AgreementTypes type)
        {
            AgreementModel model      = new AgreementModel();
            var            iAgreement = _iSystemAgreementService.GetAgreement(type);

            model.AgreementType    = iAgreement.AgreementType;
            model.AgreementContent = iAgreement.AgreementContent;
            return(model);
        }
예제 #6
0
        public JsonResult UpdateAgreement(int agreementType, string agreementContent)
        {
            ISystemAgreementService systemAgreementService = ServiceHelper.Create <ISystemAgreementService>();
            AgreementInfo           agreement = systemAgreementService.GetAgreement((AgreementInfo.AgreementTypes)agreementType);

            agreement.AgreementType    = agreementType;
            agreement.AgreementContent = agreementContent;
            if (systemAgreementService.UpdateAgreement(agreement))
            {
                Result result = new Result()
                {
                    success = true,
                    msg     = "更新协议成功!"
                };
                return(Json(result));
            }
            Result result1 = new Result()
            {
                success = false,
                msg     = "更新协议失败!"
            };

            return(Json(result1));
        }
 /// <summary>
 /// 获取协议信息
 /// </summary>
 /// <param name="Id"></param>
 /// <returns></returns>
 public static Entities.AgreementInfo GetAgreement(Entities.AgreementInfo.AgreementTypes type)
 {
     return(_iSystemAgreementService.GetAgreement(type));
 }
예제 #8
0
 /// <summary>
 /// 获取协议信息
 /// </summary>
 /// <param name="Id"></param>
 /// <returns></returns>
 public static Himall.Model.AgreementInfo GetAgreement(Himall.Model.AgreementInfo.AgreementTypes type)
 {
     return(_iSystemAgreementService.GetAgreement(type));
 }