Ejemplo n.º 1
0
 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
 {
     if (e.Argument == "RebindScheduler")
     {
         VaaScheduler.Rebind();
     }
 }
Ejemplo n.º 2
0
 private void BindSchedules()
 {
     try
     {
         var schedulerdata = _scheduleManagement.GetAllSchedules();
         VaaScheduler.DataSource = schedulerdata;
         VaaScheduler.DataBind();
     }
     catch (Exception ex)
     {
         //write to Elma
         ErrorSignal.FromCurrentContext().Raise(ex);
     }
 }
Ejemplo n.º 3
0
        protected void CompletedStatusCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                CheckBox CompletedStatusCheckBox = (CheckBox)sender;
                //Find the appointment object to directly interact with it
                SchedulerAppointmentContainer appContainer = (SchedulerAppointmentContainer)CompletedStatusCheckBox.Parent;
                Appointment appointment         = appContainer.Appointment;
                Appointment appointmentToUpdate = VaaScheduler.PrepareToEdit(appointment, VaaScheduler.EditingRecurringSeries);
                var         appointmentId       = Convert.ToInt16(appointmentToUpdate.ID);
                appointmentToUpdate.Attributes["Completed"] = CompletedStatusCheckBox.Checked.ToString();
                //VaaScheduler.(appointmentToUpdate);
                if (CompletedStatusCheckBox.Checked == true)
                {
                    Schedules newSchedules = new Schedules()
                    {
                        ID        = appointmentId,
                        Completed = true
                    };
                    _scheduleManagement.UpdateStatus(newSchedules);
                }
                else
                {
                    Schedules newSchedules = new Schedules()
                    {
                        ID        = appointmentId,
                        Completed = false
                    };
                    _scheduleManagement.UpdateStatus(newSchedules);
                }
                Response.Redirect("~/schedules.aspx");

                VaaScheduler.Rebind();

                ScriptManager.RegisterStartupScript(this, this.GetType(), "mykey", "rebind();", true);
            }
            catch (Exception ex)
            {
                //write to Elma
                ErrorSignal.FromCurrentContext().Raise(ex);
            }
        }