Beispiel #1
0
        public DepartDTO FindBy(ISpecification <Depart> ispec)
        {
            var entity = iManage.FindBy(ispec);

            return(MapperSupport.MapTo <DepartDTO>(entity));
        }
Beispiel #2
0
        public IQueryable <DepartDTO> QueryBy(ISpecification <Depart> ispec)
        {
            IQueryable <Depart> iqs = iManage.QueryBy(ispec);

            return(MapperSupport.MapTo <IQueryable <DepartDTO> >(iqs));
        }
Beispiel #3
0
        public bool UserRegister(UserDTO model)
        {
            var user = MapperSupport.MapTo <User>(model);

            return(iUserManage.AddOrEditAt(user));
        }
Beispiel #4
0
        public bool AddOrEditAt(DepartDTO model)
        {
            var dpt = MapperSupport.MapTo <Depart>(model);

            return(iManage.AddOrEditAt(dpt) ? iSqlContext.SaveChanges() > 0 : false);
        }
Beispiel #5
0
        public IQueryable <MenuDTO> QueryBy(ISpecification <Menu> ispec)
        {
            var querys = iManage.QueryBy(ispec);

            return(MapperSupport.MapTo <IQueryable <MenuDTO> >(querys));
        }
Beispiel #6
0
        public UserDTO UserLogin(ISpecification <User> ispec)
        {
            var user = iUserManage.FindBy(ispec);

            return(user == null ? null : MapperSupport.MapTo <UserDTO>(user));
        }
Beispiel #7
0
        public MenuDTO FindBy(ISpecification <Menu> ispec)
        {
            var menu = iManage.FindBy(ispec);

            return(MapperSupport.MapTo <MenuDTO>(menu));
        }
Beispiel #8
0
        public bool AddOrEditAt(MenuDTO model)
        {
            var menu = MapperSupport.MapTo <Menu>(model);

            return(iManage.AddOrEditAt(menu));
        }
Beispiel #9
0
        public bool SetMenusToRole(ISpecification <RoleMenu> ispec, List <RoleMenuDTO> roleMenus)
        {
            var menus = MapperSupport.MapTo <List <RoleMenu> >(roleMenus);

            return(iManage.SetMenusToRole(ispec, menus));
        }
Beispiel #10
0
        public RoleDTO FindBy(ISpecification <Role> ispec)
        {
            var role = iManage.FindBy(ispec);

            return(MapperSupport.MapTo <RoleDTO>(role));
        }
Beispiel #11
0
        public bool AddOrEditAt(RoleDTO model)
        {
            var role = MapperSupport.MapTo <Role>(model);

            return(iManage.AddOrEditAt(role));
        }