public int UserInfoUpdate(UserInfoUpdateRequest request) { UserLoginRequest userInfoReq = new UserLoginRequest(); userInfoReq.UserName = request.UserName; userInfoReq.PassWord = request.PassWord; UserInfoResponse userInfoRes = UserLogin(userInfoReq); UserInfoRequestModel userInfoModel = AutoMappingUtils.ConvertTo <UserInfoRequestModel>(request); if (userInfoRes != null) { userInfoModel.UID = userInfoRes.UID; userInfoModel.UserNO = userInfoRes.UserNO; userInfoModel.UserName = userInfoRes.UserName; userInfoModel.UserEmail = userInfoRes.UserEmail; userInfoModel.PassWord = request.NewPassWord; return(_userInfoDal.UserInfoUpdate(userInfoModel)); } else { return(0); } }
public UserInfoResponse UserLogin(UserLoginRequest request) { UserInfoRequestModel userInfoModel = AutoMappingUtils.ConvertTo <UserInfoRequestModel>(request); UserInfoResponse response = AutoMappingUtils.ConvertTo <UserInfoResponse>(_userInfoDal.UserLogin(userInfoModel)); return(response); }
public UserInfoResponseModel UserLogin(UserInfoRequestModel request) { var obj = db.UserInfo.ToList().Find(i => i.UserName == request.UserName); UserInfoResponseModel response = AutoMappingUtils.ConvertTo <UserInfoResponseModel>(obj); return(response); }
public UserInfoResponse UserRegister(UserRegisterRequest request) { string userNo = "E" + DateTime.Now.ToString("yyyyMMddHHmmss"); UserInfoRequestModel userInfoModel = AutoMappingUtils.ConvertTo <UserInfoRequestModel>(request); userInfoModel.UserNO = userNo; UserInfoResponse response = AutoMappingUtils.ConvertTo <UserInfoResponse>(_userInfoDal.UserRegister(userInfoModel)); return(response); }