public FineOffice.Modules.SYS_Role Update(FineOffice.Modules.SYS_Role model) { dal.Initialization(); FineOffice.Entity.SYS_Role entity = new Entity.SYS_Role { ID = model.ID, Remark = model.Remark, AuthorityList = model.AuthorityList, RoleName = model.RoleName, Stop = model.Stop, Ordering = model.Ordering, MenuList = model.MenuList, IsModify = model.IsModify, }; dal.Update(entity); dal.Dispose(); return(null); }
/// <summary> /// 返回一个model /// </summary> /// <returns></returns> public FineOffice.Modules.SYS_Role GetModel(System.Linq.Expressions.Expression <Func <FineOffice.Modules.SYS_Role, bool> > expression) { dal.Initialization(); FineOffice.Modules.SYS_Role model = (from entity in dal.GetListAll() select new FineOffice.Modules.SYS_Role { ID = entity.ID, Remark = entity.Remark, AuthorityList = entity.AuthorityList, RoleName = entity.RoleName, Stop = entity.Stop, Ordering = entity.Ordering, MenuList = entity.MenuList, IsModify = entity.IsModify, }).Where(expression).FirstOrDefault(); dal.Dispose(); return(model); }