public async Task <IActionResult> PutAppoints([FromRoute] int id, [FromBody] Appoints appoints) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != appoints.AutoId) { return(BadRequest()); } _context.Entry(appoints).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AppointsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostAppoints([FromBody] Appoints appoints) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.Appoints.Add(appoints); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAppoints", new { id = appoints.AutoId }, appoints)); }
private void SetAppointNextStep() { Appoints appoints = (Appoints)bsAppoints.DataSource; FormStart form = (FormStart)MdiParent; FormSetToPoint formAppoint = new FormSetToPoint(); formAppoint.Database = database; formAppoint.Appoint = (Appoint)bsAppoints.Current; formAppoint.SaveData += SavingItem; form.AddChild(formAppoint); }