示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("Revisar su conexión a internet.");
            }

            try {
                if (!Page.IsPostBack)
                {
                    dpFechaInicio.SelectedDate = DateTime.Now.AddMonths(-1);
                    dpFechaFinal.SelectedDate  = DateTime.Now;
                    EgresosVarios_Listar(((Usuario_LoginResult)Session["Usuario"]).nroDocumento, dpFechaInicio.SelectedDate.Value, dpFechaFinal.SelectedDate.Value);

                    lblMensaje.Text     = "Se encontraron " + grdEgresosVarios.Items.Count.ToString() + " registros.";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }
            try
            {
                if (!Page.IsPostBack)
                {
                    Title = "Registrar producto";
                    Item_Buscar(Request.QueryString["idItem"], Request.QueryString["idCliente"], decimal.Parse(Request.QueryString["idAlmacen"]),
                                Convert.ToBoolean(Int32.Parse(Request.QueryString["nuevo"])));
                }
                lblMensaje.Text     = "Datos del producto se cargo correctamente.";
                lblMensaje.CssClass = "mensajeExito";
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    lblTitulo.Text = "Clases Marca";
                    Page.Title     = "Clases Marca";

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    BuscarClases();
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void grdRecibos_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                List <gsEgresosVarios_BuscarDetalleResult> lst = JsonHelper.JsonDeserialize <List <gsEgresosVarios_BuscarDetalleResult> >((string)ViewState["lstEVDetalle"]);
                lst.Find(x => x.ID_Amarre == (decimal)((GridDataItem)e.Item).GetDataKeyValue("ID_Amarre")).Estado = 0;
                ViewState["lstEVDetalle"] = JsonHelper.JsonSerializer(lst);
                lblTotal.Text             = "Total: " + lst.ToList().AsEnumerable().Sum(x => x.Importe).ToString();

                grdRecibos.DataSource = lst.FindAll(x => x.Estado == 1);
                grdRecibos.DataBind();
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    var idMarca = (Request.QueryString["idMarca"]);
                    var imagen  = (Request.QueryString["imagen"]);
                    Page.Title       = "Logo Marca";
                    imgLogo.ImageUrl = "Documentos/" + idMarca + "/" + imagen;

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);
                }
            }
            catch (Exception ex)
            {
            }
        }
        protected void grdCobranza_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            string mensaje = "";

            lblMensaje.Text = "";

            try
            {
                if (e.CommandName == "Eliminar")
                {
                    if (ValidarValores(ref mensaje) == false)
                    {
                        int id_proyectado = 0;
                        id_proyectado = int.Parse(e.CommandArgument.ToString());

                        string obj = Request.QueryString["objDocumento"];

                        char     delimiter  = '}';
                        string[] arryString = Request.QueryString["objDocumento"].Split(delimiter);
                        arryString[0] = arryString[0] + "}";
                        arryString[1] = arryString[1].Substring(1, 6);
                        string fecha = arryString[1];

                        gsReporte_EstadoCuenta_BIResult objDocumento = JsonHelper.JsonDeserialize <gsReporte_EstadoCuenta_BIResult>(arryString[0]);


                        CobranzasWCFClient objCobranzaWCF = new CobranzasWCFClient();
                        objCobranzaWCF.ProyectadoCobranza_Eliminar(
                            ((Usuario_LoginResult)Session["Usuario"]).idEmpresa, ((Usuario_LoginResult)Session["Usuario"]).codigoUsuario, id_proyectado);


                        Proyeccion_Sectorista(0, fecha, 0, objDocumento.Origen, (int)objDocumento.OrigenOp, 1);

                        lblMensaje.Text     = "Se eliminó el registro.";
                        lblMensaje.CssClass = "mensajeExito";
                    }
                    else
                    {
                        lblMensaje.Text     = mensaje;
                        lblMensaje.CssClass = "mensajeError";
                    }
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            gsItem_BuscarResult objItem;

            try
            {
                if (txtCantidad.Value <= 0)
                {
                    throw new ArgumentException("ERROR: La cantidad ingresada debe ser mayor a 0.");
                }

                if (!Convert.ToBoolean(Int32.Parse(Request.QueryString["nuevo"])))
                {
                    objItem = new gsItem_BuscarResult();
                    objItem = ((List <gsItem_BuscarResult>)Session["lstProductos"]).Find(x => x.Item_ID.ToString() == Request.QueryString["idItem"]);
                    ((List <gsItem_BuscarResult>)Session["lstProductos"]).Remove(objItem);
                }

                objItem                 = new gsItem_BuscarResult();
                objItem                 = JsonHelper.JsonDeserialize <gsItem_BuscarResult>((string)ViewState["objItem"]);
                objItem.Precio          = Math.Round(decimal.Parse(txtPrecio.Text), 4);
                objItem.Cantidad        = Int32.Parse(txtCantidad.Text);
                objItem.Importe         = Math.Round(objItem.Precio * Int32.Parse(txtCantidad.Text), 4);
                objItem.Observacion     = txtObservacion.Text;
                objItem.Descuento       = Math.Round(decimal.Parse(txtDescuento.Text), 2);
                objItem.FactorUnidadInv = Math.Round(decimal.Parse(txtFactor.Text), 2);
                objItem.Stock           = Math.Round(decimal.Parse(txtStock.Text), 0);;
                objItem.Estado          = 1;
                if (Session["lstProductos"] == null)
                {
                    List <gsItem_BuscarResult> lstProductos = new List <gsItem_BuscarResult>();
                    Session["lstProductos"] = lstProductos;
                }

                ((List <gsItem_BuscarResult>)Session["lstProductos"]).Add(objItem);

                Impuesto_Guardar(objItem.Codigo, Convert.ToBoolean(Int32.Parse(Request.QueryString["nuevo"])));

                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CloseAndRebind(" + objItem.Item_ID + ");", true);
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    Empresa_Cargar();
                    Tipo_Cargar();
                    Pais_Cargar();
                    Titular_Cargar();
                    Estado_Cargar();
                    var idMarca = int.Parse((Request.QueryString["idMarca"]));

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    if (idMarca == 0)
                    {
                        lblTitulo.Text = "Nueva Marca";
                        Page.Title     = "Registrar Marca";
                    }


                    else
                    {
                        lblTitulo.Text = "Modificar Marca";
                        Page.Title     = "Modificar Marca";
                        Marca_Cargar(idMarca);
                    }
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
示例#9
0
        protected void grdGestionStock_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            lblMensaje.Text = "";

            try
            {
                if (e.CommandName == "Eliminar")
                {
                    int ID = 0;
                    ID = int.Parse(e.CommandArgument.ToString());


                    ItemWCFClient objItemWCF = new ItemWCFClient();

                    int    Operacion   = 3;
                    int    Kardex      = JsonHelper.JsonDeserialize <int>(Request.QueryString["Kardex"]);
                    int    ID_Almacen  = JsonHelper.JsonDeserialize <int>(Request.QueryString["ID_Almacen"]);
                    float  Cantidad    = 0;
                    string Observacion = txtObservacion.Text;

                    objItemWCF.Item_Mantenimiento_GestionStock(((Usuario_LoginResult)Session["Usuario"]).idEmpresa,
                                                               ((Usuario_LoginResult)Session["Usuario"]).codigoUsuario, ID, ID_Almacen, Kardex, Cantidad, Observacion, Operacion);


                    Item_Limpiar();
                    Item_GestionStock(0, ID_Almacen, Kardex, 0, "");

                    lblMensaje.Text     = "Se eliminó el registro.";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    dpFecRegistro.SelectedDate    = DateTime.Now;
                    dpFecVencimiento.SelectedDate = DateTime.Now;
                    Moneda_CargarComboBox();
                    CentroCosto_Cargar();
                    UnidadGestion_Cargar();
                    UnidadProyecto_Cargar();
                    NaturalezaGasto_Cargar();
                    EgresosVarios_Cargar(int.Parse((Request.QueryString["idOperacion"])));
                    if ((Request.QueryString["idOperacion"]) == "0")
                    {
                        Page.Title      = "Registrar planilla de gasto";
                        lblMensaje.Text = "Listo para registrar el gasto.";
                    }
                    else
                    {
                        Page.Title      = "Modificar planilla de gasto";
                        lblMensaje.Text = "Listo para modificar el gasto " + (Request.QueryString["idOperacion"]);
                    }

                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("Revisar su conexión a internet.");
            }

            try {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "ShowInsertForm(0);", true);
            }
            catch (Exception ex) {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void grdItem_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (e.CommandName == "Eliminar")
                {
                    List <gsItem_BuscarResult> lstProductos = (List <gsItem_BuscarResult>)Session["lstProductos"];
                    lstProductos.Find(x => x.Item_ID.ToString() == e.CommandArgument.ToString() && x.Estado == 1).Estado = 0;

                    List <gsImpuesto_ListarPorItemResult> lstImpuestos;
                    lstImpuestos = ((List <gsImpuesto_ListarPorItemResult>)Session["lstImpuestos"]).FindAll(x => x.ID_Item == lstProductos.Find(p => p.Item_ID.ToString() == e.CommandArgument.ToString()).Item_ID);
                    foreach (gsImpuesto_ListarPorItemResult objImpuesto in lstImpuestos)
                    {
                        ((List <gsImpuesto_ListarPorItemResult>)Session["lstImpuestos"]).Remove(objImpuesto);
                    }

                    //Calcular_Glosa();

                    //grdItem.DataSource = ((List<gsItem_BuscarResult>)Session["lstProductos"]).FindAll(x => x.Estado == 1).OrderBy(x => x.Item);
                    //grdItem.DataBind();

                    lblMensaje.Text     = "Se eliminó el producto del GuiaVentasFlujo con código " + e.CommandArgument.ToString() + " del GuiaVentasFlujo.";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    var idMarca = int.Parse((Request.QueryString["idMarca"]));
                    rdpFechaIni.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(-3).Month, 1);
                    rdpFechaFin.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).AddDays(1);

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    lblTitulo.Text = "Historico Marca";
                    Page.Title     = "Historico Marca";

                    BuscarHistorial();
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            AutoCompleteBoxEntry entry;

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    dpFecEmision.SelectedDate = DateTime.Now;
                    txtIGV.Value      = 0;
                    txtImpBase.Value  = 0;
                    txtInafecto.Value = 0;
                    txtImporte.Value  = 0;
                    TipoGasto_Cargar();
                    Documento_ListarTipoCompra();
                    if (Request.QueryString["objRecibo"] != "0")
                    {
                        Title = "Modificar documnento";

                        gsEgresosVarios_BuscarDetalleResult objEVDetalle = JsonHelper.JsonDeserialize <gsEgresosVarios_BuscarDetalleResult>(Request.QueryString["objRecibo"]);

                        txtComentario.Text = objEVDetalle.Observaciones;

                        if (!string.IsNullOrEmpty(objEVDetalle.ID_Agenda))
                        {
                            entry      = new AutoCompleteBoxEntry();
                            entry.Text = objEVDetalle.ID_Agenda + "-" + objEVDetalle.Agenda;
                            acbProveedor.Entries.Add(entry);
                        }

                        if (!string.IsNullOrEmpty(objEVDetalle.ID_Item))
                        {
                            cboTipoGasto.SelectedValue = objEVDetalle.ID_Item;
                        }

                        if (!string.IsNullOrEmpty(objEVDetalle.ID_Documento.ToString()))
                        {
                            //entry = new AutoCompleteBoxEntry();
                            //entry.Text = objEVDetalle.ID_Documento + "-" + objEVDetalle.NombreDocumento;
                            //acbTipoDocumento.Entries.Add(entry);
                            cboTipoDocumento.SelectedValue = objEVDetalle.ID_Documento.ToString();
                        }

                        txtSerie.Text     = objEVDetalle.Serie;
                        txtNumero.Text    = objEVDetalle.Numero.ToString();
                        txtImporte.Value  = (double)objEVDetalle.Importe;
                        txtIGV.Value      = (double)objEVDetalle.ImporteIGV;
                        txtImpBase.Value  = (double)objEVDetalle.ImporteBaseIGV;
                        txtInafecto.Value = (double)objEVDetalle.ImporteInafecto;
                        if (objEVDetalle.FechaEmision != null)
                        {
                            dpFecEmision.SelectedDate = objEVDetalle.FechaEmision;
                        }

                        lblMensaje.Text = "Datos del gasto " + objEVDetalle.ID_Amarre.ToString() + " cargados con éxito";
                    }
                    else
                    {
                        Title           = "Registrar documento";
                        lblMensaje.Text = "Datos iniciales cargados con éxito";
                    }

                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void ramGastosMng_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (e.Argument == "Rebind")
                {
                    //grdItem.MasterTableView.SortExpressions.Clear();
                    //grdItem.MasterTableView.GroupByExpressions.Clear();
                    //grdItem.DataSource = (List<gsItem_BuscarResult>)Session["lstProductos"];
                    //grdItem.DataBind();
                    ////Calcular_Glosa();

                    //lblMensaje.Text = "Se agregó el producto al pedido.";
                    //lblMensaje.CssClass = "mensajeExito";

                    //acbProducto.Entries.Clear();
                    //acbProducto.Focus();
                }

                if (e.Argument.Split('(')[0].Trim() == "RebindAndNavigate")
                {
                    grdRecibos.MasterTableView.SortExpressions.Clear();
                    grdRecibos.MasterTableView.GroupByExpressions.Clear();
                    List <gsEgresosVarios_BuscarDetalleResult> lst = JsonHelper.JsonDeserialize <List <gsEgresosVarios_BuscarDetalleResult> >((string)ViewState["lstEVDetalle"]);
                    string strEVDetalle = "{" + e.Argument.Split('{')[1];
                    gsEgresosVarios_BuscarDetalleResult objEVDetalle = JsonHelper.JsonDeserialize <gsEgresosVarios_BuscarDetalleResult>(strEVDetalle.Substring(0, strEVDetalle.Length - 1));
                    if (objEVDetalle.ID_Amarre == 0)
                    {
                        objEVDetalle.ID_Amarre = (lst.FindAll(x => x.ID_Amarre <= 0).Count + 1) * -1;
                    }
                    lst.Remove(lst.Find(x => x.ID_Amarre == objEVDetalle.ID_Amarre));
                    lst.Add(objEVDetalle);

                    lblTotal.Text = "Total: " + lst.ToList().AsEnumerable().Sum(x => x.Importe).ToString();

                    grdRecibos.DataSource = lst.OrderBy(x => x.ID_Amarre);
                    grdRecibos.DataBind();

                    ViewState["lstEVDetalle"] = JsonHelper.JsonSerializer(lst);
                    if (objEVDetalle.ID_Amarre > 0)
                    {
                        lblMensaje.Text = "Se modificó el gastos con código " + objEVDetalle.ID_Amarre.ToString();
                    }
                    else
                    {
                        lblMensaje.Text = "Se registró el gastos con código " + objEVDetalle.ID_Amarre.ToString();
                    }
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }