Ejemplo n.º 1
0
        public static XElement GetOrderComments(string masterAccessionNo)
        {
            MySqlCommand cmd = new MySqlCommand();

            cmd.CommandText = "Select * from tblOrderCommentLog where MasterAccessionNo = @MasterAccessionNo;";
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.AddWithValue("@MasterAccessionNo", masterAccessionNo);

            XElement result = new XElement("OrderComments");

            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.Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Business.Persistence.SqlDataReaderPropertyWriter(orderCommentLog, dr);
                        propertyWriter.WriteProperties();
                        XElement comment = new XElement("OrderComment");
                        YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new Persistence.XmlPropertyReader(orderCommentLog, comment);

                        xmlPropertyReader.Write();

                        result.Add(comment);
                    }
                }
            }

            return(result);
        }
Ejemplo n.º 2
0
		public static XElement GetOrderComments(string masterAccessionNo)
		{
			SqlCommand cmd = new SqlCommand();
			cmd.CommandText = "Select * from tblOrderCommentLog where MasterAccessionNo = @MasterAccessionNo; ";
			cmd.CommandType = CommandType.Text;
			cmd.Parameters.Add("@MasterAccessionNo", SqlDbType.VarChar).Value = masterAccessionNo;

			XElement result = new XElement("OrderComments");
			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.Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
						YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
						orderCommentLog.WriteProperties(propertyWriter);

						YellowstonePathology.Business.Domain.Persistence.XmlPropertyReader xmlPropertyReader = new Domain.Persistence.XmlPropertyReader();
						xmlPropertyReader.Initialize("OrderComment");
						orderCommentLog.ReadProperties(xmlPropertyReader);

						result.Add(xmlPropertyReader.Document);
					}
				}
			}

			return result;
		}
 public AccessionOrderDataSheetDataCommentLog(Domain.OrderCommentLog orderCommentLog)
 {
     this.m_LoggedBy    = string.IsNullOrEmpty(orderCommentLog.LoggedBy) ? orderCommentLog.LoggedBy : string.Empty;
     this.m_Description = string.IsNullOrEmpty(orderCommentLog.Description) ? orderCommentLog.Description : string.Empty;
     this.m_Comment     = string.IsNullOrEmpty(orderCommentLog.Comment) ? orderCommentLog.Comment : string.Empty;
     this.m_LogDate     = orderCommentLog.LogDate.ToShortDateString() + " " + orderCommentLog.LogDate.ToShortTimeString();
 }
Ejemplo n.º 4
0
 private static Domain.OrderCommentLog BuildOrderCommentLog(XElement sourceElement)
 {
     Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
     if (sourceElement != null)
     {
         Domain.Persistence.SqlXmlPropertyWriter xmlPropertyWriter = new Domain.Persistence.SqlXmlPropertyWriter(sourceElement);
         orderCommentLog.WriteProperties(xmlPropertyWriter);
     }
     return(orderCommentLog);
 }
Ejemplo n.º 5
0
 private static Domain.OrderCommentLog BuildOrderCommentLog(XElement sourceElement)
 {
     Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
     if (sourceElement != null)
     {
         Domain.Persistence.SqlXmlPropertyWriter xmlPropertyWriter = new Domain.Persistence.SqlXmlPropertyWriter(sourceElement);
         orderCommentLog.WriteProperties(xmlPropertyWriter);
     }
     return orderCommentLog;
 }
Ejemplo n.º 6
0
 private static YellowstonePathology.Business.Domain.OrderCommentLogCollection BuildOrderCommentLogCollection(XElement sourceElement)
 {
     Domain.OrderCommentLogCollection orderCommentLogCollection = new Domain.OrderCommentLogCollection();
     if (sourceElement != null)
     {
         foreach (XElement orderCommentLogElement in sourceElement.Elements("OrderCommentLog"))
         {
             Domain.OrderCommentLog orderCommentLog = BuildOrderCommentLog(orderCommentLogElement);
             orderCommentLogCollection.Add(orderCommentLog);
         }
     }
     return(orderCommentLogCollection);
 }
Ejemplo n.º 7
0
 private static YellowstonePathology.Business.Domain.OrderCommentLogCollection BuildOrderCommentLogCollection(MySqlCommand cmd)
 {
     Domain.OrderCommentLogCollection result = new Domain.OrderCommentLogCollection();
     using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
     {
         cn.Open();
         cmd.Connection = cn;
         using (MySqlDataReader dr = cmd.ExecuteReader())
         {
             while (dr.Read())
             {
                 Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
                 YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(orderCommentLog, dr);
                 sqlDataReaderPropertyWriter.WriteProperties();
                 result.Add(orderCommentLog);
             }
         }
     }
     return(result);
 }
Ejemplo n.º 8
0
        /*public static XElement GetSpecimenOrder(string masterAccessionNo)
        {
            XElement result = new XElement("SpecimenOrders");

            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblSpecimenOrder where MasterAccessionno = '" + masterAccessionNo + "' order by SpecimenNumber";
            cmd.CommandType = CommandType.Text;

            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.Specimen.Model.SpecimenOrder specimenOrder = new Specimen.Model.SpecimenOrder();
                        XElement specimenOrderElement = new XElement("SpecimenOrder");
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(specimenOrder, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();

                        YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new Persistence.XmlPropertyReader(specimenOrder, specimenOrderElement);
                        xmlPropertyReader.Write();
                        result.Add(specimenOrderElement);
                    }
                }
            }

            return result;
        }*/
        /*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.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;
        }*/
        /*public static XElement GetClientOrders(string masterAccessionNo)
        {
            XElement result = new XElement("ClientOrders");
            YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersByMasterAccessionNo(masterAccessionNo);
            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder in clientOrderCollection)
            {
                XElement clientOrderElement = new XElement("ClientOrder");
                YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(clientOrder, clientOrderElement);
                clientOrderPropertyWriter.Write();
                result.Add(clientOrderElement);

                foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection)
                {
                    XElement clientOrderDetailElement = new XElement("ClientOrderDetail");
                    YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement);
                    clientOrderDetailPropertyWriter.Write();
                    clientOrderElement.Add(clientOrderDetailElement);
                }
            }
            return result;
        }*/
        public static XElement GetOrderComments(string masterAccessionNo)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblOrderCommentLog where MasterAccessionNo = @MasterAccessionNo; ";
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add("@MasterAccessionNo", SqlDbType.VarChar).Value = masterAccessionNo;

            XElement result = new XElement("OrderComments");
            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.Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
                        YellowstonePathology.Business.Domain.Persistence.DataReaderPropertyWriter propertyWriter = new Business.Domain.Persistence.DataReaderPropertyWriter(dr);
                        orderCommentLog.WriteProperties(propertyWriter);

                        YellowstonePathology.Business.Domain.Persistence.XmlPropertyReader xmlPropertyReader = new Domain.Persistence.XmlPropertyReader();
                        xmlPropertyReader.Initialize("OrderComment");
                        orderCommentLog.ReadProperties(xmlPropertyReader);

                        result.Add(xmlPropertyReader.Document);
                    }
                }
            }

            return result;
        }
Ejemplo n.º 9
0
 private static YellowstonePathology.Business.Domain.OrderCommentLogCollection BuildOrderCommentLogCollection(SqlCommand cmd)
 {
     Domain.OrderCommentLogCollection result = new Domain.OrderCommentLogCollection();
     using (SqlConnection cn = new SqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
     {
         cn.Open();
         cmd.Connection = cn;
         using (SqlDataReader dr = cmd.ExecuteReader())
         {
             while (dr.Read())
             {
                 Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
                 YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(orderCommentLog, dr);
                 sqlDataReaderPropertyWriter.WriteProperties();
                 result.Add(orderCommentLog);
             }
         }
     }
     return result;
 }