Exemple #1
0
 // POST: api/cliente
 public IHttpActionResult Post([FromBody] Secretario value)
 {
     try
     {
         ControlSecretario.devolverInstancia().grabar(value);
         return(Ok(value));
     }
     catch (UsuarioException ex)
     {
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.BadRequest, ex.errores));
     }
 }
Exemple #2
0
 // DELETE: api/ApiCliente/5
 public void Delete(int id)
 {
     ControlSecretario.devolverInstancia().eliminar(id);
 }
Exemple #3
0
 // PUT: api/cliente/5
 public void Put([FromBody] Secretario value)
 {
     ControlSecretario.devolverInstancia().update(value);
 }
Exemple #4
0
 // GET: api/Encargados/5
 public Secretario Get(int id)
 {
     return(ControlSecretario.devolverInstancia().devolver(id));
 }
Exemple #5
0
 // GET: api/Encargados
 public IEnumerable <Secretario> Get()
 {
     return(ControlSecretario.devolverInstancia().devolverTodos());
 }