Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Manager m = (Manager)Session["manager"];
         HelloLabel.Text = m.CManagerName;
         GetAllData.Appointment();
         AppointmentService ap         = new AppointmentService();
         string             whereclout = " WHERE DoctorId=ApointmentDoctorId and UserId=ApointmentUserId and HourNumber=ApointmentHour and ApointmentDay=DayId";
         string             order      = "";
         string             tabels     = "Apointment,Users,Hours,Doctors,Days";
         string             s          = "SELECT ApointmentId,ApointmentDoctorId,ApointmentUserId,ApointmentHour,ApointmentDate,UserName,HourNumber,HourStartTime,HourEndTime,DoctorName,DayName FROM " + tabels;
         s += whereclout;
         DataSet ds = ap.GetApointmentAndSort(s, tabels, order);
         //check if the dayaset isnt empty, if so, put the data in the gridview
         if (ds.Tables[0].Rows.Count != 0)
         {
             ShowAppointment.Visible    = true;
             ShowAppointment.DataSource = ds;
             ShowAppointment.DataBind();
         }
         else
         {
             Response.Write("<script>alert('לא נמצאו תורים')</script>");
         }
     }
 }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        User u = (User)Session["user"];

        HelloLabel.Text = u.CUserName;
        GetAllData.VacationsForDoctor();
        GetAllData.Appointment();
        AppointmentService appser = new AppointmentService();
        string             s = "", tables = "Apointment,Doctors,Speciality,Hours,Days";

        s                 = "SELECT ApointmentId,ApointmentDate,ApointmentHour,DoctorName,HourStartTime,HourEndTime,SpecialityName,DayName FROM " + tables;
        s                += " WHERE ApointmentHour=HourNumber and ApointmentDoctorId=DoctorId and SpecialityId=DoctorSpecailty and ApointmentDay=DayId and ApointmentUserId='" + u.CUserId + "'";
        Session["s"]      = s;
        Session["tabels"] = tables;
        DataSet ds = appser.GetApointmentAndSort(s, tables, "");

        if (ds.Tables[0].Rows.Count != 0)
        {
            CloseApointment.Visible   = true;
            SortDDL.Visible           = true;
            ApointmentGrid.Visible    = true;
            ApointmentGrid.DataSource = ds;
            ApointmentGrid.DataBind();
        }
        else
        {
            Response.Write("<script>alert('לא נמצאו תורים')</script>");
        }
    }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Doctor d = (Doctor)Session["doctor"];
         HelloLabel.Text = d.CDoctorName;
         GetAllData.VacationsForDoctor();
         GetAllData.Appointment();
     }
 }