示例#1
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        try
        {
            int    resIdPag  = -1;
            string keyIdPaga = null;

            if (Session["idPaga"] != null)
            {
                keyIdPaga = Session["idPaga"].ToString();
            }

            //Guardar Pagaduria
            resIdPag =
                AdministrarPagadurias.RegistrarPagaduria(keyIdPaga,
                                                         ddlCiudad.SelectedValue, ddlDepartamento.SelectedValue, ddlActivEcon.SelectedValue,
                                                         txtIdentificacion.Text, txtNombrePagaduria.Text, txtDireccion.Text, txtTelefono.Text, ddlVisacion.SelectedValue,
                                                         txtNumEmpl.Text, txtPorcPart.Text.Replace(".", ","), ddlFecEntregaNov.SelectedValue,
                                                         txtNomRespPago.Text, txtEmailRespPago.Text, txtTelRespPago.Text, txtCelRespPago.Text,
                                                         txtContacto.Text, txtEmailContacto.Text, txtTelContacto.Text, txtCelContacto.Text,
                                                         txtRespLegal.Text, txtEmailRespLegal.Text, txtTelRespLeg.Text, txtCelRespPago.Text,
                                                         txtEmail.Text, txtWeb.Text,
                                                         txtFecCumpleRespPago.Text, txtFecCumpleContacto.Text, txtFecCumpleRespLegal.Text,
                                                         ddlEstadoPagaduria.SelectedValue
                                                         );

            if (resIdPag > 0)
            {
                Session["idPaga"] = resIdPag;
                //MensajeForm("Datos Almacenados Correctamente", "DetallePagaduria.aspx");
                MensajeForm("Datos Almacenados Correctamente", "~/gestion/pagadurias/detalle");
            }
            else
            {
                MensajeForm("No se han podido Almacenados los datos. Por favor Intentelo Nuevamente", null);
            }
        }
        catch (Exception ex)
        {
            //Response.Write(ex.ToString());
            MensajeForm("Ha Ocurrido un Problema con su petición", null);
        }
    }
示例#2
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        try
        {
            int    resIdPag  = -1;
            string keyIdPaga = null;

            if (Session["idPaga"] != null)
            {
                keyIdPaga = Session["idPaga"].ToString();
            }

            //Guardar Pagaduria
            resIdPag = AdministrarPagadurias.RegistrarPagaduria(keyIdPaga,
                                                                ddlCiudad.SelectedValue, ddlDepartamento.SelectedValue, ddlActivEcon.SelectedValue,
                                                                txtIdentificacion.Text, txtNombrePagaduria.Text, txtDireccion.Text, txtTelefono.Text, ddlVisacion.SelectedValue,
                                                                txtNumEmpl.Text, txtPorcPart.Text.Replace(".", ","), ddlFecEntregaNov.SelectedValue,
                                                                txtNomRespPago.Text, txtEmailRespPago.Text, txtTelRespPago.Text, txtCelRespPago.Text,
                                                                txtContacto.Text, txtEmailContacto.Text, txtTelContacto.Text, txtCelContacto.Text,
                                                                txtRespLegal.Text, txtEmailRespLegal.Text, txtTelRespLeg.Text, txtCelRespPago.Text,
                                                                txtEmail.Text, txtWeb.Text,
                                                                txtFecCumpleRespPago.Text, txtFecCumpleContacto.Text, txtFecCumpleRespLegal.Text, ddlEstadoPagaduria.SelectedValue);

            if (resIdPag > 0)
            {
                Session["idPaga"] = resIdPag;
                ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('Datos Almacenados Correctamente.');window.location.replace('" + host + "/gestion/pagadurias/adicionar?tab=tab-1')", true);
            }
            else
            {
                MensajeForm("No se han podido Almacenados los datos. Por favor Intentelo Nuevamente", null);
            }
        }
        catch (Exception ex)
        {
            //Response.Write(ex.ToString());
            MensajeForm("Ha Ocurrido un Problema con su petición", null);
        }
    }