Exemplo n.º 1
0
        protected void AppendCopyToList(T transmittal)
        {
            StringBuilder builder = new StringBuilder(100);

            builder.Append(string.Format("SELECT * FROM {0}CopyList",
                                         this.EntityName));
            builder.Append(string.Format(" WHERE {0} = '{1}';",
                                         this.KeyFieldName,
                                         transmittal.Key));
            using (IDataReader reader = this.ExecuteReader(builder.ToString()))
            {
                while (reader.Read())
                {
                    transmittal.CopyToList.Add(TransmittalFactory.BuildCopyTo(
                                                   transmittal.ProjectKey, reader));
                }
            }
        }
Exemplo n.º 2
0
        protected void AppendRoutingItems(T transmittal)
        {
            StringBuilder builder = new StringBuilder(100);

            builder.Append(string.Format("SELECT * FROM {0}RoutingItem tri ", this.EntityName));
            builder.Append(" INNER JOIN RoutingItem ri ON");
            builder.Append(" tri.RoutingItemID = ri.RoutingItemID");
            builder.Append(" INNER JOIN Discipline d ON");
            builder.Append(" ri.DisciplineID = d.DisciplineID");
            builder.Append(string.Format(" WHERE tri.{0} = '{1}';",
                                         this.KeyFieldName, transmittal.Key));
            using (IDataReader reader = this.ExecuteReader(builder.ToString()))
            {
                while (reader.Read())
                {
                    transmittal.RoutingItems.Add(TransmittalFactory.BuildRoutingItem(
                                                     transmittal.ProjectKey, reader));
                }
            }
        }