public async void doLogin(LoginRequestModel loginRequest, Action <LoginResponse, GPError> callback) { String completeURL = base.getCompleteURL(loginEndPoint); String strInputJson = JsonConvert.SerializeObject(loginRequest); APIResult result = await NetworkRequestManager.Sharedmanager.sendPostRequest(strInputJson, completeURL); LoginResponse loginResponse = new LoginResponse(); if (result.Error == null) { UserInfoModel userInfoModel = JsonConvert.DeserializeObject <UserInfoModel>(result.ResponseJSON); loginResponse.userInfo = userInfoModel; //Save user info AppRepository.sharedRepository.saveUserInfo(userInfoModel); } else { //Process the error object } callback(loginResponse, result.Error); }
public void saveUserInfo(UserInfoModel userInfoModel) { dataBaseConnection.Insert(userInfoModel); }
public void saveUserInfo(UserInfoModel userInfoModel) { DBManager.sharedManager.saveUserInfo(userInfoModel); }