Esempio n. 1
0
        //As of now, we can't convert the output to pdf and show bill as print. Instead, we return to main page
        private void PrintButton_Click(object sender, EventArgs e)
        {
            Main_Page MP = new Main_Page();

            this.Hide();
            MP.ShowDialog();
        }
Esempio n. 2
0
        //To activating the button's function and enable to enter user's input
        private void EnterButton_Click(object sender, EventArgs e)
        {
            //Setting the password
            String user = "******", password = "******";

            //Creating a conditional for entered details, if same, it will allow access
            if ((IDBox.Text == user) && (PasswordBox.Text == password))
            {
                MessageBox.Show("You have entered the correct password", "Welcome");
                this.Hide();
                Main_Page MP = new Main_Page();
                MP.ShowDialog();
            }
            //If the user entered the wrong password
            else
            {
                MessageBox.Show("Please re-enter the correct detail", "Wrong ID or Password");
            }
        }
Esempio n. 3
0
        private void Button3_Click(object sender, EventArgs e)
        {
            Main_Page         MP      = new Main_Page();
            string            message = "Do you want to save this appointment?";
            string            title   = "Save Appointment";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            DialogResult      result  = MessageBox.Show(message, title, buttons);

            if (result == DialogResult.Yes)
            {
                MessageBox.Show("Appointment has been saved!");
                this.Hide();
                MP.ShowDialog();
            }
            else
            {
                this.Hide();
                MP.ShowDialog();
            }
        }
Esempio n. 4
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Main_Page MP = new Main_Page();
            string    fullname, address1, address2, address3, city, gender, email;
            double    nric, postcode, contact;

            gender   = null;
            fullname = TextBox1.Text;
            nric     = double.Parse(TextBox2.Text);

            address1 = TextBox3.Text;
            address2 = TextBox4.Text;
            address3 = TextBox5.Text;
            city     = TextBox6.Text;
            postcode = double.Parse(TextBox7.Text);
            string state = this.ComboBox1.GetItemText(this.ComboBox1.SelectedItem);

            contact = double.Parse(TextBox8.Text);
            email   = TextBox9.Text;

            if (RadioButton1.Checked == true)
            {
                gender = RadioButton1.Text;
            }
            else if (RadioButton2.Checked == true)
            {
                gender = RadioButton2.Text;
            }

            MessageBox.Show("New Patient Registered!" +
                            "\n\nFull Name : " + fullname +
                            "\nNRIC : " + nric.ToString() +
                            "\nAddress : " + address1 + "\n\t " + address2 + "\n\t " + address3 +
                            "\n\t " + city + " " + postcode.ToString() + ", " + state +
                            "\nContact No. : " + contact.ToString() +
                            "\nGender : " + gender +
                            "\nEmail : " + email);
            MP.ShowDialog();
            this.Hide();
        }