/// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult getParentList()
        {
            propertymapping        pm         = new propertymapping();
            List <propertymapping> parentList = IdalCommon.IpropertyMappingEx.getEntityList().Where <propertymapping>(d => d.parentId == 0).ToList();

            return(Content(parentList.ToJson()));
        }
示例#2
0
        public void List()//列表视图
        {
            int type = Convert.ToInt32(ctx.Request["type"]);
            List <propertymapping> pm = IdalCommon.IpropertyMappingEx.getAllPropertyMapping().ToList();
            propertymapping        p  = pm.Where(d => d.propertyName == "type" && d.propertyValue == type.ToString()).FirstOrDefault();
            string m = p.propertyMeaning;

            tp.Put("title", m);
            tp.Display(ctx, "/Html/layer/helplist_layer.html");
        }
示例#3
0
        /// <summary>
        /// 显示视图
        /// </summary>
        public override void view() //默认视图
        {
            int                    type    = Convert.ToInt32(ctx.Request["type"]);
            List <article>         article = IdalCommon.IarticleEx.getArticleList(type).ToList();
            List <propertymapping> pm      = IdalCommon.IpropertyMappingEx.getAllPropertyMapping().ToList();
            propertymapping        p       = pm.Where(d => d.propertyName == "type" && d.propertyValue == type.ToString()).FirstOrDefault();
            string                 content = article[0].content;
            string                 m       = p.propertyMeaning;

            tp.Put("content", content);
            tp.Put("title", m);
            tp.Display(ctx, "/Html/help.html");
        }
 /// <summary>
 /// 提交表单数据
 /// </summary>
 public void SubmitForm()
 {
     try
     {
         string          keyValue = !string.IsNullOrEmpty(ctx.Request["keyValue"]) ? ctx.Request["keyValue"] : ctx.Request["id"];
         propertymapping pm       = HttpContextDataWrapper.DataToObject <propertymapping>(ctx);
         IdalCommon.IpropertyMappingEx.SubmitForm(pm, keyValue);
         Success("操作成功!");
     }
     catch (Exception)
     {
         Error("操作失败!");
     }
 }
示例#5
0
        public void Details()//列表视图
        {
            int     id      = Convert.ToInt32(ctx.Request["articleid"]);
            article article = IdalCommon.IarticleEx.getArticle(id);
            string  content = article.content;

            int type = (int)article.type;
            List <propertymapping> pm = IdalCommon.IpropertyMappingEx.getAllPropertyMapping().ToList();
            propertymapping        p  = pm.Where(d => d.propertyName == "type" && d.propertyValue == type.ToString()).FirstOrDefault();
            string m = p.propertyMeaning;

            tp.Put("title", m);
            tp.Put("content", content);
            tp.Display(ctx, "/Html/help.html");
        }
 public ActionResult Update(propertymapping input)
 {
     try
     {
         if (IdalCommon.IpropertyMappingEx.isLegalEntity(input.propertyName, input.propertyValue, input.propertyMeaning, input.remark))
         {
             IdalCommon.IpropertyMappingEx.update(input);
         }
         return(this.UpdateSuccessMsg());
     }
     catch (Exception)
     {
         return(this.FailedMsg("出错!"));
     }
 }
 public ActionResult Add(propertymapping input)
 {
     try
     {
         if (IdalCommon.IpropertyMappingEx.isLeagalEntityname(input.propertyName))
         {
             IdalCommon.IpropertyMappingEx.insert(input);
         }
         return(this.AddSuccessMsg());
     }
     catch (Exception)
     {
         return(this.FailedMsg("出错!"));
     }
 }
 /// <summary>
 /// 提交表单数据
 /// </summary>
 /// <param name="group">数据字典对象</param>
 /// <param name="keyValue">数据字典对象的主键</param>
 /// <returns></returns>
 public ActionResult SubmitForm(propertymapping propertymapping, string keyValue)
 {
     IdalCommon.IpropertyMappingEx.SubmitForm(propertymapping, keyValue);
     return(Success("操作成功。"));
 }