private void Mylistview_ItemSelected(object sender, SelectedItemChangedEventArgs e) { FullUserInformation info = (FullUserInformation)e.SelectedItem; Navigation.PushAsync(new TransferView.TransferOtherNextPage(info)); }
private async void ThisOnload(FullUserInformation Thisinfo) { List <FavoritedBillInfo> list = await Services.FavoritedBills(App.User.ID, Thisinfo.AccountNumber); if (list == null) { return; } foreach (FavoritedBillInfo bill in list) { List <GreenBank_BillerCompany> productList = await Services.GetBillerByType(bill.BillType); foreach (GreenBank_BillerCompany product in productList) { if (product.ProductName == bill.ProductName) { bill.ID = product.ID; bill.AccountNumber = product.AccountNumber; continue; } } } // Mylistview.ItemsSource = list; Console.WriteLine("test"); }
public HttpResponseMessage full_information([FromBody] Guid id) { HttpResponseMessage message = null; var error_message = string.Empty; FullUserInformation fullUserInformation = new FullUserInformation(); if (id == null || id == Guid.Empty) { error_message = "error, could not be processed further bad request"; message = Request.CreateResponse(HttpStatusCode.BadRequest, error_message); message.Headers.Date = DateTime.Now; return(message); } fullUserInformation = _usr.full_info(id); if (fullUserInformation.User == null) { message = Request.CreateResponse(HttpStatusCode.NotFound, fullUserInformation); message.Headers.Date = DateTime.Now; } else if (fullUserInformation.User != null) { message = Request.CreateResponse(HttpStatusCode.OK, fullUserInformation); message.Headers.Date = DateTime.Now; } else { error_message = "error, internal server error could not be processed further"; message = Request.CreateResponse(HttpStatusCode.InternalServerError, error_message); message.Headers.Date = DateTime.Now; return(message); } return(message); }
public PayBillSearchPage(FullUserInformation Thisinfo) : this() { this.user = Thisinfo; this.BindingContext = Thisinfo; namefrom.Text = App.User.Firstname; }
public TransferOtherNextPage(FullUserInformation Thisinfo) : this() { this.Thisinfo = Thisinfo; this.BindingContext = Thisinfo; //Mylistview.ItemsSource = "2"; List <BankInfo> bankList = new List <BankInfo> { new BankInfo() { Name = "Enixer Bank", Img = "iconEnixer" }, new BankInfo() { Name = "Bank Of KMA", Img = "iconKrungsi" }, new BankInfo() { Name = "Bankok Bank", Img = "ImageiconBKK" }, new BankInfo() { Name = "KrungThai Bank", Img = "iconKrungThai" } }; BankList.ItemsSource = bankList; BankName.Text = ""; }
public ActionResult contact_profile_normal(Guid contactId) { FullUserInformation fullUserInformation = new FullUserInformation(); using (var api = new HttpClient()) { api.BaseAddress = new Uri("https://localhost:44343/api/user/"); api.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var get_user = api.PostAsJsonAsync <Guid>("user/information", contactId); get_user.Wait(); var result = get_user.Result; if (result.StatusCode == HttpStatusCode.OK) { var s = result.Content.ReadAsAsync <FullUserInformation>(); s.Wait(); fullUserInformation = s.Result; } else if (result.StatusCode == HttpStatusCode.NotFound) { var s = result.Content.ReadAsAsync <FullUserInformation>(); s.Wait(); fullUserInformation = s.Result; } } return(View("contact_profile", fullUserInformation)); }
protected async override void OnAppearing() { base.OnAppearing(); NavigationPage.SetHasNavigationBar(this, false); Loading.Start(Loader, LoaderBackground); List <GreenBank_Account> myAccounts = await Services.GetAccountsFromUserID(App.User.ID); List <FullUserInformation> listUserInfo = new List <FullUserInformation>(); for (int i = 0; i < myAccounts.Count; i++) { var balance = await Services.GetAccountBalance(myAccounts[i].AccountNumber); FullUserInformation Thisinfo = new FullUserInformation() { // Firstname = myAccounts[i].UserID.ToString(), Firstname = App.User.Firstname, AvailableBalance = balance.AvailableBalance, AccountNumber = balance.AccountNumber, Currency = balance.Currency }; listUserInfo.Add(Thisinfo); } Mylistview.ItemsSource = listUserInfo; Loading.Stop(Loader, LoaderBackground); }
public Transfer2ndPage(string numPin, string text, GreenBank_BillerCompany cardSelected, FullUserInformation user) : this() { this.numPin = numPin; this.Reftext = text; this.cardSelected = cardSelected; this.user = user; }
public SearchBillNextPage(GreenBank_BillerCompany cardSelected, FullUserInformation user) : this() { NavigationPage.SetHasNavigationBar(this, false); this.cardSelected = cardSelected; this.user = user; this.BindingContext = cardSelected; }
public Transfer2ndPage(string amount, FullUserInformation userInfo, AccountInfo toAccountInfo, BankInfo selectedTransferToBank) : this() { this.amount = amount; this.userInfo = userInfo; this.toAccountInfo = toAccountInfo; this.selectedTransferToBank = selectedTransferToBank; }
public CarditCardPage(string cardType, FullUserInformation user) : this() { NavigationPage.SetHasNavigationBar(this, false); this.cardType = cardType; this.user = user; LoadThisPage(cardType); }
public ConfirmPage(string amount, FullUserInformation userInfo, AccountInfo toAccountInfo, BankInfo selectedTransferToBank, string note) : this() { this.amount = amount; this.userInfo = userInfo; this.toAccountInfo = toAccountInfo; this.selectedTransferToBank = selectedTransferToBank; this.note = note; }
public ConfirmPage(string amount, FullUserInformation user, GreenBank_BillerCompany cardSelected, string reftext, string note) : this() { this.amount = amount; this.user = user; this.cardSelected = cardSelected; this.reftext = reftext; this.note = note; }
public SearchBillNextPage(FullUserInformation user, bool check) : this() { App.Check = true; NavigationPage.SetHasNavigationBar(this, false); this.user = user; this.BindingContext = App.FavoruSelected; }
public PaybillAmountPage(string text, GreenBank_BillerCompany cardSelected, FullUserInformation user) : this() { NavigationPage.SetHasNavigationBar(this, false); // Mycheck = check; this.Reftext = text; this.cardSelected = cardSelected; this.user = user; }
public ConfirmPage(string amount, FullUserInformation user, FavoritedBillInfo cardSelected, string reftext, string note) : this() { NavigationPage.SetHasNavigationBar(this, false); this.amount = amount; this.user = user; // this.cardSelected = cardSelected; this.reftext = reftext; this.note = note; }
public PayBillSearchPage(FullUserInformation Thisinfo) : this() { NavigationPage.SetHasNavigationBar(this, false); this.user = Thisinfo; this.BindingContext = Thisinfo; namefrom.Text = App.User.Firstname; ThisOnload(Thisinfo); }
public TransferSuccessfulPage(FullUserInformation user, GreenBank_BillerCompany cardSelected, string amount) : this() { this.user = user; this.cardSelected = cardSelected; this.amount = amount; transferDate.Text = DateTime.Now.ToString(); nameto.Text = cardSelected.ProductName; numberto.Text = cardSelected.Company; namefrom.Text = App.User.Firstname + " " + App.User.Lastname; numberfrom.Text = user.AccountNumber; toAccountNumber.Text = cardSelected.AccountNumber; Amount.Text = amount + " THB"; }
public TransferSuccessfulPage(FullUserInformation userInfo, AccountInfo toAccountInfo, string amount) : this() { this.userInfo = userInfo; this.toAccountInfo = toAccountInfo; this.amount = amount; transferDate.Text = DateTime.Now.ToString(); nameto.Text = toAccountInfo.FirstName + " " + toAccountInfo.LastName; numberto.Text = toAccountInfo.AccountNumber; namefrom.Text = App.User.Firstname + " " + App.User.Lastname; numberfrom.Text = userInfo.AccountNumber; toAccountNumber.Text = toAccountInfo.AccountNumber; Amount.Text = amount + " THB"; }
public TransferSuccessfulPage(FullUserInformation user, GreenBank_BillerCompany cardSelected, string amount) : this() { NavigationPage.SetHasNavigationBar(this, false); this.user = user; this.cardSelected = cardSelected; this.amount = amount; transferDate.Text = DateTime.Now.ToString(); nameto.Text = App.Check ? App.FavoruSelected.ProductName : cardSelected.ProductName; namefrom.Text = App.User.Firstname + " " + App.User.Lastname; numberfrom.Text = user.AccountNumber; toAccountNumber.Text = App.Check ? App.FavoruSelected.AccountNumber : cardSelected.AccountNumber; Amount.Text = amount + " " + App.Current; }
public TransferAmountPage(FullUserInformation user, AccountInfo toAccountIno, BankInfo SelectedTransferToBank) : this() { this.userInfo = user; this.toAccountInfo = toAccountIno; this.SelectedTransferToBank = SelectedTransferToBank; }
public CarditCardPage(string cardType, FullUserInformation user) : this() { this.cardType = cardType; this.user = user; LoadThisPage(cardType); }
public SearchBillNextPage(GreenBank_BillerCompany cardSelected, FullUserInformation user) : this() { this.cardSelected = cardSelected; this.user = user; this.BindingContext = cardSelected; }
public SearchBillPage(FullUserInformation user) : this() { this.user = user; }
public FullUserInformation full_info(Guid id) { FullUserInformation fullUserInformation = new FullUserInformation(); if (id == null || id == Guid.Empty) { return(fullUserInformation); } using (_context = new BlueContext()) { using (var _transaction = _context.Database.BeginTransaction(IsolationLevel.Serializable)) { try { if (_context.Database.Connection.State == ConnectionState.Closed || _context.Database.Connection.State == ConnectionState.Broken) { _context.Database.Connection.Open(); } var user = (from u in _context.User where (u.UserId == id) select u).SingleOrDefault <User>(); _context.SaveChanges(); var userAddress = (from us in _context.UserAddress where (us.UserId == user.UserId) select us).SingleOrDefault <UserAddress>(); _context.SaveChanges(); var address = (from a in _context.Address where (a.AddressId == userAddress.AddressId) select a).SingleOrDefault <Address>(); _context.SaveChanges(); var country = (from c in _context.Country where (c.CountryId == address.CountryId) select c).SingleOrDefault <Country>(); _context.SaveChanges(); var province = (from p in _context.Province where (p.ProvinceId == address.ProvinceId) select p).SingleOrDefault <Province>(); _context.SaveChanges(); var city = (from ci in _context.City where (ci.CityId == address.CityId) select ci).SingleOrDefault <City>(); _context.SaveChanges(); fullUserInformation.User = user; fullUserInformation.Address = address; fullUserInformation.Country = country; fullUserInformation.Province = province; fullUserInformation.City = city; _transaction.Commit(); } catch (Exception e) { _transaction.Rollback(); throw new Exception(e.Message); } } } return(fullUserInformation); }
private void Mylistview_ItemSelected(object sender, SelectedItemChangedEventArgs e) { FullUserInformation info = (FullUserInformation)e.SelectedItem; Navigation.PushAsync(new PayBills2.PayBillSearchPage(info)); }
public PaybillAmountPage(string text, GreenBank_BillerCompany cardSelected, FullUserInformation user) : this() { this.Reftext = text; this.cardSelected = cardSelected; this.user = user; }