async public static Task <UserProfile> GetAccountInfoByCardNumber(string CitizenID, DateTime BirthDate, string AccountNumber, string CardNumber, string ATMPin) { var values = new Dictionary <string, object> { { "CitizenID", CitizenID }, { "BirthDate", BirthDate }, { "AccountNumber", AccountNumber }, { "CardNumber", CardNumber }, { "ATMPin", ATMPin } }; String jsonContent = JsonConvert.SerializeObject(values); var content = new StringContent(jsonContent, Encoding.UTF8, "application/json"); var response = await Client.PostAsync(GetAccountInfoByCardNumberURI, content); if (response != null) { var responseString = await response.Content.ReadAsStringAsync(); Dictionary <string, object> data = JsonConvert.DeserializeObject <Dictionary <string, object> >(responseString); if ((bool)data["Status"] == false) { Console.WriteLine(data["Message"]); return(null); } GreenBank_UserProfile user = JsonConvert.DeserializeObject <GreenBank_UserProfile>(data["UserProfile"].ToString()); return(new UserProfile(user)); } return(null); }
async public static Task <UserProfile> GetUserProfileFrom(string Username, string Password) { var values = new Dictionary <string, object> { { "Username", Username }, { "Password", Password } }; String jsonContent = JsonConvert.SerializeObject(values); var content = new StringContent(jsonContent, Encoding.UTF8, "application/json"); var response = await Client.PostAsync(UserURI, content); if (response != null) { var responseString = await response.Content.ReadAsStringAsync(); Dictionary <string, object> data = JsonConvert.DeserializeObject <Dictionary <string, object> >(responseString); if ((bool)data["Status"] == false) { Console.WriteLine(data["Message"]); return(null); } GreenBank_UserProfile user = JsonConvert.DeserializeObject <GreenBank_UserProfile>(data["UserProfile"].ToString()); return(new UserProfile(user)); } return(null); }
public UserProfile(GreenBank_UserProfile greenBank_UserProfile) { ID = greenBank_UserProfile.ID; Firstname = greenBank_UserProfile.FirstName; Lastname = greenBank_UserProfile.LastName; Gender = greenBank_UserProfile.Gender; Prefix = greenBank_UserProfile.Prefix; MobileNo = greenBank_UserProfile.MobileNumber; CountryCode = greenBank_UserProfile.CountryCode; Username = greenBank_UserProfile.UserName; ProfilePic = greenBank_UserProfile.ProfilePic; CitizenID = greenBank_UserProfile.CitizenID; Birthdate = (DateTime)greenBank_UserProfile.BirthDate; StatusUser = greenBank_UserProfile.StatusUser; ReferenceNO = greenBank_UserProfile.ReferenceNumber; StatusUnlock = (bool)greenBank_UserProfile.StatusUnlock; Role = greenBank_UserProfile.Role; }
async public static Task <GreenBank_UserProfile> GetUserInfoByPassbookNumber(string passbook_no) { Uri settleURI = GetUserInfoByPassbookNumberURI.AddParameter("passbook_no", passbook_no); string response = await Client.GetStringAsync(settleURI); if (response != null) { Dictionary <string, object> data = JsonConvert.DeserializeObject <Dictionary <string, object> >(response); if ((bool)data["Status"] == false) { Console.WriteLine(data["Message"]); return(null); } GreenBank_UserProfile userProfile = JsonConvert.DeserializeObject <GreenBank_UserProfile>(data["UserProfile"].ToString()); return(userProfile); } return(null); }
public UserProfileLogExPage(GreenBank_UserProfile userProfile) { InitializeComponent(); UserProfile = userProfile; this.BindingContext = userProfile; }
public PinSetUpPage(GreenBank_UserProfile user) : this() { this.user = user; }
public ConfirmPinPage(String firstPin, GreenBank_UserProfile user) : this(firstPin) { this.user = user; }