Ejemplo n.º 1
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);
 }
 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;
 }