Exemple #1
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);
        }
        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="model"></param>
 public static bool UpdateAgreement(Entities.AgreementInfo model)
 {
     return(_iSystemAgreementService.UpdateAgreement(model));
 }
Exemple #4
0
 /// <summary>
 /// 修改协议
 /// </summary>
 /// <param name="model"></param>
 public static bool UpdateAgreement(Himall.Model.AgreementInfo model)
 {
     return(_iSystemAgreementService.UpdateAgreement(model));
 }