示例#1
0
        private async void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            //If Sign in success
            List <MAIN_TABLE> table = await App.MobileService.GetTable <MAIN_TABLE>().ToListAsync();

            string email    = txtUNAME.Text;
            string password = txtPWD.Password;
            string cat      = "";

            for (int i = 0; i < table.Count; i++)
            {
                MAIN_TABLE temp = table[i];
                if (email == temp.email && password == temp.password)
                {
                    cat = temp.category;
                    if (cat == "scribe")
                    {
                        Frame.Navigate(typeof(mytest), email);
                    }
                    else
                    {
                        Frame.Navigate(typeof(PHPSearchPage));
                    }
                }
            }

            txtMSG.Visibility = Visibility.Visible;
            // txtMSG.IsEnabled = true;
            txtMSG.Text     = "Invalid Login";
            txtUNAME.Text   = string.Empty;
            txtPWD.Password = string.Empty;
        }
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            string name     = Php_Name.Text;
            string gender   = ((ComboBoxItem)Php_Gender.SelectedItem).Content.ToString();
            string age      = Php_Age.Text;
            string password = txtPassword.Password;
            string addr     = Php_Addr.Text;
            string phone    = Php_Phone.Text;
            string email    = Php_Email.Text;

            PHP_REG item = new PHP_REG {
                name = name, gender = gender, age = age, addr = addr, phone = phone, email = email
            };
            await App.MobileService.GetTable <PHP_REG>().InsertAsync(item);

            MAIN_TABLE item1 = new MAIN_TABLE {
                email = email, password = password, category = "php"
            };
            await App.MobileService.GetTable <MAIN_TABLE>().InsertAsync(item1);
        }
示例#3
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            string name   = txtName.Text;
            string age    = txtAge.Text;
            string gender = ((ComboBoxItem)cbGender.SelectedItem).Content.ToString();

            string highest_edu = txtHEQ.Text;
            string percent     = txtHEG.Text;
            string password    = txtPassword.Password;
            string addr        = txtADDR.Text;
            string phone       = txtPHN.Text;
            string email       = txtEMAIL.Text;

            SCRIBE_REG item = new SCRIBE_REG {
                name = name, gender = gender, age = age, addr = addr, phone = phone, email = email, highest_edu = highest_edu, percent = percent
            };
            await App.MobileService.GetTable <SCRIBE_REG>().InsertAsync(item);

            MAIN_TABLE item1 = new MAIN_TABLE {
                email = email, password = password, category = "scribe"
            };
            await App.MobileService.GetTable <MAIN_TABLE>().InsertAsync(item1);
        }