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, }); }
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); }
/// <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(); }
public int DeleteData(T_TreeModel model) { return(this.Delete(model.Id)); }
public int EditData(T_TreeModel model) { return(this.Edit(model.ToModel())); }
public int AddData(T_TreeModel model) { return(this.Add(model.ToModel())); }