public FrmReferalSite(ForlabSite callingsite,IList<ForlabSite> referingsites,string platform) { _callingSite = callingsite; _referingSites = referingsites; _platform = platform; InitializeComponent(); PopRegion(); }
private void btnOk_Click(object sender, EventArgs e) { _selectedSite = DataRepository.GetSiteById((int)comSite.SelectedValue); this.Tag = _selectedSite.SiteName; this.DialogResult = System.Windows.Forms.DialogResult.OK; // LQT.GUI.UserCtr.SitePane sp= (LQT.GUI.UserCtr.SitePane)this.Parent; Close(); }
public void SetCallingSite(ForlabSite callingSite,string platform) { _callingSite = callingSite; _referingSites = DataRepository.GetReferingSiteByPlatform(platform); //if(platform=="CD4") // _platform = "FlowCytometry"; //else _platform = platform; }
public SiteForm(ForlabSite site, Form mdiparent) { this._site = site; this._mdiparent = mdiparent; InitializeComponent(); lqtToolStrip1.SaveAndCloseClick += new EventHandler(lqtToolStrip1_SaveAndCloseClick); lqtToolStrip1.SaveAndNewClick += new EventHandler(lqtToolStrip1_SaveAndNewClick); LoadSiteCtr(); SetRefSites(); }
public SitePane(ForlabSite site, bool enableCtr) { this._site = site; this._enableCtr = enableCtr; InitializeComponent(); lsvInstrument.AddNoneEditableColumn(0); lsvInstrument.AddNoneEditableColumn(1); //lsvInstrument.OnSubitemTextChanged += new EventHandler(lsvInstrument_OnSubitemTextChanged); lsvInstrument.SubitemTextChanged += new EventHandler<SubitemTextEventArgs>(lsvInstrument_OnSubitemTextChanged); SetControlState(); PopRegion(); PopSiteCategory(); BindSite(); }
private void InitializeSiteForm(ForlabSite site) { SiteForm frm = new SiteForm(site, _mdiparent); frm.ShowDialog(); //_rPane.RebindRegion(_region);//b RebindRegion(_region);//added b }
private void butNewsite_Click(object sender, EventArgs e) { if (CreateOrEditSite != null) { ForlabSite site = new ForlabSite(); site.Region = _region; CreateOrUpdateEventArgs eArgs = new CreateOrUpdateEventArgs(site); CreateOrEditSite(this, eArgs); _region = DataRepository.GetRegionById(site.Region.Id);//b } DisplaySites(); }
public void RebindSite(ForlabSite site) { this._site = site; BindSite(); }
void lqtToolStrip1_SaveAndNewClick(object sender, EventArgs e) { try { LQTUserMessage msg = SaveOrUpdateObject(); ((LqtMainWindowForm)_mdiparent).ShowStatusBarInfo(msg.Message, _reloadCtr); DataRepository.CloseSession(); ForlabRegion r = _site.Region; SiteCategory sc = _site.SiteCategory; _site = new ForlabSite(); _site.Region = r; _site.SiteCategory = sc; LoadSiteCtr(); _isedited = false; if (_site.SiteCategory != null)//b { comCategory.SelectedValue = _site.SiteCategory.Id; } } catch (Exception ex) { new FrmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog(); } }
public SiteForm(ForlabSite site, Form mdiparent, bool reloadctr) : this(site, mdiparent) { this._reloadCtr = reloadctr; }
private void butSave_Click(object sender, EventArgs e) { int count = 0; int error = 0; try { foreach (SiteImportData rd in _rdata) { if (!rd.IsExist && !rd.HasError) { ForlabSite site = new ForlabSite(); site.Region = rd.Region; site.SiteName = rd.SiteName; site.SiteLevel = rd.SiteLevel; site.SiteCategory = rd.Category; site.WorkingDays = rd.WorkingDays; site.CD4TestingDaysPerMonth = rd.Cd4Td; site.ChemistryTestingDaysPerMonth = rd.ChemTd; site.HematologyTestingDaysPerMonth = rd.HemaTd; site.ViralLoadTestingDaysPerMonth = rd.ViralTd; site.OtherTestingDaysPerMonth = rd.OtherTd; SiteStatus ss = new SiteStatus(); ss.OpenedFrom = rd.OpeningDate != null ? rd.OpeningDate.Value : DateTime.Now; site.SiteStatuses.Add(ss); count++; DataRepository.SaveOrUpdateSite(site); } else { error++; } } MessageBox.Show(count + " Sites are imported and saved successfully." + Environment.NewLine + error + " Sites Failed.", "Importing", MessageBoxButtons.OK, MessageBoxIcon.Information); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } catch { MessageBox.Show("Error: Unable to import Site data.", "Importing", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { DataRepository.CloseSession(); } }
private void butNewsite_Click(object sender, EventArgs e) { if (CreateOrEditSite != null) { ForlabSite site = new ForlabSite(); site.Region = _region; CreateOrUpdateEventArgs eArgs = new CreateOrUpdateEventArgs(site); CreateOrEditSite(this, eArgs); } DisplaySites(); }
private void btnAdd_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.OK; _selectedSite=LqtUtil.GetComboBoxValue<ForlabSite>(cobsite); Close(); }
private int InstrumentUsage(ForlabSite s, ClassOfMorbidityTestEnum platform) { decimal sum = 0; // bool error = false; int removedInst = 0; IList<SiteInstrument> sinst = new List<SiteInstrument>(); if (s.GetInstrumentByPlatform(platform).Count > 0)//instrument percentage { sinst = s.GetInstrumentByPlatform(platform); foreach (SiteInstrument si in sinst) { sum = sum + si.TestRunPercentage; } if (sum != 100) { // error = true; foreach (SiteInstrument si in sinst) { foreach (SiteInstrumentImportData rd in _siteinstrumentdata) { if (rd.InstrumentName == si.Instrument.InstrumentName && rd.SiteName == s.SiteName && !rd.IsExist && !rd.HasError) { s.SiteInstruments.Remove(si); sum = sum + si.TestRunPercentage; removedInst++; } } } } } return removedInst; }
public SitePane(ForlabSite site) : this(site, false) { }
public static void SaveOrUpdateSite(ForlabSite site) { DaoFactory.GetDaoFactory().CreateSiteDao().SaveOrUpdate(site); }
public static void DeleteSite(ForlabSite t) { DaoFactory.GetDaoFactory().CreateSiteDao().Delete(t); }
private bool ISValidReferralSite(string Referralsite, string siten, string platform, out ForlabSite refSite) { IList<ForlabSite> _referingSites = new List<ForlabSite>(); IList<ForlabSite> _validsites = new List<ForlabSite>(); refSite = null; bool isvalid = false; if (!String.IsNullOrEmpty(Referralsite)) { refSite = DataRepository.GetSiteByName(Referralsite); if (refSite != null) { if (refSite.SiteName != siten) { _validsites = DataRepository.GetAllSiteByRegionandPlatform(-1, LqtUtil.RemoveWhitespace(platform)); _referingSites = DataRepository.GetReferingSiteByPlatform(LqtUtil.RemoveWhitespace(platform)); if (_validsites.Contains(refSite) && !_referingSites.Contains(refSite)) isvalid = true; else isvalid = false; } else isvalid = false; } else { isvalid = false; } } else { isvalid = false; } return isvalid; }