public async Task <string> Schedule(long id, [FromBody] ScheduleParam param, Guid userID, string userName) { await _jobOrderService.Schedule(id, param, new Officer(userID, userName)); return("Ok"); }
public bool Update(int?id, ScheduleParam scheduleParam) { var result = 0; var schedule = Get(id); schedule.DateStart = scheduleParam.DateStart; schedule.DateEnd = scheduleParam.DateEnd; schedule.employees = _context.Employees.Find(Convert.ToInt16(scheduleParam.employees)); schedule.lessons = _context.Lessons.Find(Convert.ToInt16(scheduleParam.lessons)); schedule.room = _context.Rooms.Find(Convert.ToInt16(scheduleParam.room)); schedule.classes = _context.Classes.Find(Convert.ToInt16(scheduleParam.classes)); schedule.UpdateDate = DateTimeOffset.Now.LocalDateTime; result = _context.SaveChanges(); if (result > 0) { status = true; MessageBox.Show("Update Successfully"); } else { MessageBox.Show("Update Failed"); } return(status); }
public ScheduleJobOrderCommand(long id, ScheduleParam param, Officer user, IEventBus eventBus) { _id = id; _param = param; _user = user; _eventBus = eventBus; }
public async Task <string> Schedule(long id, ScheduleParam param) { return(await _requestProvider.BuildUpon(_url) .BaseURL(_url) .Uri($"/api/joborder/{id}/schedule") .Method(HttpMethod.Put) .Content(new JsonContent(param)) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <string>()); }
public virtual void Update(ScheduleParam _scheduleparam) { this.Trains = _scheduleparam.Trains; this.Origins = _scheduleparam.Origins; this.Destinations = _scheduleparam.Destinations; this.Departure = _scheduleparam.Departure; this.Arrival = _scheduleparam.Arrival; this.DepartureDate = _scheduleparam.DepartureDate; this.UpdateBy = "";//isi this.UpdateDate = DateTimeOffset.Now.LocalDateTime; }
public bool Update(int?id, ScheduleParam scheduleParam) { if (scheduleParam.lessons.ToString() == null) { MessageBox.Show("Don't insert white space"); } else { status = _scheduleRepository.Update(id, scheduleParam); } return(status); }
public bool Insert(ScheduleParam scheduleParam) { if (scheduleParam.lessons.ToString() == null) { MessageBox.Show("Don't insert white space"); } else { status = _scheduleRepository.Insert(scheduleParam); } return(status); //status = _scheduleRepository.Insert(scheduleParam); //return status; }
public bool Insert(ScheduleParam scheduleParam) { var result = 0; schedule.DateStart = scheduleParam.DateStart; schedule.DateEnd = scheduleParam.DateEnd; schedule.lessons = _context.Lessons.Find(Convert.ToInt16(scheduleParam.lessons)); schedule.room = _context.Rooms.Find(Convert.ToInt16(scheduleParam.room)); schedule.classes = _context.Classes.Find(Convert.ToInt16(scheduleParam.classes)); schedule.CreateDate = DateTimeOffset.Now.LocalDateTime; _context.Schedules.Add(schedule); result = _context.SaveChanges(); if (result > 0) { status = true; MessageBox.Show("Insert Successfully"); } else { MessageBox.Show("Insert Failed"); } return(status); }
public async Task <string> Schedule(long id, [FromBody] ScheduleParam param) { await _joborderService.Schedule(id, param); return("Ok"); }
public async Task Schedule(long id, ScheduleParam param, Officer user) { await Execute(new ScheduleJobOrderCommand(id, param, user, _eventBus)); }
public async Task Schedule(long id, ScheduleParam param) { await _apiClient.JobOrderSdk.Schedule(id, param); }