示例#1
0
        private static YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder BuildReportOrderMolecularAnalysis(string reportNo)
        {
            YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder reportMolecularAnalysis = null;
            using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                MySqlCommand cmd = new MySqlCommand();
                cmd.CommandText = "Select * " +
                                  "from tblMolecularAnalysisTestOrder ro " +
                                  "join tblPanelSetOrder pso on rm.ReportNo = pso.ReportNo " +
                                  "where ro.ReportNo = @ReportNo;";
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.AddWithValue("@ReportNo", reportNo);
                cmd.Connection = cn;

                using (MySqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        reportMolecularAnalysis = new YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(reportMolecularAnalysis, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                    }
                }
            }
            return(reportMolecularAnalysis);
        }
 public ReportOrderMolecularAnalysisDialog(YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder reportOrderMolecularAnalaysis)
 {
     this.m_ReportOrderMolecularAnalysis = reportOrderMolecularAnalaysis;
     InitializeComponent();
     this.DataContext = this;
 }
 public ReportOrderMolecularAnalysisDialog(YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder reportOrderMolecularAnalaysis)
 {
     this.m_ReportOrderMolecularAnalysis = reportOrderMolecularAnalaysis;
     InitializeComponent();
     this.DataContext = this;
 }
示例#4
0
        public static void ShowDialog(YellowstonePathology.Business.Test.PanelSetOrder reportOrder)
        {
            if (reportOrder != null)
            {
                switch (reportOrder.PanelSetId)
                {
                case 51:     //Fish Analysis
                    YellowstonePathology.Business.Test.FishAnalysis.FishAnalysisTestOrder reportOrderFishAnalysis = (YellowstonePathology.Business.Test.FishAnalysis.FishAnalysisTestOrder)reportOrder;
                    YellowstonePathology.UI.ReportOrder.ReportOrderFishAnalysisDialog     reportOrderFishDialog   = new ReportOrderFishAnalysisDialog(reportOrderFishAnalysis);
                    reportOrderFishDialog.ShowDialog();
                    break;

                case 52:     //Molecular Analysis
                    YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder reportOrderMolecularAnalysis = (YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder)reportOrder;
                    YellowstonePathology.UI.ReportOrder.ReportOrderMolecularAnalysisDialog          reportOrderMolecularDialog   = new ReportOrderMolecularAnalysisDialog(reportOrderMolecularAnalysis);
                    reportOrderMolecularDialog.ShowDialog();
                    break;

                case 53:     //Absolute CD4 Count
                    YellowstonePathology.Business.Test.AbsoluteCD4Count.AbsoluteCD4CountTestOrder reportOrderAbsolutCD4Count       = (YellowstonePathology.Business.Test.AbsoluteCD4Count.AbsoluteCD4CountTestOrder)reportOrder;
                    YellowstonePathology.UI.ReportOrder.ReportOrderAbsoluteCD4CountDialog         reportOrderAbsolutCD4CountDialog = new ReportOrderAbsoluteCD4CountDialog(reportOrderAbsolutCD4Count);
                    reportOrderAbsolutCD4CountDialog.ShowDialog();
                    break;
                }
            }
        }
        private static YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder BuildReportOrderMolecularAnalysis(string reportNo)
        {
            YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder reportMolecularAnalysis = null;
            using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.CommandText = "Select * " +
                    "from tblMolecularAnalysisTestOrder ro " +
                    "join tblPanelSetOrder pso on rm.ReportNo = pso.ReportNo " +
                    "where ro.ReportNo = @ReportNo";
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add("@ReportNo", SqlDbType.VarChar).Value = reportNo;
                cmd.Connection = cn;

                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        reportMolecularAnalysis = new YellowstonePathology.Business.Test.MolecularAnalysis.MolecularAnalysisTestOrder();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(reportMolecularAnalysis, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                    }
                }
            }
            return reportMolecularAnalysis;
        }