private void start_DataBinding(object sender, EventArgs e) { Label start = (Label)sender; start.CssClass = "templateStart"; IDataItemContainer aptContainer = (IDataItemContainer)start.BindingContainer; //Access the appointment object and set its AllowEdit property: SchedulerAppointmentContainer aptCont = (SchedulerAppointmentContainer)start.Parent; Appointment app = aptCont.Appointment; DateTime startTime = (DateTime)DataBinder.Eval(aptContainer.DataItem, "Start"); start.Text = startTime.ToString("dddd, MMM, dd"); }
void subject_DataBinding(object sender, EventArgs e) { Label subject = (Label)sender; subject.CssClass = "templateSubject"; IDataItemContainer aptContainer = (IDataItemContainer)subject.BindingContainer; //Access the appointment object and set its AllowEdit property: SchedulerAppointmentContainer aptCont = (SchedulerAppointmentContainer)subject.Parent; Appointment app = aptCont.Appointment; string strSubject = HttpUtility.HtmlEncode((string)DataBinder.Eval(aptContainer.DataItem, "Subject")); subject.Text = strSubject; }
protected void lbtCustID_Click(object sender, EventArgs e) { LinkButton CustomerId = (LinkButton)sender; SchedulerAppointmentContainer appContainer = (SchedulerAppointmentContainer)CustomerId.Parent; Appointment appointment = appContainer.Appointment; int i = Convert.ToInt32(appointment.ID); DataSet ds = AdminBLL.Instance.GetInterviewDetails(i); int applicantId = 0; if (ds.Tables[0].Rows.Count > 0) { applicantId = Convert.ToInt32(ds.Tables[0].Rows[0]["ApplicantId"]); ViewState["ApplicantId"] = applicantId; } Response.Redirect("InstallCreateUser.aspx?ID=" + ViewState["ApplicantId"]); }
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); } }