protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        // Subit Click
        objNLog.Info("Event Started..");
        try
        {
            PatientInfoDAL Pat_Info = new PatientInfoDAL();
            Pat_Details.App_Note = txtNotes.Text;
            Pat_Details.App_Purp = txtAppPurpose.Text;
            Pat_Details.Fac_ID = Pat_Info.Get_FacID(txtFacility.Text);
            Pat_Details.Doc_ID = Pat_Info.Get_DocID(txtDoc.Text);
            char AppType;
            if (rbtnCSR.Checked == true)
            {
                AppType = 'C';
            }
            else
            {
                AppType = 'D';
            }
            Pat_Details.AppointmentType = AppType;
            Pat_Details.AppoitmentDate = txtDate.Text;
            Pat_Details.AppointmentTime = lbappointmentTime.SelectedItem.ToString();
            Pat_Details.AppStatus = 'S';
            Pat_Details.Pat_ID = (int)Session["Pat_ID"];
            string userID = (string)Session["User"];
            string Stat=Pat_Info.set_PatientAppointments(userID,Pat_Details);
            string str = "alert('" + Stat + "');";
            ScriptManager.RegisterStartupScript(btnSubmit, typeof(Page), "alert", str, true);
            fill_AppointmentsGrid(hidDocID.Value, txtDate.Text);

            Response.Redirect("AllPatientProfile.aspx?patID=" + Request.QueryString["patID"].ToString());
        }
        catch (Exception ex)
        {
            string str = "alert('Problem In Adding ...');";
            ScriptManager.RegisterStartupScript(btnSubmit, typeof(Page), "alert", str, true);
            objNLog.Error("Error : " + ex.Message);
        }
        clearTextboxes();
        objNLog.Info("Event Completed..");
    }