Ignore:
Timestamp:
Jul 6, 2012, 3:37:41 PM (12 years ago)
Author:
Sam Habiel
Message:

Finally, v 1.7 to the main repo. I will delete the branch after this.

This commit merges all the BMX4 changes in the Scheduling GUI back to the main trunk.

Location:
Scheduling/trunk/cs/bsdx0200GUISourceCode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode

  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r1233 r1474  
    114114        private MenuItem sepApptMenu3;
    115115        private MenuItem mnuReprintApptSlip;
     116        private MenuItem mnuViewBrokerLog;
    116117        private IContainer components;
    117118
     
    132133                public void InitializeDocView(string sText)
    133134                {
    134                         this.Text = this.DocManager.ConnectInfo.UserName;
     135            this.Text = CGDocumentManager.Current.RemoteSession.User.Name;
    135136                        if (sText != null)
    136137                                this.Text += " - " + sText;
    137                         if (DocManager.ConnectInfo.DivisionName != null)
    138                                 this.Text += " - " + DocManager.ConnectInfo.DivisionName;
     138            if (CGDocumentManager.Current.RemoteSession.User.Division.Name != null)
     139                this.Text += " - " + CGDocumentManager.Current.RemoteSession.User.Division.Name;
    139140                }
    140141
     
    157158
    158159            // Set username and division up top
    159             this.Text = this.DocManager.ConnectInfo.UserName;
     160            this.Text = CGDocumentManager.Current.RemoteSession.User.Name;
    160161                        if (sText != null)
    161162                                this.Text += " - " + sText;
    162                         if (DocManager.ConnectInfo.DivisionName != null)
    163                                 this.Text += " - " + DocManager.ConnectInfo.DivisionName;
    164 
    165                         this.m_ConnectInfo = m_DocManager.ConnectInfo;
    166                         m_bmxDelegate = new BMXNetConnectInfo.BMXNetEventDelegate(BMXNetEventHandler);
    167                         m_ConnectInfo.BMXNetEvent += m_bmxDelegate;
    168                 }
    169 
    170                 private BMXNetConnectInfo.BMXNetEventDelegate m_bmxDelegate;
     163                        if (CGDocumentManager.Current.RemoteSession.User.Division.Name != null)
     164                this.Text += " - " + CGDocumentManager.Current.RemoteSession.User.Division.Name;
     165
     166            CGDocumentManager.Current.RemoteSession.EventServices.RpmsEvent += BMXNetEventHandler;
     167                }
    171168               
    172169
     
    235232            this.mnuHelp = new System.Windows.Forms.MenuItem();
    236233            this.mnuHelpAbout = new System.Windows.Forms.MenuItem();
     234            this.mnuViewBrokerLog = new System.Windows.Forms.MenuItem();
    237235            this.mnuTest = new System.Windows.Forms.MenuItem();
    238236            this.mnuTest1 = new System.Windows.Forms.MenuItem();
     
    680678            this.mnuHelp.Index = 3;
    681679            this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    682             this.mnuHelpAbout});
     680            this.mnuHelpAbout,
     681            this.mnuViewBrokerLog});
    683682            this.mnuHelp.Text = "&Help";
    684683            //
     
    688687            this.mnuHelpAbout.Text = "&About";
    689688            this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);
     689            //
     690            // mnuViewBrokerLog
     691            //
     692            this.mnuViewBrokerLog.Index = 1;
     693            this.mnuViewBrokerLog.Text = "&View Broker Log";
     694            this.mnuViewBrokerLog.Click += new System.EventHandler(this.mnuViewBrokerLog_Click);
    690695            //
    691696            // mnuTest
     
    702707            this.mnuTest1.Index = 0;
    703708            this.mnuTest1.Text = "Test1";
    704             this.mnuTest1.Click += new System.EventHandler(this.mnuTest1_Click);
    705709            //
    706710            // tvSchedules
     
    712716            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
    713717            this.tvSchedules.Name = "tvSchedules";
    714             this.tvSchedules.Size = new System.Drawing.Size(128, 392);
     718            this.tvSchedules.Size = new System.Drawing.Size(128, 389);
    715719            this.tvSchedules.Sorted = true;
    716720            this.tvSchedules.TabIndex = 1;
     
    781785            this.panelRight.Location = new System.Drawing.Point(996, 0);
    782786            this.panelRight.Name = "panelRight";
    783             this.panelRight.Size = new System.Drawing.Size(128, 392);
     787            this.panelRight.Size = new System.Drawing.Size(128, 389);
    784788            this.panelRight.TabIndex = 3;
    785789            this.panelRight.Visible = false;
     
    877881            this.panelCenter.Location = new System.Drawing.Point(136, 24);
    878882            this.panelCenter.Name = "panelCenter";
    879             this.panelCenter.Size = new System.Drawing.Size(857, 344);
     883            this.panelCenter.Size = new System.Drawing.Size(857, 341);
    880884            this.panelCenter.TabIndex = 7;
     885            //
     886            // ctxCalendarGrid
     887            //
     888            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     889            this.ctxCalGridAdd,
     890            this.ctxCalGridMkRadAppt,
     891            this.ctxCalGridEdit,
     892            this.ctxCalGridDelete,
     893            this.ctxCalGridCancelRadAppt,
     894            this.ctxCalGridCheckIn,
     895            this.ctxCalGridUndoCheckin,
     896            this.ctxCalGridSep1,
     897            this.ctxCalGridNoShow,
     898            this.ctxCalGridNoShowUndo,
     899            this.ctxCalGridSep2,
     900            this.ctxCalGridWalkin,
     901            this.ctxCalGridSep3,
     902            this.ctxCalGridReprintApptSlip});
     903            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
     904            //
     905            // ctxCalGridAdd
     906            //
     907            this.ctxCalGridAdd.Index = 0;
     908            this.ctxCalGridAdd.Text = "Add Appointment";
     909            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
     910            //
     911            // ctxCalGridMkRadAppt
     912            //
     913            this.ctxCalGridMkRadAppt.Index = 1;
     914            this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";
     915            this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);
     916            //
     917            // ctxCalGridEdit
     918            //
     919            this.ctxCalGridEdit.Index = 2;
     920            this.ctxCalGridEdit.Text = "Edit Appointment";
     921            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
     922            //
     923            // ctxCalGridDelete
     924            //
     925            this.ctxCalGridDelete.Index = 3;
     926            this.ctxCalGridDelete.Text = "Cancel Appointment";
     927            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
     928            //
     929            // ctxCalGridCancelRadAppt
     930            //
     931            this.ctxCalGridCancelRadAppt.Index = 4;
     932            this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";
     933            this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click);
     934            //
     935            // ctxCalGridCheckIn
     936            //
     937            this.ctxCalGridCheckIn.Index = 5;
     938            this.ctxCalGridCheckIn.Text = "Check In Patient";
     939            this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
     940            //
     941            // ctxCalGridUndoCheckin
     942            //
     943            this.ctxCalGridUndoCheckin.Index = 6;
     944            this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
     945            this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
     946            //
     947            // ctxCalGridSep1
     948            //
     949            this.ctxCalGridSep1.Index = 7;
     950            this.ctxCalGridSep1.Text = "-";
     951            //
     952            // ctxCalGridNoShow
     953            //
     954            this.ctxCalGridNoShow.Index = 8;
     955            this.ctxCalGridNoShow.Text = "Mark as No Show";
     956            this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
     957            //
     958            // ctxCalGridNoShowUndo
     959            //
     960            this.ctxCalGridNoShowUndo.Index = 9;
     961            this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
     962            this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
     963            //
     964            // ctxCalGridSep2
     965            //
     966            this.ctxCalGridSep2.Index = 10;
     967            this.ctxCalGridSep2.Text = "-";
     968            //
     969            // ctxCalGridWalkin
     970            //
     971            this.ctxCalGridWalkin.Index = 11;
     972            this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
     973            this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
     974            //
     975            // ctxCalGridSep3
     976            //
     977            this.ctxCalGridSep3.Index = 12;
     978            this.ctxCalGridSep3.Text = "-";
     979            //
     980            // ctxCalGridReprintApptSlip
     981            //
     982            this.ctxCalGridReprintApptSlip.Index = 13;
     983            this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
     984            this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
     985            //
     986            // panelBottom
     987            //
     988            this.panelBottom.Controls.Add(this.statusBar1);
     989            this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
     990            this.panelBottom.Location = new System.Drawing.Point(136, 365);
     991            this.panelBottom.Name = "panelBottom";
     992            this.panelBottom.Size = new System.Drawing.Size(857, 24);
     993            this.panelBottom.TabIndex = 8;
     994            //
     995            // statusBar1
     996            //
     997            this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
     998            this.statusBar1.Location = new System.Drawing.Point(0, 0);
     999            this.statusBar1.Name = "statusBar1";
     1000            this.statusBar1.Size = new System.Drawing.Size(857, 24);
     1001            this.statusBar1.SizingGrip = false;
     1002            this.statusBar1.TabIndex = 0;
     1003            //
     1004            // splitter1
     1005            //
     1006            this.splitter1.Location = new System.Drawing.Point(128, 24);
     1007            this.splitter1.Name = "splitter1";
     1008            this.splitter1.Size = new System.Drawing.Size(8, 365);
     1009            this.splitter1.TabIndex = 9;
     1010            this.splitter1.TabStop = false;
     1011            //
     1012            // splitter2
     1013            //
     1014            this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
     1015            this.splitter2.Location = new System.Drawing.Point(993, 24);
     1016            this.splitter2.Name = "splitter2";
     1017            this.splitter2.Size = new System.Drawing.Size(3, 365);
     1018            this.splitter2.TabIndex = 10;
     1019            this.splitter2.TabStop = false;
    8811020            //
    8821021            // calendarGrid1
     
    8991038            this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
    9001039            this.calendarGrid1.SelectedAppointment = 0;
    901             this.calendarGrid1.Size = new System.Drawing.Size(857, 344);
     1040            this.calendarGrid1.Size = new System.Drawing.Size(857, 341);
    9021041            this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
    9031042            this.calendarGrid1.TabIndex = 0;
     
    9091048            this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
    9101049            //
    911             // ctxCalendarGrid
    912             //
    913             this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    914             this.ctxCalGridAdd,
    915             this.ctxCalGridMkRadAppt,
    916             this.ctxCalGridEdit,
    917             this.ctxCalGridDelete,
    918             this.ctxCalGridCancelRadAppt,
    919             this.ctxCalGridCheckIn,
    920             this.ctxCalGridUndoCheckin,
    921             this.ctxCalGridSep1,
    922             this.ctxCalGridNoShow,
    923             this.ctxCalGridNoShowUndo,
    924             this.ctxCalGridSep2,
    925             this.ctxCalGridWalkin,
    926             this.ctxCalGridSep3,
    927             this.ctxCalGridReprintApptSlip});
    928             this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
    929             //
    930             // ctxCalGridAdd
    931             //
    932             this.ctxCalGridAdd.Index = 0;
    933             this.ctxCalGridAdd.Text = "Add Appointment";
    934             this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    935             //
    936             // ctxCalGridMkRadAppt
    937             //
    938             this.ctxCalGridMkRadAppt.Index = 1;
    939             this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";
    940             this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);
    941             //
    942             // ctxCalGridEdit
    943             //
    944             this.ctxCalGridEdit.Index = 2;
    945             this.ctxCalGridEdit.Text = "Edit Appointment";
    946             this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
    947             //
    948             // ctxCalGridDelete
    949             //
    950             this.ctxCalGridDelete.Index = 3;
    951             this.ctxCalGridDelete.Text = "Cancel Appointment";
    952             this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    953             //
    954             // ctxCalGridCancelRadAppt
    955             //
    956             this.ctxCalGridCancelRadAppt.Index = 4;
    957             this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";
    958             this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click);
    959             //
    960             // ctxCalGridCheckIn
    961             //
    962             this.ctxCalGridCheckIn.Index = 5;
    963             this.ctxCalGridCheckIn.Text = "Check In Patient";
    964             this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
    965             //
    966             // ctxCalGridUndoCheckin
    967             //
    968             this.ctxCalGridUndoCheckin.Index = 6;
    969             this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
    970             this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
    971             //
    972             // ctxCalGridSep1
    973             //
    974             this.ctxCalGridSep1.Index = 7;
    975             this.ctxCalGridSep1.Text = "-";
    976             //
    977             // ctxCalGridNoShow
    978             //
    979             this.ctxCalGridNoShow.Index = 8;
    980             this.ctxCalGridNoShow.Text = "Mark as No Show";
    981             this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
    982             //
    983             // ctxCalGridNoShowUndo
    984             //
    985             this.ctxCalGridNoShowUndo.Index = 9;
    986             this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    987             this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    988             //
    989             // ctxCalGridSep2
    990             //
    991             this.ctxCalGridSep2.Index = 10;
    992             this.ctxCalGridSep2.Text = "-";
    993             //
    994             // ctxCalGridWalkin
    995             //
    996             this.ctxCalGridWalkin.Index = 11;
    997             this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
    998             this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
    999             //
    1000             // ctxCalGridSep3
    1001             //
    1002             this.ctxCalGridSep3.Index = 12;
    1003             this.ctxCalGridSep3.Text = "-";
    1004             //
    1005             // ctxCalGridReprintApptSlip
    1006             //
    1007             this.ctxCalGridReprintApptSlip.Index = 13;
    1008             this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
    1009             this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
    1010             //
    1011             // panelBottom
    1012             //
    1013             this.panelBottom.Controls.Add(this.statusBar1);
    1014             this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    1015             this.panelBottom.Location = new System.Drawing.Point(136, 368);
    1016             this.panelBottom.Name = "panelBottom";
    1017             this.panelBottom.Size = new System.Drawing.Size(857, 24);
    1018             this.panelBottom.TabIndex = 8;
    1019             //
    1020             // statusBar1
    1021             //
    1022             this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
    1023             this.statusBar1.Location = new System.Drawing.Point(0, 0);
    1024             this.statusBar1.Name = "statusBar1";
    1025             this.statusBar1.Size = new System.Drawing.Size(857, 24);
    1026             this.statusBar1.SizingGrip = false;
    1027             this.statusBar1.TabIndex = 0;
    1028             //
    1029             // splitter1
    1030             //
    1031             this.splitter1.Location = new System.Drawing.Point(128, 24);
    1032             this.splitter1.Name = "splitter1";
    1033             this.splitter1.Size = new System.Drawing.Size(8, 368);
    1034             this.splitter1.TabIndex = 9;
    1035             this.splitter1.TabStop = false;
    1036             //
    1037             // splitter2
    1038             //
    1039             this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
    1040             this.splitter2.Location = new System.Drawing.Point(993, 24);
    1041             this.splitter2.Name = "splitter2";
    1042             this.splitter2.Size = new System.Drawing.Size(3, 368);
    1043             this.splitter2.TabIndex = 10;
    1044             this.splitter2.TabStop = false;
    1045             //
    10461050            // CGView
    10471051            //
    10481052            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    1049             this.ClientSize = new System.Drawing.Size(1124, 392);
     1053            this.ClientSize = new System.Drawing.Size(1124, 389);
    10501054            this.Controls.Add(this.panelCenter);
    10511055            this.Controls.Add(this.panelBottom);
     
    10861090                private Hashtable                       m_htModifySchedule;
    10871091                private Hashtable                       m_htChangeAppts;
    1088                 private BMXNetConnectInfo       m_ConnectInfo = null;
    1089                 public BMXNetConnectInfo.BMXNetEventDelegate    BMXNetEvent;
    10901092
    10911093                #endregion Fields
     
    13081310                        DataTable dt = this.DocManager.GlobalDataSet.Tables["ResourceUser"];
    13091311                        DataView dv = new DataView(dt, "", "RESOURCENAME ASC", DataViewRowState.OriginalRows);
    1310                         string sDuz = this.DocManager.ConnectInfo.DUZ;
     1312            string sDuz = CGDocumentManager.Current.RemoteSession.User.Duz;
    13111313                        bool bModSchedule = false;
    13121314                        DataRowView[] drvA = dv.FindRows(sResource);
     
    15691571        private bool IsThisARadiologyResource(string sResource)
    15701572        {
     1573            //smh - change in v 1.7... if the resource is not linked to a PIMS clinic, this method fails.
     1574            //This happens if there is just one resource that is not linked, which makes it impossible to
     1575            //make any appointments, because this method gets called at any time a menu is opened.
     1576            //So we change res.Field<int> to res.Field<int?>
     1577           
    15711578            // see if resource is mapped to a Radiology Hospital Location.
    15721579            return (   //select all Hospital Locations which are radiology locations
     
    15751582                       //join this to the resources table using the foreign ID (plain jane relational join)
    15761583                       join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
    1577                        on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID")
     1584                       //on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID") //change in 1.7
     1585                       on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int?>("HOSPITAL_LOCATION_ID")
    15781586                       //then filter this down to the resource that we have
    15791587                       where res.Field<string>("RESOURCE_NAME") == sResource
     
    17661774                                        doc.ResourceID = Convert.ToInt32(sResourceID);
    17671775
    1768                                         bool bLock = DocManager.ConnectInfo.bmxNetLib.Lock("^BSDXRES(" + sResourceID + ")", "+");
     1776                    bool bLock = CGDocumentManager.Current.RemoteSession.Lock("^BSDXRES(" + sResourceID + ")", "+");
    17691777                                        if (bLock == false)
    17701778                                        {
     
    19391947                        dt = this.DocManager.GlobalDataSet.Tables["ResourceUser"];
    19401948                        dv = new DataView(dt, "", "RESOURCENAME ASC", DataViewRowState.OriginalRows);
    1941 
    1942             //dv.RowFilter = "USERNAME = '" + filte_name + "'";
    1943             dv.RowFilter = String.Format("USERNAME = '{0}'", this.DocManager.ConnectInfo.UserName.Replace("'", "''"));
     1949            dv.RowFilter = String.Format("USERNAME = '{0}'", CGDocumentManager.Current.RemoteSession.User.Name.Replace("'", "''"));
    19441950
    19451951                        for (int j=0; j < dv.Count; j++)
     
    25292535                        {
    25302536                string msg;
    2531                 if (BMXNetLib.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
    2532                     msg = BMXNetLib.Piece(ex.Message, "~", 4);
     2537                if (M.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
     2538                    msg = M.Piece(ex.Message, "~", 4);
    25332539                else
    25342540                    msg = ex.Message;
     
    26402646                        {   
    26412647                string msg;
    2642                 if (BMXNetLib.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
    2643                     msg = BMXNetLib.Piece(ex.Message, "~", 4);
     2648                if (M.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
     2649                    msg = M.Piece(ex.Message, "~", 4);
    26442650                else
    26452651                    msg = ex.Message;
     
    27482754            {
    27492755                string msg;
    2750                 if (BMXNetLib.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
    2751                     msg = BMXNetLib.Piece(ex.Message, "~", 4);
     2756                if (M.Piece(ex.Message, "~", 1) == "-10") // -10 means that BSDXAPI reported an error.
     2757                    msg = M.Piece(ex.Message, "~", 4);
    27522758                else
    27532759                    msg = ex.Message;
     
    27712777        /// <param name="e">BMXEvent Args:
    27722778        /// e.BMXEvent is free text for Event Type; e.BMXParam is free text for Event Arguments</param>
    2773         private void BMXNetEventHandler(Object obj, BMXNet.BMXNetEventArgs e)
     2779        private void BMXNetEventHandler(Object obj, RemoteEventArgs e)
    27742780        {
    27752781            try
     
    27792785
    27802786                // if event is Autofire event
    2781                 if (e.BMXEvent == "BMXNet AutoFire")
     2787                if (e.EventType == "BMXNet AutoFire")
    27822788                {
    27832789                    Debug.Write("CGView caught AutoFire event.\n");
     
    27922798
    27932799                // if event is BSDX SCHEDULE
    2794                 else if (e.BMXEvent == "BSDX SCHEDULE")
     2800                else if (e.EventType == "BSDX SCHEDULE")
    27952801                {
    27962802                    //See if any of the resources in the event argument matches BSDX Schedule.
     
    28002806                    {
    28012807                        sResourceName = m_Document.m_sResourcesArray[j].ToString();
    2802                         if (e.BMXParam == sResourceName)
     2808                        if (e.Details == sResourceName)
    28032809                        {
    28042810                            Debug.Write("CGView caught BSDX SCHEDULE event.\n");
     
    28682874            {
    28692875                //Signal RPMS to raise an event
    2870                 m_ConnectInfo.RaiseEvent(sEvent, sParams, false);
     2876                CGDocumentManager.Current.RemoteSession.EventServices.TriggerEvent(sEvent, sParams, false);
    28712877            }
    28722878            catch (Exception ex)
     
    29142920            try
    29152921            {
    2916                 bool bLock = DocManager.ConnectInfo.Lock("^BSDXMGR", "+", "");
     2922                bool bLock = CGDocumentManager.Current.RemoteSession.Lock("^BSDXMGR", "+");
    29172923                if (bLock == false)
    29182924                {
     
    29292935                m_DocManager.GlobalDataSet.Tables["ResourceUser"].Clear();
    29302936                m_DocManager.LoadResourceUserTable(false);
    2931                 bLock = DocManager.ConnectInfo.bmxNetLib.Lock("^BSDXMGR", "-");
     2937                bLock = CGDocumentManager.Current.RemoteSession.Lock("^BSDXMGR", "-");
    29322938            }
    29332939            catch (ApplicationException aex)
     
    31953201        }
    31963202
    3197         /// <summary>
    3198         /// Useless code now... Good place to test something.
    3199         /// </summary>
    3200         /// <param name="sender"></param>
    3201         /// <param name="e"></param>
    3202                 private void mnuTest1_Click(object sender, System.EventArgs e)
    3203                 {
    3204                         ReaderWriterLock m_rwl = this.DocManager.ConnectInfo.bmxNetLib.BMXRWL;
     3203                private void CGView_Closing(object sender, System.ComponentModel.CancelEventArgs e)
     3204                {
    32053205                        try
    32063206                        {
    3207                                 m_rwl.AcquireWriterLock(50);
    3208                                 Debug.Write("\nTest Button 1 Acquired first lock\n");
    3209                                 m_rwl.AcquireWriterLock(50);
    3210                                 Debug.Write("Test Button 1 Acquired second lock\n");
    3211                                 this.DocManager.ViewRefresh();
    3212                                 Thread.Sleep(5000);
    3213                                 try
    3214                                 {
    3215                                 }
    3216                                 catch
    3217                                 {
    3218                                 }
    3219                                 finally
    3220                                 {
    3221                                         m_rwl.ReleaseWriterLock();
    3222                                         Debug.Write ("Test Button 1 released first lock.\n");
    3223                                         m_rwl.ReleaseWriterLock();
    3224                                         Debug.Write ("Test Button 1 released second lock.\n");
    3225                                 }
    3226 
    3227                                 return;
    3228                         }
    3229                         catch (Exception ex)
    3230                         {
    3231                                 Debug.Write("Test Button 1 exception: " + ex.Message + "\n");
    3232                         }
    3233                 }
    3234 
    3235                 private void CGView_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    3236                 {
    3237                         try
    3238                         {
    3239                                 m_ConnectInfo.BMXNetEvent -= m_bmxDelegate;
     3207                                CGDocumentManager.Current.RemoteSession.EventServices.RpmsEvent -= BMXNetEventHandler;
    32403208                                this.calendarGrid1.CloseGrid();
    32413209                        }
     
    39663934        }
    39673935
     3936        private void mnuViewBrokerLog_Click(object sender, EventArgs e)
     3937        {
     3938            var view = new RPCLoggerView();
     3939            view.Show();
     3940        }
     3941
    39683942
    39693943    }//End class
Note: See TracChangeset for help on using the changeset viewer.