示例#1
0
 protected void ShowDataGridForDoctor_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteDoctor")
     {
         DoctorService ds        = new DoctorService();
         int           rowNumber = Convert.ToInt32(e.CommandArgument);
         string        docId     = ShowDataGridForDoctor.Rows[rowNumber].Cells[11].Text; //because there is no rtl mode
         ds.DeleteDoctorFromDateBase(docId);
         string where = " where CityId=DoctorCity and SpecialityId=DoctorSpecailty";
         DataSet data = ds.ShowDoctorForManager(where);
         ShowDataGridForDoctor.Visible    = true;
         ShowDataGridForUser.Visible      = false;
         ShowDataGridForDoctor.DataSource = data;
         ShowDataGridForDoctor.DataBind();
     }
     if (e.CommandName == "ContactWithDoctor")
     {
         //revil label and buttons to send the message
         Label4.Visible         = true;
         ThemeTB.Visible        = true;
         Label2.Visible         = true;
         MessageContent.Visible = true;
         CloseMessage.Visible   = true;
         ResetMessage.Visible   = true;
         SendMessage.Visible    = true;
         MessageContent.Text    = "";
         int    rowNumber = Convert.ToInt32(e.CommandArgument);
         string id        = ShowDataGridForDoctor.Rows[rowNumber].Cells[0].Text;
         Session["adress"] = "doctor";
         Session["id"]     = id;
     }
     if (e.CommandName == "DoctorVacation")
     {
     }
 }