Ejemplo n.º 1
0
    private void Guardar()
    {
        eps     _eps = new eps(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        Decimal ID   = _eps.Adicionar(TextBox_NIT.Text, TextBox_DV.Text, this.TextBox_COD_ENTIDAD.Text, TextBox_NOM_ENTIDAD.Text, TextBox_DIR_ENTIDAD.Text,
                                      TextBox_TEL_ENTIDAD.Text, TextBox_CONTACTO.Text, TextBox_CARGO.Text);

        if (ID == 0)
        {
            if (!String.IsNullOrEmpty(_eps.MensajeError))
            {
                Informar(Label_MENSAJE, "Error: Consulte con el Administrador: " + _eps.MensajeError, Proceso.Error);
            }
        }
        else
        {
            Informar(Label_MENSAJE, "La entidad fue creada correctamente y se le asignó el ID: " + ID.ToString() + ".", Proceso.Correcto);
            TextBox_ID.Text = ID.ToString();
        }
        Ocultar();
        Mostrar(Acciones.Guarda);
        Bloquear(Acciones.Guarda);
    }