Ejemplo n.º 1
0
 public IJobData GetJobByStatus(int status)
 {
     using (DatabaseDataContext db = new DatabaseDataContext())
         return (IJobData)db.Job_GetBy( null,
                                        status,
                                        null, null, null
                                       );
 }
Ejemplo n.º 2
0
 public IList<IComputedJobData> Job_Get(int? id, int? statusID, DateTime? createdDate, DateTime? lastModifiedDate)
 {
     using (DatabaseDataContext db = new DatabaseDataContext(OctopusConnectionString))
         return (
             from job in db.Job_GetBy(id, statusID, null, createdDate, true).ToList()
             select (IComputedJobData)job
             ).ToList();
 }
Ejemplo n.º 3
0
        public void Should_Add_Job_To_Database()
        {
            IJobData job =  AddJob(DTO.JobData.JobXML.ToString());

            using( DatabaseDataContext db = new DatabaseDataContext() )
                Assert.AreEqual(
                    db.Job_GetBy(job.ID, null, null, null, true).ToList().Count, 1
                    );
        }
Ejemplo n.º 4
0
 public Stream Job_Get(int? id)
 {
     using( DatabaseDataContext db = new DatabaseDataContext() )
     {
         return ToStream( XmlSerialize.ToXML( db.Job_GetBy( id, null, null, null, null, true ).Select( job => new JobDTO( job ) ).ToList(), ReturnType.Default, true ) );
     }
 }
Ejemplo n.º 5
0
 public IEnumerable<IJobData> GetJobs()
 {
     using (DatabaseDataContext db = new DatabaseDataContext())
         return db.Job_GetBy( null, null, null, null, true);
 }
Ejemplo n.º 6
0
 public IJobData GetJobByID(int id)
 {
     using (DatabaseDataContext db = new DatabaseDataContext())
         return (IJobData)db.Job_GetBy( id, null, null, null, null );
 }
Ejemplo n.º 7
0
 public IComputedJobData Job_GetByID(int id)
 {
     using (DatabaseDataContext db = new DatabaseDataContext())
         return (IComputedJobData)db.Job_GetBy(id, null, null, null, null);
 }
Ejemplo n.º 8
0
 public IList<IComputedJobData> Job_Get()
 {
     using (DatabaseDataContext db = new DatabaseDataContext())
         return (
             from job in db.Job_GetBy(null, null, null, null, null)
             select (IComputedJobData)job
             ).ToList();
 }