public override void ApplySecurity(DataRow dr) { atriumDB.AppointmentRow cbr = (atriumDB.AppointmentRow)dr; UIHelper.EnableControls(AppointmentBindingSource, FM.GetAppointment().CanEdit(cbr)); UIHelper.EnableCommandBarCommand(tsDelete, FM.GetAppointment().CanDelete(cbr)); if (ApptIsHearing()) { tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.False; } tentativeUICheckBox.Enabled = false; vacationUICheckBox.Enabled = false; }
public override void ReloadUserControlData() { int apptId = 0; if (CurrentRow() != null) { apptId = CurrentRow().ApptId; } AppointmentBindingSource.SuspendBinding(); if (IsOfficerCal) { //must be calendar screen FM.GetAppointment().LoadByContactId(OfficerId); } //else //{ // FM.GetAppointment().LoadByContactId(FM.AtMng.WorkingAsOfficer.OfficerId); //} LoadAttendeeContacts(); //AddRecurrenceSymbol(); AppointmentBindingSource.ResumeBinding(); schedule1.Refetch(); if (IsOfficerCal) { if (apptId == 0) { SoonestAppointment(); } else { int pos = AppointmentBindingSource.Find("ApptId", apptId); if (pos != -1) { AppointmentBindingSource.Position = pos; } else { SoonestAppointment(); } } } else { SoonestAppointment(); } }
private void HearingGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { try { string timeZone = UIHelper.GetAcronymTimeZoneLabel(); SST.HearingRow hearingRow = (SST.HearingRow)((DataRowView)e.Row.DataRow).Row; if (!hearingRow.IsNull("ApptId")) { var fcx = from fc in FM.DB.Appointment where fc.ApptId == hearingRow.ApptId select fc; atriumDB.AppointmentRow apptRow; if (fcx.Count() == 1) { apptRow = fcx.Single(); } else { apptRow = FM.GetAppointment().Load(hearingRow.ApptId); } if (FM.AppMan.Language.ToUpper() == "ENG") { e.Row.Cells["StartDate"].Value = apptRow.StartDateLocal.ToString("MMMM dd, yyyy @ hh:mm tt", System.Globalization.CultureInfo.CreateSpecificCulture("en-CA")) + " " + timeZone; } else { e.Row.Cells["StartDate"].Value = apptRow.StartDateLocal.ToString("dd MMMM yyyy à HH:mm", System.Globalization.CultureInfo.CreateSpecificCulture("fr-CA")) + " " + timeZone; } } } catch (Exception x) { UIHelper.HandleUIException(x); } }
public void BindData(lmDatasets.atriumDB.AppointmentDataTable dt) { //JLL: 2013-09-26 Translation for 2013/10 build lblTZ.Text = UIHelper.GetTimeZoneLabel(); // TimeZoneInfo.Local.StandardName; DataView dv = new DataView(dt, "ShowAsBusy = 1", "StartDate", DataViewRowState.ModifiedCurrent | DataViewRowState.Unchanged); AppointmentBindingSource.DataSource = dv; //display the last appointment - this is not having the desired effect CJW 2015-5-13 SoonestAppointment(); if (IsOfficerCal) { //make sure the current month is displayed schedule1.EnsureVisible(DateTime.Today.AddDays(-DateTime.Today.Day + 1)); } // SetNotificationTimer(); //AddRecurrenceSymbol(); dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged); FM.GetAppointment().OnUpdate += new atLogic.UpdateEventHandler(ucAppointment_OnUpdate); LoadAttendeeContacts(); CreateAddNewAppointMenu(); calMonthDisplay.Text = schedule1.Date.ToString("MMMM yyyy"); //if (dt.Rows.Count == 0) //{ //create add menu now //if (FM.IsVirtualFM) //{ // FileTreeView.BuildMenu(FM.AtMng.GetFile(FM.AtMng.WorkingAsOfficer.MyFileId), cmdHearing, FileTreeView.dmApptNew); //} //else //{ // FileTreeView.BuildMenu(FM, cmdHearing, FileTreeView.dmApptNew); //} //} }