コード例 #1
0
ファイル: XmlGateway.cs プロジェクト: ericramses/YPILIS
        public static Test.AccessionOrder GetAccessionOrder(string masterAccessionNo)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblAccessionOrder where MasterAccessionno = @MasterAccessionNo " +
                "Select * from tblSpecimenOrder where MasterAccessionNo = @MasterAccessionNo order by SpecimenNumber";
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add("@MasterAccessionNo", SqlDbType.VarChar).Value = masterAccessionNo;

            YellowstonePathology.Business.Test.AccessionOrder result = new Test.AccessionOrder();
            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(result, dr);
                        propertyWriter.WriteProperties();
                    }
                    dr.NextResult();

                    while (dr.Read())
                    {
                        Specimen.Model.SpecimenOrder specimenOrder = new Specimen.Model.SpecimenOrder();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(specimenOrder, dr);
                        propertyWriter.WriteProperties();
                        result.SpecimenOrderCollection.Add(specimenOrder);
                    }
                }
            }

            return result;
        }
コード例 #2
0
        public static YellowstonePathology.Business.ClientOrder.Model.ClientOrder BuildClientOrder(SqlDataReader dr)
        {
            YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder = null;
            Nullable<int> panelSetId = null;
            while (dr.Read())
            {
                if (dr["PanelSetId"] != DBNull.Value)
                {
                    panelSetId = Convert.ToInt32(dr["PanelSetId"].ToString());
                }
            }

            clientOrder = YellowstonePathology.Business.ClientOrder.Model.ClientOrderFactory.GetClientOrder(panelSetId);
            dr.NextResult();

            while (dr.Read())
            {
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Persistence.SqlDataReaderPropertyWriter(clientOrder, dr);
                propertyWriter.WriteProperties();
            }

            dr.NextResult();
            while (dr.Read())
            {
                YellowstonePathology.Business.Client.Model.ClientLocation clientLocation = new YellowstonePathology.Business.Client.Model.ClientLocation();
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(clientLocation, dr);
                propertyWriter.WriteProperties();
                clientOrder.ClientLocation = clientLocation;
            }

            return clientOrder;
        }
コード例 #3
0
ファイル: XmlGateway.cs プロジェクト: waffle-iron/YPILIS
		public static XElement GetAccessionOrder(string masterAccessionNo)
        {            
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblAccessionOrder where MasterAccessionno = '" + masterAccessionNo + "'";
            cmd.CommandType = CommandType.Text;

            YellowstonePathology.Business.Test.AccessionOrder accessionOrder = new Test.AccessionOrder();
            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
						YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(accessionOrder, dr);
						propertyWriter.WriteProperties();
                    }
                }
            }

			XElement result = new XElement("AccessionOrder");
			YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new YellowstonePathology.Business.Persistence.XmlPropertyReader(accessionOrder, result);
			xmlPropertyReader.Write();
            return result;
        }
コード例 #4
0
        public YellowstonePathology.Business.Client.Model.ClientLocation GetClientLocation(int clientLocationId)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblClientLocation where ClientLocationId = @ClientLocationId";

            SqlParameter clientLocationIdParameter = new SqlParameter("@ClientLocationId", SqlDbType.Int);
            clientLocationIdParameter.Value = clientLocationId;
            cmd.Parameters.Add(clientLocationIdParameter);
            cmd.CommandType = System.Data.CommandType.StoredProcedure;

            YellowstonePathology.Business.Client.Model.ClientLocation clientLocation = null;
            using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        clientLocation = new Business.Client.Model.ClientLocation();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(clientLocation, dr);
                        propertyWriter.WriteProperties();
                    }
                }
            }

            return clientLocation;
        }
コード例 #5
0
ファイル: XmlGateway.cs プロジェクト: WilliamCopland/YPILIS
        public static XElement GetAccessionOrder(string masterAccessionNo)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblAccessionOrder where MasterAccessionno = '" + masterAccessionNo + "'";
            cmd.CommandType = CommandType.Text;

            YellowstonePathology.Business.Test.AccessionOrder accessionOrder = new Test.AccessionOrder();
            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(accessionOrder, dr);
                        propertyWriter.WriteProperties();
                    }
                }
            }

            XElement result = new XElement("AccessionOrder");
            YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new YellowstonePathology.Business.Persistence.XmlPropertyReader(accessionOrder, result);
            xmlPropertyReader.Write();
            return result;
        }
コード例 #6
0
ファイル: SQLGateway.cs プロジェクト: WilliamCopland/YPILIS
        public static List<object> GetObjectList(Type objectType)
        {
            List<object> result = new List<object>();
            string tableName = "tbl" + objectType.Name;

            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from " + tableName;
            cmd.CommandType = CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        object item = Activator.CreateInstance(objectType);
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(item, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                        result.Add(item);
                    }
                }
            }
            return result;
        }
コード例 #7
0
        public void BuildClientOrder()
        {
            while (this.m_DataReader.Read())
            {
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Persistence.SqlDataReaderPropertyWriter(this.m_ClientOrder, this.m_DataReader);
                propertyWriter.WriteProperties();
            }

            this.m_DataReader.NextResult();
            while (this.m_DataReader.Read())
            {
                YellowstonePathology.Business.Client.Model.ClientLocation clientLocation = new YellowstonePathology.Business.Client.Model.ClientLocation();
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(clientLocation, this.m_DataReader);
                propertyWriter.WriteProperties();
                this.m_ClientOrder.ClientLocation = clientLocation;
            }
        }
コード例 #8
0
        public YellowstonePathology.YpiConnect.Contract.Billing.BillingDetail Build()
        {
            YellowstonePathology.YpiConnect.Contract.Billing.BillingDetail billingDetail = new Contract.Billing.BillingDetail();
            using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString))
            {
                cn.Open();
                m_Cmd.Connection = cn;
                using (SqlDataReader dr = m_Cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        YellowstonePathology.YpiConnect.Contract.Billing.PanelSetOrderCPTCode panelSetOrderCPTCode = new Contract.Billing.PanelSetOrderCPTCode();
                        panelSetOrderCPTCode.WriteProperties(propertyWriter);
                        billingDetail.PanelSetOrderCPTCodeCollection.Add(panelSetOrderCPTCode);
                    }

                    dr.NextResult();

                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        YellowstonePathology.YpiConnect.Contract.Billing.PanelSetOrderCPTCodeBill panelSetOrderCPTCodeBill = new Contract.Billing.PanelSetOrderCPTCodeBill();
                        panelSetOrderCPTCodeBill.WriteProperties(propertyWriter);
                        billingDetail.PanelSetOrderCPTCodeBillCollection.Add(panelSetOrderCPTCodeBill);
                    }

                    dr.NextResult();

                    while (dr.Read())
                    {
                        YellowstonePathology.YpiConnect.Contract.Billing.ICD9BillingCode icd9BillingCode = new Contract.Billing.ICD9BillingCode();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(icd9BillingCode, dr);
                        propertyWriter.WriteProperties();
                        billingDetail.ICD9BillingCodeCollection.Add(icd9BillingCode);
                    }
                }
            }

            billingDetail.RemoteFileList = new Contract.RemoteFileList(this.m_ReportNo, this.m_IncludeMemorystream);
            billingDetail.RemoteFileList.Load();

            return billingDetail;
        }
コード例 #9
0
        private static YellowstonePathology.Business.ClientOrder.Model.OrderCategoryCollection BuildOrderCategoryCollection(SqlCommand cmd)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderCategoryCollection orderCategoryCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderCategoryCollection();
            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderCategory orderCategory = new YellowstonePathology.Business.ClientOrder.Model.OrderCategory();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(orderCategory, dr);
                        propertyWriter.WriteProperties();
                        orderCategoryCollection.Add(orderCategory);
                    }

                    dr.NextResult();

                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderType orderType = new YellowstonePathology.Business.ClientOrder.Model.OrderType();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(orderType, dr);
                        propertyWriter.WriteProperties();

                        foreach (YellowstonePathology.Business.ClientOrder.Model.OrderCategory orderCategory in orderCategoryCollection)
                        {
                            if (orderCategory.OrderCategoryId == orderType.OrderCategoryId)
                            {
                                orderCategory.OrderTypeCollection.Add(orderType);
                                break;
                            }
                        }
                    }
                }
            }

            return orderCategoryCollection;
        }
コード例 #10
0
ファイル: SQLGateway.cs プロジェクト: waffle-iron/YPILIS
        public static List <object> GetObjectList(Type objectType)
        {
            List <object> result    = new List <object>();
            string        tableName = "tbl" + objectType.Name;

            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "Select * from " + tableName;
            cmd.CommandType = CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        object item = Activator.CreateInstance(objectType);
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(item, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                        result.Add(item);
                    }
                }
            }
            return(result);
        }
コード例 #11
0
        public YellowstonePathology.Business.Client.Model.ClientLocation GetClientLocation(int clientLocationId)
        {
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "Select * from tblClientLocation where ClientLocationId = @ClientLocationId";

            SqlParameter clientLocationIdParameter = new SqlParameter("@ClientLocationId", SqlDbType.Int);

            clientLocationIdParameter.Value = clientLocationId;
            cmd.Parameters.Add(clientLocationIdParameter);
            cmd.CommandType = System.Data.CommandType.StoredProcedure;

            YellowstonePathology.Business.Client.Model.ClientLocation clientLocation = null;
            using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        clientLocation = new Business.Client.Model.ClientLocation();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(clientLocation, dr);
                        propertyWriter.WriteProperties();
                    }
                }
            }

            return(clientLocation);
        }
コード例 #12
0
        private YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount BuildWebServiceAccount(SqlDataReader dr)
        {
            YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount = null;
            while (dr.Read())
            {
                webServiceAccount = new Contract.Identity.WebServiceAccount();
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(webServiceAccount, dr);
                propertyWriter.WriteProperties();
            }
            if (webServiceAccount != null)
            {
                dr.NextResult();

                while (dr.Read())
                {
                    YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccountClient webServiceAccountClient = new Contract.Identity.WebServiceAccountClient();
                    YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(webServiceAccountClient, dr);
                    propertyWriter.WriteProperties();
                    webServiceAccount.WebServiceAccountClientCollection.Add(webServiceAccountClient);
                }

                dr.NextResult();

                while (dr.Read())
                {
                    webServiceAccount.Client = new Business.Client.Model.Client();
                    int s = (int)dr["ClientId"];
                    //TODO this is here becuse Client.Zip should be a nullable int but is not.
                    if (s == 0)
                    {
                        webServiceAccount.Client.ClientName = "Not Provided";
                    }
                    else
                    {
                        webServiceAccount.Client = new Business.Client.Model.Client();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(webServiceAccount.Client, dr);
                        propertyWriter.WriteProperties();
                    }
                }
            }

            if (webServiceAccount == null)
            {
                webServiceAccount = new Contract.Identity.WebServiceAccount();
                webServiceAccount.UserName = "******";
                webServiceAccount.Password = "******";
                webServiceAccount.IsKnown = false;
            }
            return webServiceAccount;
        }
コード例 #13
0
 private YellowstonePathology.Business.Client.Model.ClientCollection BuildClientCollection(SqlCommand cmd)
 {
     YellowstonePathology.Business.Client.Model.ClientCollection clientCollection = new Business.Client.Model.ClientCollection();
     using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString))
     {
         cn.Open();
         cmd.Connection = cn;
         using (SqlDataReader dr = cmd.ExecuteReader())
         {
             while (dr.Read())
             {
                 YellowstonePathology.Business.Client.Model.Client client = new Business.Client.Model.Client();
                 YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(client, dr);
                 propertyWriter.WriteProperties();
             }
         }
     }
     return clientCollection;
 }
コード例 #14
0
        private YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount BuildWebServiceAccount(SqlDataReader dr)
        {
            YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount = null;
            while (dr.Read())
            {
                webServiceAccount = new Contract.Identity.WebServiceAccount();
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(webServiceAccount, dr);
                propertyWriter.WriteProperties();
            }
            if (webServiceAccount != null)
            {
                dr.NextResult();

                while (dr.Read())
                {
                    YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccountClient webServiceAccountClient = new Contract.Identity.WebServiceAccountClient();
                    YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter     propertyWriter          = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(webServiceAccountClient, dr);
                    propertyWriter.WriteProperties();
                    webServiceAccount.WebServiceAccountClientCollection.Add(webServiceAccountClient);
                }

                dr.NextResult();

                while (dr.Read())
                {
                    webServiceAccount.Client = new Business.Client.Model.Client();
                    int s = (int)dr["ClientId"];
                    //TODO this is here becuse Client.Zip should be a nullable int but is not.
                    if (s == 0)
                    {
                        webServiceAccount.Client.ClientName = "Not Provided";
                    }
                    else
                    {
                        webServiceAccount.Client = new Business.Client.Model.Client();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(webServiceAccount.Client, dr);
                        propertyWriter.WriteProperties();
                    }
                }
            }

            if (webServiceAccount == null)
            {
                webServiceAccount          = new Contract.Identity.WebServiceAccount();
                webServiceAccount.UserName = "******";
                webServiceAccount.Password = "******";
                webServiceAccount.IsKnown  = false;
            }
            return(webServiceAccount);
        }
コード例 #15
0
        public void BuildClientOrder()
        {
            while (this.m_DataReader.Read())
            {
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Persistence.SqlDataReaderPropertyWriter(this.m_ClientOrder, this.m_DataReader);
                propertyWriter.WriteProperties();
            }

            this.m_DataReader.NextResult();
            while (this.m_DataReader.Read())
            {
                YellowstonePathology.Business.Client.Model.ClientLocation             clientLocation = new YellowstonePathology.Business.Client.Model.ClientLocation();
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(clientLocation, this.m_DataReader);
                propertyWriter.WriteProperties();
                this.m_ClientOrder.ClientLocation = clientLocation;
            }
        }
コード例 #16
0
        private static YellowstonePathology.Business.ClientOrder.Model.OrderCategoryCollection BuildOrderCategoryCollection(MySqlCommand cmd)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderCategoryCollection orderCategoryCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderCategoryCollection();
            using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (MySqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderCategory         orderCategory  = new YellowstonePathology.Business.ClientOrder.Model.OrderCategory();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(orderCategory, dr);
                        propertyWriter.WriteProperties();
                        orderCategoryCollection.Add(orderCategory);
                    }

                    dr.NextResult();

                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderType             orderType      = new YellowstonePathology.Business.ClientOrder.Model.OrderType();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(orderType, dr);
                        propertyWriter.WriteProperties();

                        foreach (YellowstonePathology.Business.ClientOrder.Model.OrderCategory orderCategory in orderCategoryCollection)
                        {
                            if (orderCategory.OrderCategoryId == orderType.OrderCategoryId)
                            {
                                orderCategory.OrderTypeCollection.Add(orderType);
                                break;
                            }
                        }
                    }
                }
            }

            return(orderCategoryCollection);
        }
コード例 #17
0
        public static YellowstonePathology.Business.ClientOrder.Model.ClientOrder BuildClientOrder(MySqlDataReader dr)
        {
            YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder = null;
            Nullable <int> panelSetId = null;

            while (dr.Read())
            {
                if (dr["PanelSetId"] != DBNull.Value)
                {
                    panelSetId = Convert.ToInt32(dr["PanelSetId"].ToString());
                }
            }

            clientOrder = YellowstonePathology.Business.ClientOrder.Model.ClientOrderFactory.GetClientOrder(panelSetId);
            dr.NextResult();

            while (dr.Read())
            {
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Persistence.SqlDataReaderPropertyWriter(clientOrder, dr);
                propertyWriter.WriteProperties();
            }

            dr.NextResult();
            while (dr.Read())
            {
                YellowstonePathology.Business.Client.Model.ClientLocation             clientLocation = new YellowstonePathology.Business.Client.Model.ClientLocation();
                YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(clientLocation, dr);
                propertyWriter.WriteProperties();
                clientOrder.ClientLocation = clientLocation;
            }

            return(clientOrder);
        }
コード例 #18
0
        private static YellowstonePathology.Business.ClientOrder.Model.OrderTypeCollection BuildOrderTypeCollection(SqlCommand cmd)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderTypeCollection orderTypeCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderTypeCollection();
            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderType orderType = new YellowstonePathology.Business.ClientOrder.Model.OrderType();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(orderType, dr);
                        propertyWriter.WriteProperties();
                        orderTypeCollection.Add(orderType);
                    }
                }
            }

            return orderTypeCollection;
        }
コード例 #19
0
 private YellowstonePathology.Business.Client.Model.ClientCollection BuildClientCollection(SqlCommand cmd)
 {
     YellowstonePathology.Business.Client.Model.ClientCollection clientCollection = new Business.Client.Model.ClientCollection();
     using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString))
     {
         cn.Open();
         cmd.Connection = cn;
         using (SqlDataReader dr = cmd.ExecuteReader())
         {
             while (dr.Read())
             {
                 YellowstonePathology.Business.Client.Model.Client client = new Business.Client.Model.Client();
                 YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(client, dr);
                 propertyWriter.WriteProperties();
             }
         }
     }
     return(clientCollection);
 }
コード例 #20
0
        private static YellowstonePathology.Business.ClientOrder.Model.OrderTypeCollection BuildOrderTypeCollection(SqlCommand cmd)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderTypeCollection orderTypeCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderTypeCollection();
            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderType             orderType      = new YellowstonePathology.Business.ClientOrder.Model.OrderType();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(orderType, dr);
                        propertyWriter.WriteProperties();
                        orderTypeCollection.Add(orderType);
                    }
                }
            }

            return(orderTypeCollection);
        }
コード例 #21
0
        public YellowstonePathology.YpiConnect.Contract.Billing.BillingDetail Build()
        {
            YellowstonePathology.YpiConnect.Contract.Billing.BillingDetail billingDetail = new Contract.Billing.BillingDetail();
            using (SqlConnection cn = new SqlConnection(YpiConnect.Service.Properties.Settings.Default.ServerSqlConnectionString))
            {
                cn.Open();
                m_Cmd.Connection = cn;
                using (SqlDataReader dr = m_Cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter       = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        YellowstonePathology.YpiConnect.Contract.Billing.PanelSetOrderCPTCode     panelSetOrderCPTCode = new Contract.Billing.PanelSetOrderCPTCode();
                        panelSetOrderCPTCode.WriteProperties(propertyWriter);
                        billingDetail.PanelSetOrderCPTCodeCollection.Add(panelSetOrderCPTCode);
                    }

                    dr.NextResult();

                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter           = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        YellowstonePathology.YpiConnect.Contract.Billing.PanelSetOrderCPTCodeBill panelSetOrderCPTCodeBill = new Contract.Billing.PanelSetOrderCPTCodeBill();
                        panelSetOrderCPTCodeBill.WriteProperties(propertyWriter);
                        billingDetail.PanelSetOrderCPTCodeBillCollection.Add(panelSetOrderCPTCodeBill);
                    }

                    dr.NextResult();

                    while (dr.Read())
                    {
                        YellowstonePathology.YpiConnect.Contract.Billing.ICD9BillingCode      icd9BillingCode = new Contract.Billing.ICD9BillingCode();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter  = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(icd9BillingCode, dr);
                        propertyWriter.WriteProperties();
                        billingDetail.ICD9BillingCodeCollection.Add(icd9BillingCode);
                    }
                }
            }

            billingDetail.RemoteFileList = new Contract.RemoteFileList(this.m_ReportNo, this.m_IncludeMemorystream);
            billingDetail.RemoteFileList.Load();

            return(billingDetail);
        }
コード例 #22
0
        public static Test.AccessionOrder GetAccessionOrder(string masterAccessionNo)
        {
            MySqlCommand cmd = new MySqlCommand();

            cmd.CommandText = "Select * from tblAccessionOrder where MasterAccessionno = @MasterAccessionNo; " +
                              "Select * from tblSpecimenOrder where MasterAccessionNo = @MasterAccessionNo order by SpecimenNumber;";
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.AddWithValue("@MasterAccessionNo", masterAccessionNo);

            YellowstonePathology.Business.Test.AccessionOrder result = new Test.AccessionOrder();
            using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (MySqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(result, dr);
                        propertyWriter.WriteProperties();
                    }
                    dr.NextResult();

                    while (dr.Read())
                    {
                        Specimen.Model.SpecimenOrder specimenOrder = new Specimen.Model.SpecimenOrder();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter(specimenOrder, dr);
                        propertyWriter.WriteProperties();
                        result.SpecimenOrderCollection.Add(specimenOrder);
                    }
                }
            }

            return(result);
        }