public static void CompleteAutomatedTask(AutomatedTaskName taskName) { String name = taskName.ToString(); ProviderPortalEntities db = new ProviderPortalEntities(); AutomatedTask at = db.AutomatedTasks.Where(x => x.TaskName == name).FirstOrDefault(); if (at != null) { at.InProgress = false; db.Entry(at).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
public static Boolean CanRunAutomatedTask(AutomatedTaskName taskName) { ProviderPortalEntities db = new ProviderPortalEntities(); return(db.up_CanRunAutomatedTask(taskName.ToString()) == 1); }