private void AcceptTransaction_Clicked(object sender, EventArgs e)
        {
            decimal pln      = decimal.Parse(PlnAmount.Text);
            string  currency = CurrencySign.Text.ToString();

            WCFKantor.UserDetails user = new WCFKantor.UserDetails()
            {
                UserEmail = Login.emailUser.ToString()
            };
            WCFKantor.Service1Client    client   = new WCFKantor.Service1Client();
            Dictionary <string, string> userData = client.PobierzDane(user);
            string getExchange = client.GetExchangeRate(currency);
            int    a           = getExchange.LastIndexOf("i");

            getExchange = getExchange.Substring(a + 2);
            decimal exchange = decimal.Parse(getExchange, CultureInfo.InvariantCulture);
            decimal score    = decimal.Parse((pln / exchange).ToString("N4"));

            WCFKantor.Transactions transaction = new WCFKantor.Transactions()
            {
                UserID = Int32.Parse(userData["ID"]), Type = "KUP", Pln = pln, Currency = currency, Exchange = exchange, Score = score
            };
            string result = client.SetTransakcje(transaction);

            CheckLabel.Text = result;
            client.CloseAsync();
        }
 private void RegistryContinue_Clicked(object sender, EventArgs e)
 {
     if (privacyPolicy)
     {
         if (UserPass.Text == PassCheck.Text)
         {
             WCFKantor.UserDetails newUser = new WCFKantor.UserDetails();
             newUser.UserName     = UserName.Text;
             newUser.UserSurname  = UserSurname.Text;
             newUser.UserEmail    = UserEmail.Text;
             newUser.UserPassword = UserPass.Text;
             WCFKantor.Service1Client client = new WCFKantor.Service1Client();
             string result = client.RejestracjaUzytkownika(newUser);
             CheckLabel.Text = result;
             client.CloseAsync();
         }
         else
         {
             CheckLabel.Text = "Sprawdź powtórzenie hasła.";
         }
     }
     else
     {
         CheckLabel.Text = "Musisz zaakceptować naszą Politykę prywatności.";
     }
 }
        private void CheckCurrency_Clicked(object sender, EventArgs e)
        {
            WCFKantor.Service1Client client = new WCFKantor.Service1Client();
            string info = client.CheckArchiveRate(SelectDate.Date.ToString("yyyy-MM-dd"), CurrencySign.Text);

            CheckLabel.Text = info;
            client.CloseAsync();
        }
Пример #4
0
 private void DeleteBtn_Clicked(object sender, EventArgs e)
 {
     WCFKantor.UserDetails user = new WCFKantor.UserDetails()
     {
         UserEmail = Login.emailUser
     };
     WCFKantor.Service1Client client = new WCFKantor.Service1Client();
     client.DeleteAccount(user);
 }
        private void AcceptFoundBtn_Clicked(object sender, EventArgs e)
        {
            WCFKantor.UserDetails user = new WCFKantor.UserDetails();
            user.UserEmail = Login.emailUser;
            WCFKantor.Service1Client    client   = new WCFKantor.Service1Client();
            Dictionary <string, string> userData = client.PobierzDane(user);

            WCFKantor.AccountDetails currencyPLN = new WCFKantor.AccountDetails()
            {
                UserID = Int32.Parse(userData["ID"]), Currency = "PLN", Amount = Decimal.Parse(AmountPln.Text)
            };
            CheckLabel.Text = client.UpdateStanKonta(currencyPLN);
            client.CloseAsync();
        }
Пример #6
0
        public TransactionHistory()
        {
            InitializeComponent();
            WCFKantor.Transactions   transaction = new WCFKantor.Transactions();
            WCFKantor.Service1Client client      = new WCFKantor.Service1Client();

            Dictionary <string, decimal> accountData = new Dictionary <string, decimal>();

            foreach (KeyValuePair <string, decimal> currency in accountData)
            {
                TransactionInfo.Children.Add(new Label {
                    Text = currency.Key + ":"
                });
                TransactionInfo.Children.Add(new Label {
                    Text = currency.Value.ToString()
                });
            }
            client.CloseAsync();
        }
Пример #7
0
        private async void LoginContinue_Clicked(object sender, EventArgs e)
        {
            WCFKantor.UserDetails user = new WCFKantor.UserDetails()
            {
                UserEmail = UserEmail.Text, UserPassword = UserPass.Text
            };
            WCFKantor.Service1Client client = new WCFKantor.Service1Client();
            Boolean result = client.LogowanieUzytkownika(user);
            await client.CloseAsync();

            if (result)
            {
                emailUser = UserEmail.Text;
                await Navigation.PushModalAsync(new UserPanel());
            }
            else
            {
                CheckLabel.Text = "Sprawdź poprawność danych logowania.";
            }
        }
        public TransferHistory()
        {
            InitializeComponent();
            WCFKantor.UserDetails user = new WCFKantor.UserDetails()
            {
                UserEmail = Login.emailUser
            };
            WCFKantor.Service1Client client = new WCFKantor.Service1Client();

            Dictionary <string, decimal> accountData = new Dictionary <string, decimal>();

            foreach (KeyValuePair <string, decimal> currency in accountData)
            {
                TransferInfo.Children.Add(new Label {
                    Text = currency.Key + ":"
                });
                TransferInfo.Children.Add(new Label {
                    Text = currency.Value.ToString()
                });
            }
            client.CloseAsync();
        }
Пример #9
0
        public UserPanel()
        {
            InitializeComponent();
            WCFKantor.UserDetails user = new WCFKantor.UserDetails()
            {
                UserEmail = Login.emailUser
            };
            WCFKantor.Service1Client client = new WCFKantor.Service1Client();
            getUserData   = client.PobierzDane(user);
            UserName.Text = "Witaj " + getUserData["Imie"] + " " + getUserData["Nazwisko"];
            Dictionary <string, decimal> accountData = client.GetStanKonta(user);

            foreach (KeyValuePair <string, decimal> currency in accountData)
            {
                AccountInfo.Children.Add(new Label {
                    Text = currency.Key + ":"
                });
                AccountInfo.Children.Add(new Label {
                    Text = currency.Value.ToString()
                });
            }
            client.CloseAsync();
        }
 private void CheckCurrency_Clicked(object sender, EventArgs e)
 {
     WCFKantor.Service1Client client = new WCFKantor.Service1Client();
     CheckLabel.Text = client.GetExchangeRate(CurrencySign.Text);
     client.CloseAsync();
 }