Пример #1
0
        public ActionResult LimitMgmt(Guid id)
        {
            using (var fact = Wcf <UserAccountService>())
            {
                var         channel  = fact.CreateChannel();
                TB_UserInfo userInfo = channel.QuerySingle(new TB_UserInfoQueryObject {
                    QueryCondition = t => t.UserUid == id
                }).Cast <TB_UserInfo>();
                TB_UserAuthenCodes userAuthenCodes = channel.QuerySingle(new TB_UserAuthenCodesQueryObject {
                    QueryCondition = t => t.UserUid == id
                }).Cast <TB_UserAuthenCodes>();

                UserViewModel userViewModel = new UserViewModel();
                userViewModel.UserUid     = id;
                userViewModel.LoginId     = userInfo?.LoginId;
                userViewModel.Name        = userInfo?.NickName;
                userViewModel.LimitCode   = userAuthenCodes?.UserLimitCodes;
                userViewModel.DisplayCode = userAuthenCodes?.UserDisplayCodes;

                LimitViewModel limitViewModel = new LimitViewModel();
                limitViewModel.UserViewModel   = userViewModel;
                limitViewModel.LimitCodeList   = channel.QueryAll(new TB_LimitCodeQueryObject()).Cast <List <TB_LimitCode> >();
                limitViewModel.DisplayCodeList = channel.QueryAll(new TB_DisplayCodeQueryObject()).Cast <List <TB_DisplayCode> >();

                return(View(limitViewModel));
            }
        }
Пример #2
0
        public ActionResult Detail(Guid id)
        {
            using (var fact = Wcf <UserAccountService>())
            {
                var         channel  = fact.CreateChannel();
                TB_UserInfo userInfo = channel.QuerySingle(new TB_UserInfoQueryObject {
                    QueryCondition = t => t.UserUid == id
                }).Cast <TB_UserInfo>();
                TB_UserAuthenCodes userAuthenCodes = channel.QuerySingle(new TB_UserAuthenCodesQueryObject {
                    QueryCondition = t => t.UserUid == id
                }).Cast <TB_UserAuthenCodes>();

                UserViewModel userViewModel = new UserViewModel();
                userViewModel.UserUid   = id;
                userViewModel.LoginId   = userInfo?.LoginId;
                userViewModel.Name      = userInfo?.NickName;
                userViewModel.LimitCode = userAuthenCodes?.UserLimitCodes;
                return(View(userViewModel));
            }
        }
Пример #3
0
 public bool Delete(TB_UserInfo TB_UserInfo)
 {
     return(TB_UserInfo.Delete(TB_UserInfo));
 }
Пример #4
0
 public bool Update(TB_UserInfo TB_UserInfo)
 {
     return(TB_UserInfo.Update(TB_UserInfo));
 }
Пример #5
0
 public bool Add(TB_UserInfo TB_UserInfo)
 {
     return(TB_UserInfo.Add(TB_UserInfo));
 }
Пример #6
0
 public UserInfoService(TB_UserInfo TB_UserInfo)
 {
     this._TB_UserInfo = TB_UserInfo;
 }