public IActionResult Update(TimeRegister timeRegister) { timeRegister.UserId = timeRegister.User.Id; _context.Entry(timeRegister).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult StopJob(int jobId) { TimeRegister stop = new TimeRegister(); stop = _context.TimeRegisters.FirstOrDefault(e => e.Id == jobId); stop.Stop = DateTime.Now; _context.Entry(stop).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); JobListVM jobListVm = new JobListVM(); jobListVm.jobId = stop.JobLineId; return(View("JobReady", jobListVm)); }
public async Task <IActionResult> StartJobAsync(int jobId) { TimeRegister start = new TimeRegister(); start.Start = DateTime.Now; start.JobLineId = jobId; start.User = await _userManager.GetUserAsync(User); _context.TimeRegisters.Add(start); _context.SaveChanges(); JobListVM jobListVm = new JobListVM(); jobListVm.jobId = start.Id; return(View("StartJob", jobListVm)); }
public IActionResult Create(TimeRegister timeRegister) { _context.TimeRegisters.Add(timeRegister); _context.SaveChanges(); return(RedirectToAction("Index")); }
protected override void OnEnd() { base.OnEnd(); TimeRegister.UnRegister(this.mTimeID); }
protected override void OnBackEvent() { this.mTimeID = TimeRegister.Register("AIMove1057", 0.2f, new Action(this.CreateBullets), false, 0f); this.angle = base.m_Entity.eulerAngles.y; }
protected override void OnEnd() { base.OnEnd(); TimeRegister.UnRegister(this.mTimeID); base.m_Entity.SetSuperArmor(false); }