コード例 #1
0
        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);
        }
コード例 #2
0
 public void saveUserInfo(UserInfoModel userInfoModel)
 {
     dataBaseConnection.Insert(userInfoModel);
 }
コード例 #3
0
 public void saveUserInfo(UserInfoModel userInfoModel)
 {
     DBManager.sharedManager.saveUserInfo(userInfoModel);
 }