示例#1
0
        public static YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection GetOrderBrowserListItemsByHoldStatus()
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection resultCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "Select ClientOrderId, PanelSetId, PLastName, PFirstName, ProviderName, ClientName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                              "from tblClientOrder " +
                              "Where Hold = 1 " +
                              "Order by OrderTime desc";

            cmd.CommandType = System.Data.CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem      orderBrowserListItem = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter       = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderBrowserListItem.WriteProperties(propertyWriter);
                        resultCollection.Add(orderBrowserListItem);
                    }
                }
            }

            return(resultCollection);
        }
示例#2
0
        public static YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection GetRecentOrderBrowserListItemsByClientId(int clientId)
        {
            string clientIdString = clientId.ToString();

            if (clientId == 649 || clientId == 650)
            {
                clientIdString = "649, 650";
            }
            else if (clientId == 723)
            {
                clientIdString = "649, 650, 723";
            }

            YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection resultCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "Select ClientOrderId, ClientName, PanelSetId, PLastName, PFirstName, ProviderName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                              "from tblClientOrder " +
                              "Where ClientId in (" + clientIdString + ") and " +
                              "OrderTime >  dateadd(dd, -7, getdate()) and " +
                              "SystemInitiatingOrder <> 'YPIILIS' " +
                              "Order by OrderTime desc";

            cmd.CommandType = System.Data.CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem      orderBrowserListItem = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter       = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderBrowserListItem.WriteProperties(propertyWriter);
                        resultCollection.Add(orderBrowserListItem);
                    }
                }
            }

            return(resultCollection);
        }
示例#3
0
        public static YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection GetOrderBrowserListItemsByPatientName(string lastName, string firstName)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection resultCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection();
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.Add("@PLastName", SqlDbType.VarChar).Value = lastName;
            if (string.IsNullOrEmpty(firstName) == true)
            {
                cmd.CommandText = "Select ClientOrderId, PanelSetId, PLastName, PFirstName, ProviderName, ClientName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                                  "from tblClientOrder Where PLastName like @PLastName + '%' Order by OrderTime desc";
            }
            else
            {
                cmd.Parameters.Add("@PFirstName", SqlDbType.VarChar).Value = firstName;
                cmd.CommandText = "Select ClientOrderId, PanelSetId, PLastName, PFirstName, ProviderName, ClientName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                                  "from tblClientOrder Where PLastName like @PLastName + '%' and  PFirstName like @PFirstName + '%' Order by OrderTime desc";
            }

            cmd.CommandType = System.Data.CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem      orderBrowserListItem = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter       = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderBrowserListItem.WriteProperties(propertyWriter);
                        resultCollection.Add(orderBrowserListItem);
                    }
                }
            }

            return(resultCollection);
        }
示例#4
0
        public static YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection GetRecentOrderBrowserListItemsByClientId(int clientId)
        {
            string clientIdString = clientId.ToString();
            if (clientId == 649 || clientId == 650)
            {
                clientIdString = "649, 650";
            }
            else if (clientId == 723)
            {
                clientIdString = "649, 650, 723";
            }

            YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection resultCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection();
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select ClientOrderId, OrderStatus, ClientName, PanelSetId, PLastName, PFirstName, ProviderName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                "from tblClientOrder " +
                "Where ClientId in (" + clientIdString + ") and " +
                "OrderTime >  dateadd(dd, -7, getdate()) and " +
                "SystemInitiatingOrder <> 'YPIILIS' " +
                "Order by OrderTime desc";

            cmd.CommandType = System.Data.CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem orderBrowserListItem = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderBrowserListItem.WriteProperties(propertyWriter);
                        resultCollection.Add(orderBrowserListItem);
                    }
                }
            }

            return resultCollection;
        }
示例#5
0
        public static YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection GetOrderBrowserListItemsByPatientName(string lastName, string firstName)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection resultCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection();
            SqlCommand cmd = new SqlCommand();
            cmd.Parameters.Add("@PLastName", SqlDbType.VarChar).Value = lastName;
            if (string.IsNullOrEmpty(firstName) == true)
            {
                cmd.CommandText = "Select ClientOrderId, OrderStatus, PanelSetId, PLastName, PFirstName, ProviderName, ClientName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                    "from tblClientOrder Where PLastName like @PLastName + '%' Order by OrderTime desc";
            }
            else
            {
                cmd.Parameters.Add("@PFirstName", SqlDbType.VarChar).Value = firstName;
                cmd.CommandText = "Select ClientOrderId, OrderStatus, PanelSetId, PLastName, PFirstName, ProviderName, ClientName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                    "from tblClientOrder Where PLastName like @PLastName + '%' and  PFirstName like @PFirstName + '%' Order by OrderTime desc";
            }

            cmd.CommandType = System.Data.CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem orderBrowserListItem = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderBrowserListItem.WriteProperties(propertyWriter);
                        resultCollection.Add(orderBrowserListItem);
                    }
                }
            }

            return resultCollection;
        }
示例#6
0
        public static YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection GetOrderBrowserListItemsByOrderDate(DateTime orderDate)
        {
            YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection resultCollection = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItemCollection();
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select ClientOrderId, OrderStatus, PanelSetId, PLastName, PFirstName, ProviderName, ClientName, OrderedBy, OrderTime, Submitted, Received, OrderType " +
                "from tblClientOrder " +
                "Where OrderDate = @OrderDate " +
                "Order by OrderTime desc";

            cmd.Parameters.Add("@OrderDate", SqlDbType.DateTime).Value = orderDate;
            cmd.CommandType = System.Data.CommandType.Text;

            using (SqlConnection cn = new SqlConnection(ServerSqlConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem orderBrowserListItem = new YellowstonePathology.Business.ClientOrder.Model.OrderBrowserListItem();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderBrowserListItem.WriteProperties(propertyWriter);
                        resultCollection.Add(orderBrowserListItem);
                    }
                }
            }

            return resultCollection;
        }