public ActionResult Modificar(int IdEmpresa = 0, decimal Id_Mejora_Baja_Activo = 0, bool Exito = false) { #region Validar Session if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession)) { return(RedirectToAction("Login", new { Area = "", Controller = "Account" })); } SessionFixed.IdTransaccionSession = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString(); SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession; #endregion Af_Mej_Baj_Activo_Info model = bus_activo.get_info(IdEmpresa, Id_Mejora_Baja_Activo); if (model == null) { return(RedirectToAction("Index")); } model.IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual); model.lst_ct_cbtecble_det = bus_comprobante_detalle.get_list(IdEmpresa, model.IdTipoCbte == null ? 0 : Convert.ToInt32(model.IdTipoCbte), model.IdCbteCble == null ? 0 : Convert.ToDecimal(model.IdCbteCble)); list_ct_cbtecble_det.set_list(model.lst_ct_cbtecble_det, model.IdTransaccionSession); cargar_combos(IdEmpresa); if (Exito) { ViewBag.MensajeSuccess = MensajeSuccess; } #region Validacion Periodo ViewBag.MostrarBoton = true; if (!bus_periodo.ValidarFechaTransaccion(IdEmpresa, model.Fecha_MejBaj, cl_enumeradores.eModulo.ACF, Convert.ToInt32(SessionFixed.IdSucursal), ref mensaje)) { ViewBag.mensaje = mensaje; ViewBag.MostrarBoton = false; } #endregion return(View(model)); }
public ActionResult Modificar(int IdEmpresa = 0, decimal Id_Mejora_Baja_Activo = 0) { #region Validar Session if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession)) { return(RedirectToAction("Login", new { Area = "", Controller = "Account" })); } SessionFixed.IdTransaccionSession = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString(); SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession; #endregion Af_Mej_Baj_Activo_Info model = bus_activo.get_info(IdEmpresa, Id_Mejora_Baja_Activo); if (model == null) { return(RedirectToAction("Index")); } model.IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual); model.lst_ct_cbtecble_det = bus_comprobante_detalle.get_list(IdEmpresa, model.IdTipoCbte == null ? 0 : Convert.ToInt32(model.IdTipoCbte), model.IdCbteCble == null ? 0 : Convert.ToDecimal(model.IdCbteCble)); list_ct_cbtecble_det.set_list(model.lst_ct_cbtecble_det, model.IdTransaccionSession); cargar_combos(IdEmpresa); return(View(model)); }