public void Grabar()
        {
            try
            {
                Aca_Matricula_Tipo_Documento_Info tipoDocInfo = new Aca_Matricula_Tipo_Documento_Info();

                string mensaje = string.Empty;
                int    id      = 0;

                tipoDocInfo = Get_MatriculaTipoDocumento(ref mensaje);

                Aca_Material_Tipo_Documento_Bus neg = new Aca_Material_Tipo_Documento_Bus();
                bool resultado = neg.GrabarDB(tipoDocInfo, ref id, ref mensaje);
                txtIdTipoDocumento.Text = id.ToString();

                if (resultado == true)
                {
                    MessageBox.Show(mensaje, " Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.ucGe_Menu.Visible_bntGuardar_y_Salir = false;
                    this.ucGe_Menu.Visible_btnGuardar         = false;
                }
                else
                {
                    Log_Error_bus.Log_Error(mensaje.ToString());
                    MessageBox.Show("Error " + mensaje, "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.Message);
            }
        }
        public void Actualizar()
        {
            try
            {
                Aca_Material_Tipo_Documento_Bus   neg         = new Aca_Material_Tipo_Documento_Bus();
                Aca_Matricula_Tipo_Documento_Info tipoDocInfo = new Aca_Matricula_Tipo_Documento_Info();
                string mensaje = string.Empty;

                tipoDocInfo = Get_MatriculaTipoDocumento(ref mensaje);
                if (mensaje != "")
                {
                    MessageBox.Show(mensaje);
                    return;
                }
                tipoDocInfo.UsuarioModificacion = param.IdUsuario;
                bool resultado = neg.ActualizarDB(tipoDocInfo, ref mensaje);
                if (resultado)
                {
                    MessageBox.Show(mensaje, "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.ucGe_Menu.Visible_bntGuardar_y_Salir = false;
                    this.ucGe_Menu.Visible_btnGuardar         = false;
                }
                else
                {
                    Log_Error_bus.Log_Error(mensaje.ToString());
                    MessageBox.Show("Error " + mensaje, "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
 public void llenar_grid()
 {
     try
     {
         List <Aca_Matricula_Tipo_Documento_Info> lista = new List <Aca_Matricula_Tipo_Documento_Info>();
         Aca_Material_Tipo_Documento_Bus          neg   = new Aca_Material_Tipo_Documento_Bus();
         lista = neg.Get_List_Matricula_Tipo_Documento();
         gridControlMatriculaTipoDocumento.DataSource = lista;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ":" + ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void Anular()
        {
            try
            {
                if (TipoDocumentoInfo.Estado != "I")
                {
                    if (MessageBox.Show("¿Está seguro que desea anular el documento # " + txtIdTipoDocumento.Text.Trim() + " ?", "Anulación de Mantenimiento Documento Matricula", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        FrmGe_MotivoAnulacion fr = new FrmGe_MotivoAnulacion();
                        fr.ShowDialog();

                        Aca_Material_Tipo_Documento_Bus   neg         = new Aca_Material_Tipo_Documento_Bus();
                        Aca_Matricula_Tipo_Documento_Info tipoDocInfo = new Aca_Matricula_Tipo_Documento_Info();
                        string mensaje = string.Empty;

                        tipoDocInfo = Get_MatriculaTipoDocumento(ref mensaje);
                        if (mensaje != "")
                        {
                            MessageBox.Show("Error " + mensaje, "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }

                        tipoDocInfo.UsuarioAnulacion = param.IdUsuario;
                        tipoDocInfo.MotivoAnulacion  = fr.motivoAnulacion;
                        bool resultado = neg.EliminarDB(tipoDocInfo, ref mensaje);
                        if (resultado)
                        {
                            MessageBox.Show(mensaje, "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            this.ucGe_Menu.Visible_bntGuardar_y_Salir = false;
                            this.ucGe_Menu.Visible_btnGuardar         = false;
                        }
                        else
                        {
                            Log_Error_bus.Log_Error(mensaje.ToString());
                            MessageBox.Show("Error " + mensaje, "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
                else
                {
                    MessageBox.Show("El documento de la matricula # " + txtIdTipoDocumento.Text.Trim() + " ya se encuentra anulado.", "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show("Error " + ex.Message.ToString(), "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }