Esempio n. 1
0
    protected void SortDDL_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataSet         ds;
        VacationService vs         = new VacationService();
        string          whereclout = " WHERE DoctorId=VacationDoctorId and ManagerId=VacationManagerId";
        int             x          = SortDDL.SelectedIndex;

        switch (x)
        {
        case 1:
        {
            whereclout += " ORDER BY VacationDoctorId";
            break;
        }

        case 2:
        {
            whereclout += " ORDER BY VacationManagerId";
            break;
        }

        case 3:
        {
            whereclout += " ORDER BY VacationStartDate";
            break;
        }
        }
        ds = vs.SortVacation(whereclout);
        if (ds.Tables[0].Rows.Count != 0)
        {
            CloseVac.Visible   = true;
            ShowVac.Visible    = true;
            ShowVac.DataSource = ds;
            ShowVac.DataBind();
        }
        else
        {
            Response.Write("<script>alert('לא נמצאו חופשות')</script>");
        }
    }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Manager m = (Manager)Session["manager"];
         HelloLabel.Text = m.CManagerName;
         GetAllData.VacationsForDoctor();
         VacationService vs         = new VacationService();
         string          whereclout = " WHERE DoctorId=VacationDoctorId and ManagerId=VacationManagerId";
         DataSet         ds         = vs.SortVacation(whereclout);
         ShowVac.Visible = false;
         if (ds.Tables[0].Rows.Count != 0)
         {
             CloseVac.Visible   = true;
             ShowVac.Visible    = true;
             ShowVac.DataSource = ds;
             ShowVac.DataBind();
         }
         else
         {
             Response.Write("<script>alert('לא נמצאו חופשות')</script>");
         }
     }
 }