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(); }
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(); }
public static void DeleteProtocol(Protocol P) { DaoFactory.GetDaoFactory().CreateProtocolDao().Delete(P); }
public static void SaveOrUpdateProtocol(Protocol P) { DaoFactory.GetDaoFactory().CreateProtocolDao().SaveOrUpdate(P); }
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; //} }
public ProtocolPanel( string panelName, Protocol protocol ) { this._panelName = panelName; this._protocol = protocol; }
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; } }
public void RebindProtocol(Protocol P) { this._protocol = P; BindProtocol(); }
public Protocolpane(Protocol protocol) : this(protocol, false) { }