Exemplo n.º 1
0
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        Doctor_ChangeIPDMedicineStatusBL objDoctor_ChangeIPDMedicineStatusBL = new Doctor_ChangeIPDMedicineStatusBL();

        if (ds.Tables[0].Rows[GridView1.SelectedIndex][10].ToString() == "Inactive")
        {
            objDoctor_ChangeIPDMedicineStatusBL.Doctor_ChangeIPDMedicineStatus(Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][0].ToString()), 1);
        }
        else
        {
            objDoctor_ChangeIPDMedicineStatusBL.Doctor_ChangeIPDMedicineStatus(Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][0].ToString()), 0);
        }
        Doctor_GetIPDAllMedicinesBL objDoctor_GetIPDAllMedicinesBL = new Doctor_GetIPDAllMedicinesBL();

        ds = objDoctor_GetIPDAllMedicinesBL.Doctor_GetIPDAllMedicines(Convert.ToInt32(patientId), Convert.ToInt32(Session["doctorId"].ToString()));
        if (ds.Tables[0].Rows.Count != 0)
        {
            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
        else
        {
            GridView1.DataSource = null;
            GridView1.DataBind();
            Label1.Visible = true;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if(!IsPostBack)
     {
         patientId = Convert.ToInt32(Session["patientId"].ToString());
         Doctor_GetIPDAllMedicinesBL objDoctor_GetIPDAllMedicinesBL = new Doctor_GetIPDAllMedicinesBL();
         ds = objDoctor_GetIPDAllMedicinesBL.Doctor_GetIPDAllMedicines(patientId, Convert.ToInt32(Session["doctorId"].ToString()));
         if(ds.Tables[0].Rows.Count != 0)
         {
             GridView1.DataSource = ds;
             GridView1.DataBind();
         }
         else
         {
             GridView1.DataSource = null;
             GridView1.DataBind();
             Label1.Visible = true;
         }
     }
 }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         patientId = Convert.ToInt32(Session["patientId"].ToString());
         Doctor_GetIPDAllMedicinesBL objDoctor_GetIPDAllMedicinesBL = new Doctor_GetIPDAllMedicinesBL();
         ds = objDoctor_GetIPDAllMedicinesBL.Doctor_GetIPDAllMedicines(patientId, Convert.ToInt32(Session["doctorId"].ToString()));
         if (ds.Tables[0].Rows.Count != 0)
         {
             GridView1.DataSource = ds;
             GridView1.DataBind();
         }
         else
         {
             GridView1.DataSource = null;
             GridView1.DataBind();
             Label1.Visible = true;
         }
     }
 }
 protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     Doctor_ChangeIPDMedicineStatusBL objDoctor_ChangeIPDMedicineStatusBL = new Doctor_ChangeIPDMedicineStatusBL();
     if(ds.Tables[0].Rows[GridView1.SelectedIndex][10].ToString() == "Inactive")
         objDoctor_ChangeIPDMedicineStatusBL.Doctor_ChangeIPDMedicineStatus(Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][0].ToString()), 1);
     else
         objDoctor_ChangeIPDMedicineStatusBL.Doctor_ChangeIPDMedicineStatus(Convert.ToInt32(ds.Tables[0].Rows[GridView1.SelectedIndex][0].ToString()), 0);
     Doctor_GetIPDAllMedicinesBL objDoctor_GetIPDAllMedicinesBL = new Doctor_GetIPDAllMedicinesBL();
     ds = objDoctor_GetIPDAllMedicinesBL.Doctor_GetIPDAllMedicines(Convert.ToInt32(patientId), Convert.ToInt32(Session["doctorId"].ToString()));
     if(ds.Tables[0].Rows.Count != 0)
     {
         GridView1.DataSource = ds;
         GridView1.DataBind();
     }
     else
     {
         GridView1.DataSource = null;
         GridView1.DataBind();
         Label1.Visible = true;
     }
 }