public static List <Entities.PublicationEntities.PublicationTask> GetPublicationTasks() { DAL.Utilities.Helper helper = new DAL.Utilities.Helper(_connectionString); string sql = string.Empty; sql += "SELECT * FROM PublicationTask;"; SqlCommand command = new SqlCommand(sql); DataTable dataTable = helper.GetDataTable(command); return(helper.ToList(dataTable, PublicationDAL.PublicationTaskEntityTransformer.ConvertRowToPublicationTask)); }
public static List <Entities.PublicationEntities.PublicationItem> GetPublicationItems(int publicationTaskID) { DAL.Utilities.Helper helper = new DAL.Utilities.Helper(_connectionString); SqlCommand command = new SqlCommand(); command.CommandTimeout = 10; command.CommandText = "GetPublicationItems"; command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@PublicationTaskID", System.Data.SqlDbType.Int).Value = publicationTaskID; DataTable dataTable = helper.GetDataTable(command); return(helper.ToList(dataTable, DAL.PublicationDAL.PublicationItemEntityTransformer.ConvertRowToPublicationItem)); }