示例#1
0
 public ActionResult Edit([Bind(Include = "cbf_id,cln_id,cbf_dateOfCreated")] CabezaFactura cabezaFactura)
 {
     if (ModelState.IsValid)
     {
         CabezaFacturaBLL.Update(cabezaFactura);
         return(RedirectToAction("Index"));
     }
     ViewBag.cln_id = new SelectList(ClienteBLL.List(), "cln_id", "cln_tipo", cabezaFactura.cln_id);
     return(View(cabezaFactura));
 }
        public IHttpActionResult Put(CabezaFactura cabezaFactura)
        {
            try
            {
                CabezaFacturaBLL.Update(cabezaFactura);

                return(Content(HttpStatusCode.OK, "Factura actualizada correctamente"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message + cabezaFactura.ToString()));
            }
        }