public ActionResult Editar(ADESCOMBUSINESS.Areas.Configuracion.Models.CAT_Instalaciones Registro) { try { this.CAT_InstalacionesProxy = new ADESCOMBUSINESS.Areas.Configuracion.Methods.CAT_InstalacionesBusiness((ADESCOMBUSINESS.DataAccess.Models.LoginRS)Session["InfoUser"]); } catch (Exception ex) { return(RedirectToAction("SesionExpired", "Inicio", new { Area = "", Mensaje = ex.Message })); } if (String.IsNullOrEmpty(Registro.INS_Descripcion)) { ModelState.AddModelError("INS_Descripcion", "Campo Requerido"); } if (ModelState.IsValid) { try { bool Status = CAT_InstalacionesProxy.Editar(Registro); if (!Status) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ViewBag.Error = "OK"; } catch (Exception ex) { ViewBag.Error = ex.Message; } } return(View(Registro)); }
public ActionResult Editar(int Instalacion_ID) { try { this.CAT_InstalacionesProxy = new ADESCOMBUSINESS.Areas.Configuracion.Methods.CAT_InstalacionesBusiness((ADESCOMBUSINESS.DataAccess.Models.LoginRS)Session["InfoUser"]); } catch (Exception ex) { return(RedirectToAction("SesionExpired", "Inicio", new { Area = "", Mensaje = ex.Message })); } OBJCAT_Instalaciones = CAT_InstalacionesProxy.GetByID(Instalacion_ID); if (OBJCAT_Instalaciones == null) { return(HttpNotFound()); } return(View(OBJCAT_Instalaciones)); }