Esempio n. 1
0
        static void Main()
        {
            OrclDatabase database = new OrclDatabase();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new AuthForm());
        }
 private void login_btn_Click(object sender, EventArgs e)
 {
     if (onlineUserType != null)
     {
         OrclDatabase.SignInUser(username_txt.Text, password_txt.Text, onlineUserType);
     }
     else
     {
         MessageBox.Show("Select User type first", "Check Credentials", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
        private void register_btn_Click(object sender, EventArgs e)
        {
            if (CheckIfTextValid())
            {
                if (doctor_radio.Checked || nurse_radio.Checked)
                {
                    OrclDatabase.RegisterNewStaffUser(newName_txt.Text, newUserName_txt.Text, newPassword_txt.Text, specialty_comboBox.SelectedItem.ToString(), selectedGender, userType, isPractitionerOrResident);
                }
                else if (patient_radio.Checked)
                {
                    OrclDatabase.RegisterNewPatientUser(newName_txt.Text, newUserName_txt.Text, newPassword_txt.Text, contactNumber_txt.Text, age_txt.Text, selectedGender);
                }

                this.Dispose();
                this.Close();
                MessageBox.Show("New user registered in Database", "Operation Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }