public void MarkJobComplete(Job job) { using(var cmd = this.SessionManager.GetCurrentUnitOfWork().CreateCommand("UPDATE Jobs SET IsComplete = @Complete WHERE JobID = @ID")) { cmd.AddParameter("Complete", DbType.Boolean, true); cmd.AddParameter("ID", DbType.Int64, job.JobID); cmd.ExecuteNonQuery(); job.IsComplete = true; } }
private void LoadCoreProperties(Job job, IDataReader dr) { job.JobID = dr.GetInt64("JobID"); job.StartTime = dr.GetDateTime("StartTime"); job.Duration = new TimeSpan(dr.GetInt64("Duration")); job.IsComplete = dr.GetBoolean("IsComplete"); job.Desciption = dr.GetString("Description"); }