コード例 #1
0
ファイル: T_TreeDTO.cs プロジェクト: luyangjia/public_erp
 public static T_Tree ToModel(this  T_TreeModel node)
 {
     return(new T_Tree()
     {
         Id = node.Id,
         ChineseName = node.ChineseName,
         Icon = node.Icon,
         Enable = node.Enable,
         Keys = node.Keys,
         Listorder = node.Listorder,
         Name = node.Name,
         ParentId = node.ParentId == 0 ? null : node.ParentId,
         Url = node.Url,
     });
 }
コード例 #2
0
ファイル: T_TreeDTO.cs プロジェクト: luyangjia/public_erp
        public static T_TreeModel DTO(this T_Tree node)
        {
            if (node == null)
            {
                return(null);
            }
            var model = new T_TreeModel()
            {
                Id          = node.Id,
                ChineseName = node.ChineseName,
                Name        = node.Name,
                ParentId    = node.ParentId,
                Url         = node.Url,
                Icon        = node.Icon,
                Enable      = node.Enable,
                Keys        = node.Keys,
                Listorder   = node.Listorder,
            };

            return(model);
        }
コード例 #3
0
 /// <summary>
 /// 复杂查询
 /// </summary>
 /// <param name="model">查询对象</param>
 /// <param name="Orders">排序字典key:排序的字段,value:asc升序/desc降序</param>
 /// <param name="PageSize">每页行数,默认15</param>
 /// <param name="PageIndex">当前页码,默认100</param>
 /// <returns></returns>
 public DataGrid <T_TreeModel> Search(T_TreeModel model, Dictionary <string, string> Orders = null, int PageSize = 15, int PageIndex = 100)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public int DeleteData(T_TreeModel model)
 {
     return(this.Delete(model.Id));
 }
コード例 #5
0
 public int EditData(T_TreeModel model)
 {
     return(this.Edit(model.ToModel()));
 }
コード例 #6
0
 public int AddData(T_TreeModel model)
 {
     return(this.Add(model.ToModel()));
 }