protected void Button2_Click(object sender, EventArgs e)
    {
        int patientId = Convert.ToInt32(Session["patientId"].ToString());
        int previousWardId = Convert.ToInt32(Session["previousWardId"].ToString());
        int previousardNumber = Convert.ToInt32(Session["previousardNumber"].ToString());
        string transferDate = DateTime.ParseExact(TextBox3.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string transferTime = TextBox4.Text;
        string reasonForTransfer = TextBox2.Text;
        int newWardId = Convert.ToInt32(DropDownList1.SelectedValue);
        int newWardNumber = Convert.ToInt32(DropDownList2.Text);

        Common_PatientWardTransferBL objCommon_PatientWardTransferBL = new Common_PatientWardTransferBL();
        Session["wardTransferId"] = objCommon_PatientWardTransferBL.Common_PatientWardTransfer(patientId, previousWardId, previousardNumber, transferDate, transferTime, reasonForTransfer, newWardId, newWardNumber, Convert.ToInt32(Session["doctorId"].ToString()));
        Label1.Visible = true;
        reset();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        int    patientId         = Convert.ToInt32(Session["patientId"].ToString());
        int    previousWardId    = Convert.ToInt32(Session["previousWardId"].ToString());
        int    previousardNumber = Convert.ToInt32(Session["previousardNumber"].ToString());
        string transferDate      = DateTime.ParseExact(TextBox3.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string transferTime      = TextBox4.Text;
        string reasonForTransfer = TextBox2.Text;
        int    newWardId         = Convert.ToInt32(DropDownList1.SelectedValue);
        int    newWardNumber     = Convert.ToInt32(DropDownList2.Text);

        Common_PatientWardTransferBL objCommon_PatientWardTransferBL = new Common_PatientWardTransferBL();

        Session["wardTransferId"] = objCommon_PatientWardTransferBL.Common_PatientWardTransfer(patientId, previousWardId, previousardNumber, transferDate, transferTime, reasonForTransfer, newWardId, newWardNumber, Convert.ToInt32(Session["doctorId"].ToString()));
        Label1.Visible            = true;
        reset();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        int patientId = Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][0].ToString());
        int previousWardId = Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][5].ToString());
        int previousardNumber = Convert.ToInt32(Label8.Text);
        string transferDate = DateTime.ParseExact(TextBox3.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string transferTime = TextBox4.Text;
        string reasonForTransfer = TextBox2.Text;
        int newWardId = Convert.ToInt32(DropDownList1.SelectedValue);
        int newWardNumber = Convert.ToInt32(DropDownList2.Text);

        Common_PatientWardTransferBL objPatientWardTransferBL = new Common_PatientWardTransferBL();
        objPatientWardTransferBL.Common_PatientWardTransfer(patientId, previousWardId, previousardNumber, transferDate, transferTime, reasonForTransfer, newWardId, newWardNumber, Convert.ToInt32(Session["receptionistId"].ToString()));
        Label1.Text = "Patient Transferred";
        Label1.BackColor = System.Drawing.Color.Yellow;
        Label1.Visible = true;
        Label1.ForeColor = System.Drawing.Color.Black;
        Panel1.Visible = false;
        searchPatient();
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        int    patientId         = Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][0].ToString());
        int    previousWardId    = Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][5].ToString());
        int    previousardNumber = Convert.ToInt32(Label8.Text);
        string transferDate      = DateTime.ParseExact(TextBox3.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string transferTime      = TextBox4.Text;
        string reasonForTransfer = TextBox2.Text;
        int    newWardId         = Convert.ToInt32(DropDownList1.SelectedValue);
        int    newWardNumber     = Convert.ToInt32(DropDownList2.Text);

        Common_PatientWardTransferBL objPatientWardTransferBL = new Common_PatientWardTransferBL();

        objPatientWardTransferBL.Common_PatientWardTransfer(patientId, previousWardId, previousardNumber, transferDate, transferTime, reasonForTransfer, newWardId, newWardNumber, Convert.ToInt32(Session["receptionistId"].ToString()));
        Label1.Text      = "Patient Transferred";
        Label1.BackColor = System.Drawing.Color.Yellow;
        Label1.Visible   = true;
        Label1.ForeColor = System.Drawing.Color.Black;
        Panel1.Visible   = false;
        searchPatient();
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }