Exemple #1
0
 private void AddNewAppointment(int NawACSeriesId)
 {
     try
     {
         fACWizard facwr;
         //Launch AcWizard Constructor to Add Appointment
         if (!IsOfficerCal)
         {
             this.FileForm().ReadOnly = true;
             facwr = new fACWizard(FM, ACEngine.Step.ACInfo, NawACSeriesId);
             this.FileForm().HookupWizClose(facwr);
             facwr.Show();
         }
         else
         {
             atriumBE.FileManager fmCurrent = FM.AtMng.GetFile(FM.AtMng.WorkingAsOfficer.MyFileId);
             facwr = new fACWizard(fmCurrent, ACEngine.Step.ACInfo, NawACSeriesId);
             facwr.ShowDialog();
             facwr.Close();
         }
     }
     catch (Exception x)
     {
         if (this.FileForm() != null)
         {
             this.FileForm().ReadOnly = false;
         }
         UIHelper.HandleUIException(x);
     }
 }
Exemple #2
0
        private void EditReschedule(int NawACSeriesId)
        {
            try
            {
                //check to see if appt has a hearing
                if (CurrentRow() != null)
                {
                    atriumBE.FileManager contextFM = FM.AtMng.GetFile(CurrentRow().FileId);

                    atriumDB.FileContactRow FCR = contextFM.GetFileContact().GetByRole("FTM");
                    bool isTM = false;

                    if (FCR != null)
                    {
                        isTM = (FCR.ContactId == FM.AtMng.WorkingAsOfficer.ContactId);
                    }

                    if (ApptIsHearing() && isTM)
                    {
                        UIHelper.CannotEditAppointment();
                    }
                    else
                    {
                        //Create Step to handle editing Appointment

                        fACWizard facwr;
                        //Launch AcWizard Constructor to Edit Appointment
                        if (!IsOfficerCal)
                        {
                            this.FileForm().ReadOnly = true;
                            GetOriginalRecurrenceAppointment(FM);
                            facwr = new fACWizard(FM, NawACSeriesId, CurrentRow().ApptId);
                            this.FileForm().HookupWizClose(facwr);
                            facwr.Show();
                        }
                        else
                        {
                            atriumBE.FileManager fmCurrent = FM.AtMng.GetFile(CurrentRow().FileId);
                            GetOriginalRecurrenceAppointment(fmCurrent);
                            facwr = new fACWizard(fmCurrent, NawACSeriesId, CurrentRow().ApptId);
                            facwr.ShowDialog();
                            facwr.Close();
                        }
                    }
                }
                else
                {
                    AddNewAppointment(NawACSeriesId);
                }
            }
            catch (Exception x)
            {
                if (this.FileForm() != null)
                {
                    this.FileForm().ReadOnly = false;
                }
                UIHelper.HandleUIException(x);
            }
        }
Exemple #3
0
 public void NewDoc(int acsId)
 {
     try
     {
         fACWizard facw = new fACWizard(FM, ACEngine.Step.ACInfo, acsId);
         if (!facw.Disposing && !facw.IsDisposed)
         {
             facw.ShowDialog(this);
             facw.Close();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Exemple #4
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdNewContact":
                    cmdNewContact1.Expand();
                    break;

                case "cmdAddExistingContact":
                    fACWizard faacw1 = new fACWizard(myfmAB, ACEngine.Step.ACInfo, UIHelper.AtMng.GetSetting(AppIntSetting.AddressBookFileContactAcId));
                    faacw1.ShowDialog();
                    faacw1.Close();
                    break;

                case "cmdCreateNewContact":
                    fACWizard faacw2 = new fACWizard(myfmAB, ACEngine.Step.ACInfo, UIHelper.AtMng.GetSetting(AppIntSetting.AddressBookNewContactAcId));
                    faacw2.ShowDialog();
                    faacw2.Close();
                    break;

                case "cmdCardView":
                    if (!e.Command.IsChecked)
                    {
                        e.Command.IsChecked = true;
                    }
                    else
                    {
                        cmdListView.IsChecked  = false;
                        fileContactGridEX.View = Janus.Windows.GridEX.View.CardView;
                        cmdGroupBy.Visible     = Janus.Windows.UI.InheritableBoolean.False;
                        cmdFilter.Visible      = Janus.Windows.UI.InheritableBoolean.False;
                        cmdFldChooser.Visible  = Janus.Windows.UI.InheritableBoolean.False;
                    }
                    break;

                case "cmdFilter":
                    if (e.Command.IsChecked)
                    {
                        fileContactGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.Automatic;
                    }
                    else
                    {
                        fileContactGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.None;
                    }
                    break;

                case "cmdFldChooser":
                    fileContactGridEX.ShowFieldChooser(this, LawMate.Properties.Resources.FieldSelector);
                    break;

                case "cmdGroupBy":
                    fileContactGridEX.GroupByBoxVisible = e.Command.IsChecked;
                    break;

                case "cmdListView":
                    if (!e.Command.IsChecked)
                    {
                        e.Command.IsChecked = true;
                    }
                    else
                    {
                        cmdCardView.IsChecked  = false;
                        fileContactGridEX.View = Janus.Windows.GridEX.View.TableView;
                        cmdGroupBy.Visible     = Janus.Windows.UI.InheritableBoolean.True;
                        cmdFilter.Visible      = Janus.Windows.UI.InheritableBoolean.True;
                        cmdFldChooser.Visible  = Janus.Windows.UI.InheritableBoolean.True;
                    }
                    break;

                case "cmdSave":
                    DoSave();
                    break;

                case "cmdDelete":
                    Delete();
                    break;

                case "cmdCancel":
                    Cancel();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }