Example #1
0
        private void GetDestSite_Click(object sender, EventArgs e)
        {
            FrmSelectSite selectSite = new FrmSelectSite(GetDestSite.Name);

            selectSite.ShowDialog();
            this.PlaceOfDestination.Text = destSite;
        }
Example #2
0
        public bool AddSitesToCategory()
        {
            FrmSelectSite frm;

            if (_forecast.UseRegionAsCat)
            {
                frm = new FrmSelectSite(GetSelectedSiteId(), _sites, _activeCategory.RegionId);
            }
            else
            {
                frm = new FrmSelectSite(GetSelectedSiteId(), _sites);
            }
            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (ForlabSite site in frm.SelectedSites)
                {
                    ARTSite artsite = new ARTSite();
                    artsite.Site = site;
                    artsite.MorbidityCategory = _activeCategory;

                    //_activeCategory.ARTSites.Add(site);
                    _artSites.Add(artsite);
                }

                //OnForecastInfoDataChanged();
                return(true);
            }
            return(false);
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Hide();
            FrmSelectSite frmSelectSite = new FrmSelectSite();

            frmSelectSite.ShowDialog();
            this.siteChecked.Text = siteCk;
            Show();
        }
Example #4
0
        public bool AddSiteToForecast()
        {
            FrmSelectSite frm = new FrmSelectSite(_forecastInfo.GetSelectedSiteId(), _sites);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (int siteid in frm.SelectedSiteIds)
                {
                    ForecastSite fc = new ForecastSite();
                    fc.Site = DataRepository.GetSiteById(siteid);
                    fc.ForecastInfo = _forecastInfo;

                    _forecastInfo.ForecastSites.Add(fc);
                }
                OnForecastInfoDataChanged();
                return true;
            }
            return false;
        }
Example #5
0
        public bool AddSitesToCategory()
        {
            FrmSelectSite frm = new FrmSelectSite(_activeCategory.GetSelectedSiteId(), _sites);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (int siteid in frm.SelectedSiteIds)
                {
                    ForecastCategorySite fc = new ForecastCategorySite();
                    fc.Site = DataRepository.GetSiteById(siteid);
                    fc.Category = _activeCategory; ;

                    _activeCategory.CategorySites.Add(fc);
                }

                OnForecastInfoDataChanged();
                return true;
            }
            return false;
        }
Example #6
0
        public bool AddNoneReportedSite()
        {
            // FrmSelectSite frm = new FrmSelectSite(_activeFSite.GetSelectedNRSiteId(), _sites);
            FrmSelectSite frm = new FrmSelectSite(_forecastInfo.GetSelectedSiteId(), _sites);//b it Filters N.R site and Reported Site
            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (int siteid in frm.SelectedSiteIds)
                {
                    ForecastNRSite fc = new ForecastNRSite();
                    fc.NReportedSite = DataRepository.GetSiteById(siteid);
                    fc.ForecastSite = _activeFSite;

                    _activeFSite.NoneReportedSites.Add(fc);

                    ForecastSite fs = new ForecastSite();
                    fs.Site = fc.NReportedSite;
                    fs.ForecastInfo = _forecastInfo;
                    fs.ReportedSiteId = _activeFSite.Id;

                    CopySiteProduct(_activeFSite, fs);

                    _forecastInfo.ForecastSites.Add(fs);
                }

                OnForecastInfoDataChanged();
                return true;
            }
            return false;
        }
Example #7
0
        public bool AddSitesToCategory()
        {
            FrmSelectSite frm;
            if (_forecast.UseRegionAsCat)
                frm = new FrmSelectSite(GetSelectedSiteId(), _sites, _activeCategory.RegionId);
            else
                frm = new FrmSelectSite(GetSelectedSiteId(), _sites);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (ForlabSite site in frm.SelectedSites)
                {
                    ARTSite artsite = new ARTSite();
                    artsite.Site = site;
                    artsite.MorbidityCategory= _activeCategory;

                    //_activeCategory.ARTSites.Add(site);
                    _artSites.Add(artsite);
                }

                //OnForecastInfoDataChanged();
                return true;
            }
            return false;
        }