예제 #1
0
        /// <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");
        }
예제 #4
0
 /// <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");
        }
예제 #6
0
 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("出错!"));
     }
 }
예제 #7
0
 public ActionResult Add(propertymapping input)
 {
     try
     {
         if (IdalCommon.IpropertyMappingEx.isLeagalEntityname(input.propertyName))
         {
             IdalCommon.IpropertyMappingEx.insert(input);
         }
         return(this.AddSuccessMsg());
     }
     catch (Exception)
     {
         return(this.FailedMsg("出错!"));
     }
 }
예제 #8
0
 /// <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("操作成功。"));
 }