public static void SendEmail(AryaTask job, bool includeLogUrl, string customStatus, string projectName, string emailAddress, string portalLocation) { var subject = String.Format("{0}: {1}", job.JobType.Spacify(), job.Description); //var to = aryaDb.CurrentUser.EmailAddress; var to = emailAddress; var messageBody = String.Format(@" Project Name: {0} Description: {1} Status: {2}", projectName, job.Description, customStatus ?? WorkerBase.GetFriendlyWorkerState((WorkerState)Enum.Parse(typeof(WorkerState), job.Status))); if (includeLogUrl) { messageBody += String.Format("{0}{0}Log file can be viewed here: {1}/Log.aspx?ID={2}", Environment.NewLine, portalLocation, job.ID); } EmailSender.SendEmail(to, messageBody, subject); }
public static AryaTask CreateAryaTask(Guid id, Guid projectID, string description, string argumentDirectoryPath, Guid submittedBy, Type jobType) { using (var db = new AryaServicesDbDataContext()) { var nt = new AryaTask { ID = id, ProjectID = projectID, Description = description, ArgumentDirectoryPath = argumentDirectoryPath, Status = "New", SubmittedBy = submittedBy, SubmittedOn = DateTime.Now, LastUpdateOn = DateTime.Now, JobType = jobType.FullName.Split('.').Last() }; db.AryaTasks.InsertOnSubmit(nt); db.SubmitChanges(); return(nt); } }
private void detach_AryaTasks(AryaTask entity) { this.SendPropertyChanging(); entity.AryaSchedule = null; }
partial void DeleteAryaTask(AryaTask instance);
partial void UpdateAryaTask(AryaTask instance);
partial void InsertAryaTask(AryaTask instance);