protected void rlbSelectedDiagnosisList_SelectedIndexChanged(object sender, EventArgs e)
    {
        lblInfoSymptom.Visible = false;
        lblInfo.Visible = false;
        btnSaveSymptom.Visible = false;

        BindSymptom();

        rlbSelectedSymptomList.Items.Clear();
        int diagnosisId = Convert.ToInt32(rlbSelectedDiagnosisList.SelectedItem.Value);

        DataTable dtSymptom = new DoctorBAL().GetSymptomByDiagnosisId(diagnosisId);
        rlbSelectedSymptomList.DataSource = dtSymptom;
        rlbSelectedSymptomList.DataTextField = "Symptom";
        rlbSelectedSymptomList.DataValueField = "SymptomId";
        rlbSelectedSymptomList.DataBind();

        if (dtSymptom.Rows.Count > 0)
        {
            foreach (DataRow dr in dtSymptom.Rows)
            {
                rlbSymptomList.FindItemByText(dr["Symptom"].ToString()).Remove();
            }
        }

        SortSymptom();
    }
    private void LoadSelectedDiagnosis()
    {
        lblInfo.Visible = false;
        lblInfoSymptom.Visible = false;
        btnSaveSymptom.Visible = false;
        btnSave.Visible = false;

        rlbSelectedDiagnosisList.Items.Clear();
        int departmentId = Convert.ToInt32(ddlDepartment.SelectedItem.Value);

        DataTable dtDiagnosis = new DoctorBAL().GetDiagnosisByDepartmentId(departmentId);
        rlbSelectedDiagnosisList.DataSource = dtDiagnosis;
        rlbSelectedDiagnosisList.DataTextField = "Diagnosis";
        rlbSelectedDiagnosisList.DataValueField = "DiagnosisId";
        rlbSelectedDiagnosisList.DataBind();

        foreach (DataRow dr in dtDiagnosis.Rows)
        {
            rlbDiagnosisList.FindItemByText(dr["Diagnosis"].ToString()).Remove();
        }

        SortDiagnosis();
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        List<SymptomDO> listSymptom = new List<SymptomDO>();

        int departmentId = Convert.ToInt16(ddlDepartment.SelectedItem.Value);
        foreach (RadListBoxItem item in rlbSelectedDiagnosisList.Items)
        {
                SymptomDO s = new SymptomDO();
                s.DepartmentId = departmentId;
                s.DiagnosisId = Convert.ToInt32(item.Value);
                listSymptom.Add(s);
         }

        bool isSaved = new DoctorBAL().SaveDepartmentDiagnosis(listSymptom, departmentId); //Save Department Diagnosis List
        if (isSaved)
        {
            btnSave.Visible = false;
            lblInfo.Visible = true;
            lblInfo.Text = "<br/>Saved Successfully!";
        }
    }