public ContentResult ToEdit(SYSIntegralCodeArea para)
        {
            if (string.IsNullOrWhiteSpace(para.AreaName))
            {
                return(Content("区域名称不能为空"));
            }

            if (RepeatHelper.NoRepeatTwoAnd("SYSIntegralCodeArea", "AreaName", para.AreaName, "ActivityID", para.ActivityID.ToString(), para.ID) > 0)
            {
                return(Content("区域名称已存在"));
            }
            int rtn = para.EditByID();

            if (rtn > 0)
            {
                return(Content("ok"));
            }
            return(Content("保存出错"));
        }
        public ActionResult ToAdd(SYSIntegralCodeArea para)
        {
            if (string.IsNullOrWhiteSpace(para.AreaName))
            {
                return(Content("区域名称不能为空"));
            }

            if (RepeatHelper.NoRepeatTwoAnd("SYSIntegralCodeArea", "AreaName", para.AreaName, "ActivityID", para.ActivityID.ToString(), para.ID) > 0)
            {
                return(Content("区域名称已存在"));
            }
            int rtn = para.InsertAndReturnIdentity();

            if (rtn > 0)
            {
                para.ID = rtn;
                return(Json(para, JsonRequestBehavior.AllowGet));
            }
            return(Json("error"));
        }