Exemplo n.º 1
0
        public void Grabar()
        {
            try
            {
                Aca_Paralelo_Info infoSeccion = new Aca_Paralelo_Info();

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

                paraleloInfo = GetParalelo(ref mensaje);
                Aca_Paralelo_Bus neg       = new Aca_Paralelo_Bus();
                bool             resultado = neg.GrabarDB(paraleloInfo, ref id, ref mensaje);
                txtIdParalelo.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, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                NameMetodo = NameMetodo + " - " + ex.ToString();
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
                MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas)
                                , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }