コード例 #1
0
 /// <summary>
 /// 创建 修改 查看 参数
 /// </summary>
 public ActionResult Create(ModelSysCodeInfoCreate model, string sysCodeInfoType)
 {
     ViewBag.PageState = model.PageState;
     model.SysCodeInfoEntity.Type = sysCodeInfoType;
     model.RetriveData();
     return View(model);
 }
コード例 #2
0
 public ActionResult Create(ModelSysCodeInfoCreate model, FormCollection collection)
 {
     try
     {
         model.Save();
         return Content(WebTools.ScriptCloseEmbeddedFrameDialog(DialogOption.GetDefaultInstance()));
     }
     catch
     {
         Error = Resources.Properties.Resources.M00002E;
         model.RetriveData();
         return View(model);
     }
 }
コード例 #3
0
        /// <summary>
        /// 验证参数名称是否已经存在
        /// </summary>
        public ActionResult RemoteCheckSysCodeInfoName(ModelSysCodeInfoCreate model)
        {
            string parentCode = Request["SysCodeInfoEntity.SysCodeInfoCode"];

            if (model.SysCodeInfoEntity.ID != Guid.Empty)
                return bizSysCodeInfo.CountBy(x => x.ID != model.SysCodeInfoEntity.ID && x.Name == model.SysCodeInfoEntity.Name && x.Code.Contains(parentCode)) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
            else
                return bizSysCodeInfo.CountBy(x => x.Name == model.SysCodeInfoEntity.Name && x.Code.Contains(parentCode)) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
        }
コード例 #4
0
        /// <summary>
        ///  验证代码是否已经存在
        /// </summary>
        public ActionResult RemoteCheckSysCodeInfoCode(ModelSysCodeInfoCreate model)
        {
            //TODO:该行代码的用法??

            string SysCodeInfoCode = Request["SysCodeInfoEntity.SysCodeInfoCode"];
            if (SysCodeInfoCode != "undefined" && SysCodeInfoCode != null)
            {
                if (model.SysCodeInfoEntity.ID != Guid.Empty)
                    return bizSysCodeInfo.CountBy(x => x.ID != model.SysCodeInfoEntity.ID && x.Code == SysCodeInfoCode + model.SysCodeInfoEntity.Code) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
                else
                    return bizSysCodeInfo.CountBy(x => x.Code == SysCodeInfoCode + model.SysCodeInfoEntity.Code) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);

            }
            else
            {
                if (model.SysCodeInfoEntity.ID != Guid.Empty)
                    return bizSysCodeInfo.CountBy(x => x.ID != model.SysCodeInfoEntity.ID && x.Code == model.SysCodeInfoEntity.Code && x.Type == model.SysCodeInfoEntity.Type) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
                else
                    return bizSysCodeInfo.CountBy(x => x.Code == model.SysCodeInfoEntity.Code && x.Type == model.SysCodeInfoEntity.Type) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);

            }
        }