示例#1
0
        public void Print(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            List <Cassette> cassettes = new List <Cassette>();

            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection)
            {
                if (aliquotOrder.IsBlock() == true)
                {
                    if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint == true)
                    {
                        Cassette cassette = this.GetCassette();
                        cassette.FromAliquotOrder(aliquotOrder, accessionOrder);

                        CarouselColumn column = this.m_Carousel.GetColumn(accessionOrder.CassetteColor);
                        string         line   = cassette.GetLine(column.PrinterCode);

                        string fileName = System.IO.Path.Combine(column.PrinterPath, System.Guid.NewGuid().ToString() + cassette.GetFileExtension());

                        try
                        {
                            using (System.IO.StreamWriter file = new System.IO.StreamWriter(fileName))
                            {
                                file.Write(line + "\r\n");
                                aliquotOrder.Printed = true;
                            }
                        }
                        catch (Exception e)
                        {
                            System.Windows.MessageBox.Show(fileName + ": " + e.Message, "Cassette Printer Location.", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Exclamation);
                        }
                    }
                }
            }
        }
示例#2
0
 private void Initialize()
 {
     this.m_Cassettes = new List <Cassette>();
     foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in this.m_AliquotOrderCollection)
     {
         if (aliquotOrder.IsBlock() == true)
         {
             if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint == true)
             {
                 Cassette cassette = new Cassette();
                 cassette.FromAliquotOrder(aliquotOrder, this.m_AccessionOrder);
                 this.m_Cassettes.Add(cassette);
             }
         }
     }
 }
示例#3
0
 private void Initialize()
 {
     this.m_Cassettes = new List<Cassette>();
     foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in this.m_AliquotOrderCollection)
     {
         if (aliquotOrder.IsBlock() == true)
         {
             if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.DirectPrint == true)
             {
                 Cassette cassette = new Cassette();
                 cassette.FromAliquotOrder(aliquotOrder, this.m_AccessionOrder);
                 this.m_Cassettes.Add(cassette);
             }
         }
     }
 }