Esempio n. 1
0
        public Protocolpane(Protocol protocol, bool enableCtr)
        {
            this._protocol = protocol;
            this._enableCtr = enableCtr;
            InitializeComponent();
            lvsysmpDirected.AddNoneEditableColumn(0);
            lsvpanel.AddNoneEditableColumn(0);

            lvsysmpDirected.SubitemTextChanged += new EventHandler<SubitemTextEventArgs>(lvsysmpDirected_OnSubitemTextChanged);

            SetControlState();
            BindProtocol();
        }
Esempio n. 2
0
        public FrmProtocol(ClassOfMorbidityTestEnum classOfTest, Form mdiparent)
        {
            this._protocol = DataRepository.GetProtocolByPlatform((int)classOfTest);
            this._mdiparent = mdiparent;
            this._classOfTest = classOfTest;
            if (_protocol == null)
            {
                CreatNewProtocol();
            }
            InitializeComponent();

            lqtToolStrip1.SaveAndCloseClick += new EventHandler(lqtToolStrip1_SaveAndCloseClick);
            lqtToolStrip1.DisableSaveAndNewButton();
            BindProtocol();
            SelectActiveTab();
        }
Esempio n. 3
0
 public static void DeleteProtocol(Protocol P)
 {
     DaoFactory.GetDaoFactory().CreateProtocolDao().Delete(P);
 }
Esempio n. 4
0
 public static void SaveOrUpdateProtocol(Protocol P)
 {
     DaoFactory.GetDaoFactory().CreateProtocolDao().SaveOrUpdate(P);
 }
Esempio n. 5
0
        private void InitProtocols()
        {
            //try
            //{
                if (!_isProtocolInitalized)
                {
                    _cd4Protocol = DataRepository.GetProtocolByPlatform((int)ClassOfMorbidityTestEnum.CD4);
                    _cheProtocol = DataRepository.GetProtocolByPlatform((int)ClassOfMorbidityTestEnum.Chemistry);
                    _hemProtocol = DataRepository.GetProtocolByPlatform((int)ClassOfMorbidityTestEnum.Hematology);
                    _vilProtocol = DataRepository.GetProtocolByPlatform((int)ClassOfMorbidityTestEnum.ViralLoad);
                    _othProtocol = DataRepository.GetProtocolByPlatform((int)ClassOfMorbidityTestEnum.OtherTest);
                }

                //if (_cd4Protocol == null || _cheProtocol == null || _hemProtocol == null || _othProtocol == null || _vilProtocol == null)
                //    _isProtocolInitalized = false;
                //else
                    _isProtocolInitalized = true;
            //}
            //catch
            //{
            //    _isProtocolInitalized = false;
            //}
        }
Esempio n. 6
0
 public ProtocolPanel( string panelName, Protocol protocol )
 {
     this._panelName = panelName;
     this._protocol = protocol;
 }
Esempio n. 7
0
        private void CreatNewProtocol()
        {
            _protocol = new Protocol();
            _protocol.ProtocolType = (int)_classOfTest;

            switch (_classOfTest)
            {
                case ClassOfMorbidityTestEnum.CD4:
                    ProtocolPanel panel = new ProtocolPanel();
                    panel.PanelName = "CD4 Panel";
                    panel.Protocol = _protocol;
                    _protocol.ProtocolPanels.Add(panel);
                    break;
                case ClassOfMorbidityTestEnum.Chemistry:
                    string[] testname = Enum.GetNames(typeof(ChemistryTestNameEnum));
                    for (int i = 0; i < testname.Length; i++)
                    {
                        PSymptomDirectedTest sdt = new PSymptomDirectedTest();
                        sdt.ChemTestName = testname[i];
                        sdt.Protocol = _protocol;
                        _protocol.SymptomDirectedTests.Add(sdt);
                    }
                    break;
                case ClassOfMorbidityTestEnum.OtherTest:
                    string[] tname = Enum.GetNames(typeof(OtherTestNameEnum));
                    for (int i = 0; i < tname.Length; i++)
                    {
                        PSymptomDirectedTest sdt = new PSymptomDirectedTest();
                        sdt.OtherTestName = tname[i];
                        sdt.Protocol = _protocol;
                        _protocol.SymptomDirectedTests.Add(sdt);
                    }
                    break;
            }
        }
Esempio n. 8
0
 public void RebindProtocol(Protocol P)
 {
     this._protocol = P;
     BindProtocol();
 }
Esempio n. 9
0
 public Protocolpane(Protocol protocol)
     : this(protocol, false)
 {
 }