コード例 #1
0
        public async Task <ReturnData <bool> > EditAsync(EditCompanyScheduleDto model, int id)
        {
            var result  = new ReturnData <bool>();
            var company = await _context.CompanySchedules.FirstOrDefaultAsync(i => i.Id == id);

            if (company != null)
            {
                company.EventDetails = model.EventDetails;
                company.EventName    = model.EventName;
                company.ScheduleTime = model.ScheduleTime;
                company.LastUpTime   = DateTime.Now;
            }
            result.Result = await _context.SaveChangesAsync() > 0;

            return(result);
        }
        public async Task <IActionResult> OutStock(EditCompanyScheduleDto model, int id)
        {
            var result = await _service.EditAsync(model, id);

            return(Ok(result));
        }