private void DoctorDashBoard_Load(object sender, EventArgs e)
        {
            int drID = DoctorClass.GetDoctorID(emailID);

            groupBox2.Text = "Dr. ID: " + drId.ToString();

            List <string> timeList1 = new List <string>();

            timeList1.Add("8:00 AM");
            timeList1.Add("9:00 AM");
            timeList1.Add("10:00 AM");
            timeList1.Add("11:00 PM");
            timeList1.Add("12:00 PM");
            timeList1.Add("1:00 PM");
            timeList1.Add("2:00 PM");
            timeList1.Add("3:00 PM");
            timeList1.Add("4:00 PM");
            timeList1.Add("5:00 PM");
            timeList1.Add("6:00 PM");

            List <string> timeList2 = new List <string>();

            timeList2.Add("12:00 AM");
            timeList2.Add("1:00 AM");
            timeList2.Add("2:00 AM");
            timeList2.Add("3:00 PM");
            timeList2.Add("4:00 PM");
            timeList2.Add("5:00 PM");
            timeList2.Add("6:00 PM");
            timeList2.Add("7:00 PM");
            timeList2.Add("8:00 PM");
            timeList2.Add("9:00 PM");

            DoctorClass.DoctorAvailableTimeSet(timeList1, timeList2, comboBox1, comboBox2);
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            bool getType = DoctorClass.DeleteDoctor(textBox1.Text);

            if (getType == true)
            {
                List <Label> labelList = new List <Label>();
                labelList.Add(label9);
                labelList.Add(label2);
                labelList.Add(label3);
                labelList.Add(label4);
                labelList.Add(label4);
                labelList.Add(label5);
                labelList.Add(label6);
                labelList.Add(label7);
                labelList.Add(label8);

                List <TextBox> textBoxList = new List <TextBox>();
                textBoxList.Add(textBox2);
                textBoxList.Add(textBox3);
                textBoxList.Add(textBox4);
                textBoxList.Add(textBox5);
                textBoxList.Add(textBox6);
                textBoxList.Add(textBox7);
                textBoxList.Add(textBox8);
                textBoxList.Add(textBox9);

                MessageBox.Show("User deleted successfully", "Query Result");
                DoctorClass.HideOrEnabledDefaultDoctorProfileLabel(labelList, textBoxList, false);
                textBox1.Clear();
            }
        }
Exemplo n.º 3
0
        private void ViewOrDeleteDoctor_Load(object sender, EventArgs e)
        {
            List <Label> labelList = new List <Label>();

            labelList.Add(label9);
            labelList.Add(label2);
            labelList.Add(label3);
            labelList.Add(label4);
            labelList.Add(label4);
            labelList.Add(label5);
            labelList.Add(label6);
            labelList.Add(label7);
            labelList.Add(label8);

            List <TextBox> textBoxList = new List <TextBox>();

            textBoxList.Add(textBox2);
            textBoxList.Add(textBox3);
            textBoxList.Add(textBox4);
            textBoxList.Add(textBox5);
            textBoxList.Add(textBox6);
            textBoxList.Add(textBox7);
            textBoxList.Add(textBox8);
            textBoxList.Add(textBox9);

            DoctorClass.HideOrEnabledDefaultDoctorProfileLabel(labelList, textBoxList, false);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            CheckUserTypeClass.CheckIsAdminMethod(this, textBox1, passwordText /*,isAdmin*/);
            /*isDoctor = */ CheckUserTypeClass.CheckIsDoctorMethod(this, textBox1, passwordText);
            /*isPatient = */ CheckUserTypeClass.CheckIsPatientMethod(this, textBox1, passwordText);

            //MessageBox.Show(isAdmin.ToString() + " " + isDoctor.ToString() + " " + isPatient.ToString());


            if (isAdmin == true && isDoctor == false && isPatient == false)
            {
                AdminClass.AdminLogin(this, textBox1.Text, passwordText.Text);
            }
            else if (isAdmin == false && isDoctor == true && isPatient == false)
            {
                DoctorClass.DoctorLogIn(this, textBox1.Text, passwordText.Text);
            }
            else if (isAdmin == false && isDoctor == false && isPatient == true)
            {
                PatientClass.PatientLogIn(this, textBox1.Text, passwordText.Text);
            }
            else
            {
                MessageBox.Show("Login failed...", "Query Result");
            }
        }
        public DoctorDashBoard(string emailID, int drId)
        {
            InitializeComponent();
            this.emailID = emailID;

            drId      = DoctorClass.GetDoctorID(emailID);
            this.drId = drId;

            //MessageBox.Show(drId.ToString());
        }
        private void DoctorProfile_Load(object sender, EventArgs e)
        {
            textBoxList.Add(textBox1);
            textBoxList.Add(textBox2);
            textBoxList.Add(textBox3);
            textBoxList.Add(textBox4);
            textBoxList.Add(textBox5);
            textBoxList.Add(textBox6);
            textBoxList.Add(textBox8);

            DoctorClass.DoctorProfile(emailID, groupBox1, comboBox1, dateTimePicker1, textBoxList);
        }
Exemplo n.º 7
0
        private void button4_Click_1(object sender, EventArgs e)
        {
            bool result = DoctorClass.DrIdValidOrNot(int.Parse(textBox1.Text));

            if (result == true)
            {
                PatientClass.BookDoctorByPatient(int.Parse(textBox1.Text), PatientClass.GetPatientID(emailID), comboBox1);
            }
            else
            {
                MessageBox.Show("Try with correct id from the list", "Query Result");
            }
        }
Exemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            userID = textBox1.Text;
            List <Label> labelList = new List <Label>();

            labelList.Add(label9);
            labelList.Add(label2);
            labelList.Add(label3);
            labelList.Add(label4);
            labelList.Add(label4);
            labelList.Add(label5);
            labelList.Add(label6);
            labelList.Add(label7);
            labelList.Add(label8);

            List <TextBox> textBoxList = new List <TextBox>();

            textBoxList.Add(textBox2);
            textBoxList.Add(textBox3);
            textBoxList.Add(textBox4);
            textBoxList.Add(textBox5);
            textBoxList.Add(textBox6);
            textBoxList.Add(textBox7);
            textBoxList.Add(textBox8);
            textBoxList.Add(textBox9);

            if (userID == "")
            {
                MessageBox.Show("You must provide an Doctor ID", "Notification");
                DoctorClass.HideOrEnabledDefaultDoctorProfileLabel(labelList, textBoxList, false);
            }
            else
            {
                DoctorClass.SearchDoctor(labelList, textBoxList, userID);
            }
        }
Exemplo n.º 9
0
 private void DoctorBookingHistory_Load(object sender, EventArgs e)
 {
     DoctorClass.ShowDoctorBookingHistory(dataGridView1, drID);
 }
 private void label2_Click(object sender, EventArgs e)
 {
     new DoctorDashBoard(emailID, DoctorClass.GetDoctorID(emailID)).Show();
     this.Hide();
 }
 private void button1_Click(object sender, EventArgs e)
 {
     DoctorClass.DoctorProfileUpdate(emailID, textBoxList, comboBox1, dateTimePicker1);
 }
 private void button2_Click_1(object sender, EventArgs e)
 {
     DoctorClass.DeletePatient(int.Parse(textBox1.Text));
 }
 private void button2_Click(object sender, EventArgs e)
 {
     DoctorClass.DoctorAvailableTimeSetToDB(emailID, comboBox1.Text, comboBox2.Text, DoctorClass.GetDoctorID(emailID));
 }