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)); } }
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)); } }
public bool Delete(TB_UserInfo TB_UserInfo) { return(TB_UserInfo.Delete(TB_UserInfo)); }
public bool Update(TB_UserInfo TB_UserInfo) { return(TB_UserInfo.Update(TB_UserInfo)); }
public bool Add(TB_UserInfo TB_UserInfo) { return(TB_UserInfo.Add(TB_UserInfo)); }
public UserInfoService(TB_UserInfo TB_UserInfo) { this._TB_UserInfo = TB_UserInfo; }