public void HandleSlideScan(string vantageSlideId)
        {
            VantageSlideView view = null;

            YellowstonePathology.Business.Facility.Model.Facility thisFacility = Business.Facility.Model.FacilityCollection.Instance.GetByFacilityId(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.FacilityId);
            string thisLocation = YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.HostName;

            if (this.Exists(vantageSlideId) == false)
            {
                VantageSlide slide = new VantageSlide();
                slide.MasterAccessionNo = this.m_MasterAccessionNo;
                slide.VantageSlideId    = vantageSlideId;
                slide.CurrentLocation   = thisFacility.FacilityId;

                view = new VantageSlideView(slide, System.Windows.Media.Brushes.LightGreen);
                this.Add(view);
            }
            else
            {
                view = this.Get(vantageSlideId);
                view.ScanStatusColor = System.Windows.Media.Brushes.LightGreen;
            }

            VantageSlideScan slideScan = new VantageSlideScan();

            slideScan.Location  = thisLocation;
            slideScan.ScanDate  = DateTime.Now;
            slideScan.SlideId   = vantageSlideId;
            slideScan.ScannedBy = Business.User.SystemIdentity.Instance.User.UserName;
            view.VantageSlide.SlideScans.Add(slideScan);

            view.VantageSlide.Save();
        }
        private void Load()
        {
            List <string> results = VantageSlide.GetByMasterAccessionNo(this.m_MasterAccessionNo);

            foreach (string result in results)
            {
                VantageSlide     vantageSlide = VantageSlide.FromJson(result);
                VantageSlideView view         = new Model.VantageSlideView(vantageSlide, System.Windows.Media.Brushes.White);
                this.Add(view);
            }
        }
Exemplo n.º 3
0
 public VantageSlideView(VantageSlide vantageSlide, System.Windows.Media.Brush brush)
 {
     this.m_VantageSlide    = vantageSlide;
     this.m_VantageBarcode  = new BarcodeScanning.VantageBarcode(this.m_VantageSlide.VantageSlideId);
     this.m_ScanStatusColor = brush;
 }