private void btnOK_Click(object sender, EventArgs e) { if (!controller.IsConflictResolved()) { return; } controller.Subject = txSubject.Text; controller.SetStatus(edStatus.Status); controller.SetLabel(edLabel.Label); controller.AllDay = this.checkAllDay.Checked; controller.StartDate = this.dtStart.DateTime.Date; controller.StartTime = this.timeStart.Time.TimeOfDay; controller.EndDate = this.dtEnd.DateTime.Date; controller.EndTime = this.timeEnd.Time.TimeOfDay; controller.strSO = txCustomName.Text; controller.strEmployeeID = txCustomStatus.Text; // Save all changes made to the appointment edited in a form. controller.ApplyChanges(); }
private void btnOK_Click(object sender, EventArgs e) { if (!controller.IsConflictResolved()) { return; } int nWorkFlow = 0; controller.Subject = cmbSubject.Text; controller.SetStatus(edLabel.Status); controller.SetLabel(edStatus.Label); controller.AllDay = this.checkAllDay.Checked; controller.StartDate = this.dtStart.DateTime.Date; controller.StartTime = this.timeStart.Time.TimeOfDay; controller.EndDate = this.dtEnd.DateTime.Date; controller.EndTime = this.timeEnd.Time.TimeOfDay; controller.strDetail = txtDetail.Text; controller.nEmployeeID = System.Convert.ToInt32(lkeEmployee.EditValue); controller.HasReminder = this.checkSMS.Checked; controller.ReminderTimeBeforeStart = TimeSpan.FromSeconds(10); controller.fCampaign = this.checkCampaign.Checked; if (cmbSubject.SelectedValue != null) { nWorkFlow = System.Convert.ToInt32(cmbSubject.SelectedValue.ToString()); controller.nWorkFlowID = nWorkFlow; } int Output; if (fNew && this.checkCampaign.Checked && cmbSubject.SelectedValue != null && int.TryParse(cmbSubject.SelectedValue.ToString(), out Output) == true) { GetChild(System.Convert.ToInt32(cmbSubject.SelectedValue)); InsertSubTask(strChild.Substring(0, strChild.Length - 1), dtStart.DateTime.Date, dtEnd.DateTime.Date); } // Save all changes made to the appointment edited in a form. controller.ApplyChanges(); }