private static void CreateJob(IDictionary <string, IEmployee> employeesByName, string[] commandArgs, JobCollection jobCollection) { string jobName = commandArgs[1]; int requiredHours = int.Parse(commandArgs[2]); string targetEmployeeName = commandArgs[3]; IEmployee targetEmployee = employeesByName[targetEmployeeName]; IJob job = new Job(jobName, requiredHours, targetEmployee); jobCollection.Add(job); }
private void AddJob(EncodeInfo inJob) { try { JobCollection.Add(inJob); NotifyOfPropertyChange(() => JobCollection); } catch (Exception ex) { Log.Error(ex); } }
public void Load() { JobCollection.Clear(); DAL dal = new DAL(); DataTable dt = dal.Read("select JobRequest_Id,bit_job_type.Job_Type,bit_job_type.Job_Type_Id,RequestDate,Priority,Comments,Status,bit_client_location.Location_Name,bit_client_location.Location_Id from bit_job_request, bit_job_type, bit_client_location where bit_job_request.Job_Type_Id = bit_job_type.Job_Type_Id and bit_job_request.Location_Id = bit_client_location.Location_Id and Status in('Requested','Acknowledged') order by JobRequest_Id"); foreach (DataRow dr in dt.Rows) { JobAssignment job = new JobAssignment(dr); JobCollection.Add(job); } }
private JobCollection InitializeCollection(DataTable dt) { JobCollection retVal = null; if (dt != null && dt.Columns.Count > 0) { retVal = new JobCollection(); foreach (DataRow row in dt.Rows) { Job item = InitializeObject(row); retVal.Add(item); } } return(retVal); }
public void RefreshJobList() { try { List <Job> jobList = DataController.GetInstance.GetJobs(); jc = Application.Current.Resources["JobCollection"] as JobCollection; jc.Clear(); foreach (Job job in jobList) { jc.Add(job); } Application.Current.Resources["JobCollection"] = jc; } catch (MySqlException ex) { MessageBox.Show(ex.Message); } }
public void SearchJobList(string searchTerm) { if (searchTerm.Length == 0 || searchTerm.Equals("Search")) { jlc = jc; Application.Current.Resources["JobListCollection"] = jlc; } else { JobCollection tempList = new JobCollection(); foreach (Job job in jc) { if (job.Job_Number.ToLower().Contains(searchTerm.ToLower()) || job.Job_Status.ToLower().Contains(searchTerm.ToLower())) { tempList.Add(job); } } Application.Current.Resources["JobListCollection"] = tempList; } }
private static JobCollection CreateStartWorkflowJob() { JobCollection jobs = new JobCollection(); StartWorkflowJob sJob = new StartWorkflowJob(); sJob.JobID = UuidHelper.NewUuidString(); sJob.ProcessKey = "DefaultApprovalProcess"; sJob.JobID = Guid.NewGuid().ToString(); sJob.Name = "启动流程测试"; sJob.Description = "小测一下"; sJob.Creator = new OguUser("6872ac4c-48a2-47fc-a12f-05415dc50042"); //zhangyy sJob.Operator = new OguUser("22c3b351-a713-49f2-8f06-6b888a280fff"); //wangli5 JobSchedule schedule = CreateSchedule(); JobSchedule schedule0 = CreateSchedule(); sJob.Schedules.Add(schedule); sJob.Schedules.Add(schedule0); jobs.Add(sJob); return(jobs); }
public JobCollection GetJobsByGroup(string group) { var jobs = new JobCollection(); lock (_initLock) { foreach (var job in _jobs) { if (job.Group == group) jobs.Add(job); } } return jobs; }
private static void AddToJobList(Job job) { L.I("Adding New Job to the collection: " + job.JobName); JobCollection.Add(job); }
private static JobCollection CreateStartWorkflowJob() { JobCollection jobs = new JobCollection(); StartWorkflowJob sJob = new StartWorkflowJob(); sJob.JobID = UuidHelper.NewUuidString(); sJob.ProcessKey = "DefaultApprovalProcess"; sJob.JobID = Guid.NewGuid().ToString(); sJob.Name = "启动流程测试"; sJob.Description = "小测一下"; sJob.Creator = new OguUser("6872ac4c-48a2-47fc-a12f-05415dc50042"); //zhangyy sJob.Operator = new OguUser("22c3b351-a713-49f2-8f06-6b888a280fff"); //wangli5 JobSchedule schedule = CreateSchedule(); JobSchedule schedule0 = CreateSchedule(); sJob.Schedules.Add(schedule); sJob.Schedules.Add(schedule0); jobs.Add(sJob); return jobs; }