protected void CreateUserButton_Click(object sender, EventArgs e)
        {
            Online_Doctor.Connectivity sData = new Online_Doctor.Connectivity();
            int Result = sData.InsertUser(UserName.Text.Trim(), Email.Text.Trim(), drpUserType.SelectedValue, Password.Text.Trim());

            if (Result == 0)
            {
                pnlRegister.Visible = false;
                pnlSuccess.Visible  = true;
                lblMessage.Visible  = false;
            }
            else
            {
                lblMessage.Visible = true;
            }
        }
        protected void GetData()
        {
            Online_Doctor.Connectivity sData = new Online_Doctor.Connectivity();

            SqlDataReader dr = sData.GetCausesInfo(sCausesID);

            if (dr.HasRows)
            {
                dr.Read();
                lblCauses.Text      = dr[1].ToString();
                lblDescription.Text = dr[2].ToString();
                lblSymptoms1.Text   = dr[3].ToString();
                lblTest1.Text       = dr[4].ToString();
                lblTest2.Text       = dr[5].ToString();
                lblTest3.Text       = dr[6].ToString();
                lblTreatment.Text   = dr[7].ToString();
            }
            dr.Close();
        }
        protected void SystemListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            //This is the listbox index change function for the human body symptom.
            CausesListBox.Visible = true;
            Online_Doctor.Connectivity sData = new Online_Doctor.Connectivity();

            SqlDataReader dr = sData.GetSymptomCauses(SystemListBox.SelectedValue.ToString());

            if (dr.HasRows)
            {
                CausesListBox.DataSource = dr;
                CausesListBox.DataBind();
            }
            else
            {
                CausesListBox.Items.Clear();
                CausesListBox.Items.Add("No Data Available");
            }
            dr.Close();
            causeslabel.Text = SystemListBox.SelectedValue.ToString();
        }
Beispiel #4
0
        protected void LoginButton_Click(object sender, EventArgs e)
        {
            Online_Doctor.Connectivity sData = new Online_Doctor.Connectivity();
            SqlDataReader sdr = sData.GetLogin(UserName.Text, Password.Text);

            if (sdr.HasRows)
            {
                lblMessage.Visible = false;
                sdr.Read();
                if (sdr[3].ToString() == "Doctor")
                {
                    Response.Redirect("ClientDashBoard.aspx", false);
                }
                else if (sdr[3].ToString() == "Client")
                {
                    Response.Redirect("DoctorDashBoard.aspx", false);
                }
            }
            else
            {
                lblMessage.Visible = true;
            }
        }
        protected void ImageMap1_Click(object sender, ImageMapEventArgs e)
        {
            //This is the image click function for the male front.
            string malefrontregionname = e.PostBackValue;

            switch (e.PostBackValue)
            {
            case "Head":
                partlabel.Text        = "Symptoms Of The Head";
                SystemListBox.Visible = true;
                break;

            case "Neck":
                partlabel.Text        = "Symptoms Of The Neck";
                SystemListBox.Visible = true;
                break;

            case "Chest":
                partlabel.Text        = "Symptoms Of The Chest";
                SystemListBox.Visible = true;
                break;

            case "Stomach":
                partlabel.Text        = "Symptoms Of The Stomach";
                SystemListBox.Visible = true;
                break;

            case "RightHand":
                partlabel.Text        = "Symptoms Of The Arm";
                SystemListBox.Visible = true;
                break;

            case "LeftHand":
                partlabel.Text        = "Symptoms Of The Arm";
                SystemListBox.Visible = true;
                break;

            case "LeftPalm":
                partlabel.Text        = "Symptoms Of The Palm";
                SystemListBox.Visible = true;
                break;

            case "RightPalm":
                partlabel.Text        = "Symptoms Of The Palm";
                SystemListBox.Visible = true;
                break;

            case "LeftShoulder":
                partlabel.Text        = "Symptoms Of The Shoulder";
                SystemListBox.Visible = true;
                break;

            case "RightShoulder":
                partlabel.Text        = "Symptoms Of The Shoulder";
                SystemListBox.Visible = true;
                break;

            case "Pelvis":
                partlabel.Text        = "Symptoms Of The Pelvis";
                SystemListBox.Visible = true;
                break;

            case "UpperLeftThigh":
                partlabel.Text        = "Symptoms Of The Hip";
                SystemListBox.Visible = true;
                break;

            case "UpperRightThigh":
                partlabel.Text        = "Symptoms Of The Hip";
                SystemListBox.Visible = true;
                break;

            case "LeftLeg":
                partlabel.Text        = "Symptoms Of The Leg";
                SystemListBox.Visible = true;
                break;

            case "RightLeg":
                partlabel.Text        = "Symptoms Of The Leg";
                SystemListBox.Visible = true;
                break;

            case "LeftFoot":
                partlabel.Text        = "Symptoms Of The Feet";
                SystemListBox.Visible = true;
                break;

            case "RightFoot":
                partlabel.Text        = "Symptoms Of The Feet";
                SystemListBox.Visible = true;
                break;
            }
            Online_Doctor.Connectivity sData = new Online_Doctor.Connectivity();

            SqlDataReader dr = sData.GetBPSymptoms(malefrontregionname);

            if (dr.HasRows)
            {
                SystemListBox.DataSource = dr;
                SystemListBox.DataBind();
            }
            else
            {
                SystemListBox.Items.Clear();
                SystemListBox.Items.Add("No Data Available");
            }
            dr.Close();
        }