/// <summary> /// Handles the OnNavigationComplete event of the _rsReservations control. /// </summary> /// <param name = "sender">The source of the event.</param> /// <param name = "e">The <see cref = "Telerik.Web.UI.SchedulerNavigationCompleteEventArgs" /> instance containing the event data.</param> protected void _rsReservations_OnNavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { var db = new UrbanDataContext(); var selectedDate = _rsReservations.SelectedDate; switch (Type) { case 1: { Appointments = AppointmentUtilities.GetAppointmentObjectsByDateRangeAndRoomId(ref db, new DateTime(selectedDate.Year, selectedDate.Month, 1), new DateTime(selectedDate.Year, selectedDate.Month, 1).AddMonths(1).AddDays(-1), Utilities.GetQueryStringInt("roomId")); break; } case 2: { Appointments = AppointmentUtilities.GetAllReservedObjectsByDateRangeAndUserId(ref db, new DateTime(selectedDate.Year, selectedDate.Month, 1), new DateTime(selectedDate.Year, selectedDate.Month, 1).AddMonths(1).AddDays(-1), Cu.Id); break; } case 3: { Appointments = AppointmentUtilities.GetAllReservedObjectsByReservationId(ref db, Utilities.GetQueryStringInt("RoomReservationID")); break; } } _rsReservations.DataSource = Appointments; _rsReservations.Rebind(); }
/// <summary> /// Handles the OnNavigationComplete event of the rScheduler control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.SchedulerNavigationCompleteEventArgs"/> instance containing the event data.</param> protected void rScheduler_OnNavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { if (e.Command == SchedulerNavigationCommand.SwitchToDayView || e.Command == SchedulerNavigationCommand.NavigateToSelectedDate || e.Command == SchedulerNavigationCommand.SwitchToSelectedDay) { ucTaskFilter.UpdatePeriod(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd); RebindTasks(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd, false); } else if (e.Command == SchedulerNavigationCommand.SwitchToWeekView) { ucTaskFilter.UpdatePeriod(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd); RebindTasks(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd, false); } else if (e.Command == SchedulerNavigationCommand.SwitchToMonthView) { ucTaskFilter.UpdatePeriod(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd); RebindTasks(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd, false); } else if (e.Command == SchedulerNavigationCommand.SwitchToTimelineView) { ucTaskFilter.UpdatePeriod(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd); RebindTasks(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd, false); } else if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod) { ucTaskFilter.UpdatePeriod(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd); RebindTasks(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd, false); } else if (e.Command == SchedulerNavigationCommand.NavigateToNextPeriod) { ucTaskFilter.UpdatePeriod(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd); RebindTasks(rScheduler.VisibleRangeStart, rScheduler.VisibleRangeEnd, false); } }
protected void EventScheduler_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { if (EventScheduler.SelectedView != SchedulerViewType.TimelineView) { return; } Utility.SetTimeLineAttributes(EventScheduler, hfSchedulerDate); }
protected void rsScheduler_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { // Fill the Table with dummmy data table = GetData(); // Assign the table to the RadScheduler rsScheduler.DataSource = table; rsScheduler.DataBind(); }
/// <summary> /// Handles the OnNavigationComplete event of the _rsReservations control. /// </summary> /// <param name = "sender">The source of the event.</param> /// <param name = "e">The <see cref = "Telerik.Web.UI.SchedulerNavigationCompleteEventArgs" /> instance containing the event data.</param> protected void _rsReservations_OnNavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { var db = new UrbanDataContext(); var selectedDate = _rsReservations.SelectedDate; Appointments = AppointmentUtilities.GetAppointmentObjectsByDateRangeAndRoomId(ref db, new DateTime(selectedDate.Year, selectedDate.Month, 1), new DateTime(selectedDate.Year, selectedDate.Month, 1).AddMonths(1).AddDays(-1), Utilities.GetQueryStringInt("roomId")).ToList(); _rsReservations.DataSource = Appointments; _rsReservations.Rebind(); }
/// <summary> /// Handles the OnNavigationComplete event of the _rsReservations control. /// </summary> /// <param name = "sender">The source of the event.</param> /// <param name = "e">The <see cref = "Telerik.Web.UI.SchedulerNavigationCompleteEventArgs" /> instance containing the event data.</param> protected void _rsReservations_OnNavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { var db = new UrbanDataContext(); var selectedDate = _rsReservations.SelectedDate; ViewState["Appointments"] = AppointmentUtilities.GetAllReservedObjectsByReservationId(ref db, RoomReservationId); _rsReservations.DataSource = Appointments; _rsReservations.Rebind(); }
protected void RadScheduler1_NavigationComplete1(object sender, SchedulerNavigationCompleteEventArgs e) { RadScheduler scheduler = (RadScheduler)sender; if (e.Command == SchedulerNavigationCommand.SwitchToSelectedDay) { scheduler.SelectedView = SchedulerViewType.TimelineView; } if (scheduler.SelectedView!=SchedulerViewType.TimelineView) { if (e.Command == SchedulerNavigationCommand.SwitchToTimelineView) { RadScheduler1.RowHeight = 60; RadScheduler1.AppointmentTemplate = new AppTemplate(); RadScheduler1.GroupBy = "Date,Room"; RadScheduler1.GroupingDirection = GroupingDirection.Vertical; } else { RadScheduler1.RowHeight = 25; } } else { if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod || e.Command == SchedulerNavigationCommand.NavigateToNextPeriod || e.Command == SchedulerNavigationCommand.SwitchToSelectedDay) { RadScheduler1.RowHeight = 60; RadScheduler1.AppointmentTemplate = new AppTemplate(); RadScheduler1.GroupBy = "Date,Room"; RadScheduler1.GroupingDirection = GroupingDirection.Vertical; } else { RadScheduler1.RowHeight = 25; } } }
protected void RadScheduler1_NavigationComplete1(object sender, SchedulerNavigationCompleteEventArgs e) { RadScheduler scheduler = (RadScheduler)sender; if (e.Command == SchedulerNavigationCommand.SwitchToSelectedDay) { scheduler.SelectedView = SchedulerViewType.TimelineView; } if (scheduler.SelectedView != SchedulerViewType.TimelineView) { if (e.Command == SchedulerNavigationCommand.SwitchToTimelineView) { RadScheduler1.RowHeight = 60; RadScheduler1.AppointmentTemplate = new AppTemplate(); RadScheduler1.GroupBy = "Date,Room"; RadScheduler1.GroupingDirection = GroupingDirection.Vertical; } else { RadScheduler1.RowHeight = 25; } } else { if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod || e.Command == SchedulerNavigationCommand.NavigateToNextPeriod || e.Command == SchedulerNavigationCommand.SwitchToSelectedDay) { RadScheduler1.RowHeight = 60; RadScheduler1.AppointmentTemplate = new AppTemplate(); RadScheduler1.GroupBy = "Date,Room"; RadScheduler1.GroupingDirection = GroupingDirection.Vertical; } else { RadScheduler1.RowHeight = 25; } } }
/// <summary> /// Handles the OnNavigationComplete event of the _rsReservations control. /// </summary> /// <param name = "sender">The source of the event.</param> /// <param name = "e">The <see cref = "Telerik.Web.UI.SchedulerNavigationCompleteEventArgs" /> instance containing the event data.</param> protected void _rsReservations_OnNavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { var db = new UrbanDataContext(); var selectedDate = _rsReservations.SelectedDate; Appointments = RoomAvailabilityUtilities.GetAppointmentObjsWithRecurring(ref db, new DateTime(selectedDate.Year, selectedDate.Month, 1), new DateTime(selectedDate.Year, selectedDate.Month, 1).AddMonths(1).AddDays(-1), Utilities.GetQueryStringInt("roomId")).ToList(); _rsReservations.DataSource = Appointments; _rsReservations.Rebind(); }
// //////////////////////////////////////////////////////////////////////// // AUXILIAR EVENTS // protected void tkrsNonWorkingDays_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { ViewState["date_to_show"] = tkrsNonWorkingDays.SelectedDate.ToString(); }
protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { SchedulerLoad(); }
/// <summary> /// Handles the OnNavigationComplete event of the _rsReservations control. /// </summary> /// <param name = "sender">The source of the event.</param> /// <param name = "e">The <see cref = "Telerik.Web.UI.SchedulerNavigationCompleteEventArgs" /> instance containing the event data.</param> protected void _rsReservations_OnNavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { var db = new UrbanDataContext(); var selectedDate = _rsReservations.SelectedDate; Appointments = AppointmentUtilities.GetAllReservedObjectsByDateRangeAndUserId(ref db, new DateTime(selectedDate.Year, selectedDate.Month, 1), new DateTime(selectedDate.Year, selectedDate.Month, 1).AddMonths(1).AddDays(-1), Cu.Id).ToList(); _rsReservations.DataSource = Appointments; _rsReservations.Rebind(); }
protected void tkrsVacations_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { lblTitle.Text = "Vacations Calendar for " + tkrsVacations.SelectedDate.ToString("MMMM") + " " + tkrsVacations.SelectedDate.Year.ToString(); ViewState["date_to_show"] = tkrsVacations.SelectedDate.ToString(); }
protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { RadCalendar1.FocusedDate = RadScheduler1.SelectedDate; SyncCalendars(); }
// //////////////////////////////////////////////////////////////////////// // AUXILIAR EVENTS // protected void tkrsVacations_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { DateTime dateToShowOld = DateTime.Parse((string)ViewState["date_to_show"]); ViewState["date_to_show"] = tkrsVacations.SelectedDate.ToString(); DateTime dateToShowNew = DateTime.Parse((string)ViewState["date_to_show"]); if (dateToShowNew.Year != dateToShowOld.Year) { VacationsInformationBasicInformationGateway vacationsInformationBasicInformationGateway = new VacationsInformationBasicInformationGateway(vacationsInformationTDS); vacationsInformationBasicInformationGateway.LoadByEmployeeIdYear(Int32.Parse(hdfEmployeeId.Value), dateToShowNew.Year, Int32.Parse(hdfCompanyId.Value)); if (vacationsInformationBasicInformationGateway.Table.Rows.Count == 0) { Response.Redirect("./../../error_page.aspx?error=" + "The team member don't have max paid day vacations defined in the system. Contact your system administrator."); } else { LoadData(Int32.Parse(hdfEmployeeId.Value), dateToShowNew.Year, Int32.Parse(hdfRequestId.Value)); } } }
protected void tkrsVacations_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { DateTime dateToShowOld = DateTime.Parse((string)ViewState["date_to_show"]); ViewState["date_to_show"] = tkrsVacations.SelectedDate.ToString(); DateTime dateToShowNew = DateTime.Parse((string)ViewState["date_to_show"]); int companyId = Int32.Parse(hdfCompanyId.Value); int employeeId = Int32.Parse(hdfEmployeeId.Value); if (dateToShowNew.Year != dateToShowOld.Year) { VacationsAddBasicInformationGateway vacationsAddBasicInformationGateway = new VacationsAddBasicInformationGateway(vacationsAddTDS); vacationsAddBasicInformationGateway.LoadByEmployeeIdYear(employeeId, dateToShowNew.Year, companyId); if (vacationsAddBasicInformationGateway.Table.Rows.Count == 0) { Response.Redirect("./../../error_page.aspx?error=" + "The team member don't have paid day vacations defined in the system. Contact your system administrator."); } else { LoadData(Int32.Parse(hdfEmployeeId.Value), dateToShowNew.Year); // ... Load non working days EmployeeGateway employeeGateway = new EmployeeGateway(); employeeGateway.LoadByEmployeeId(employeeId); string employeeType = employeeGateway.GetType(employeeId); int companyLevelId = 3; //USA if (employeeType.Contains("CA")) { companyLevelId = 2;//Canada } VacationsAddDaysInformation vacationsAddDaysInformation = new VacationsAddDaysInformation(vacationsAddTDS); //vacationsAddDaysInformation.LoadNonWorkingDaysByCompanyLevelId(companyLevelId, companyId); // ... Load previews vacations //vacationsAddDaysInformation.LoadPreviousVacations(employeeId, companyId); vacationsAddDaysInformation.LoadDataForVacationsAdd(companyLevelId, employeeId, companyId); } Session["vacationsAddTDS"] = vacationsAddTDS; Session["vacationDaysInformation"] = vacationsAddTDS.DaysInformation; } }