コード例 #1
0
 public exportdb(Central2 central)
 {
     InitializeComponent();
     this.central = central;
     this.initialsettings();
     this.FormClosed += (a, b) => { this.central.dboperations = null; };
     this.aviso       = new inneradvice();
 }
コード例 #2
0
        private void importar() //PROCESO DE IMPORTACION
        {
            genericDefinitions.closeAccess = false;

            this.Invoke(new MethodInvoker(delegate() {
                this.aviso = new inneradvice("Importando Base de Datos")
                {
                    MdiParent = this.central
                };
                this.Visible = false;
                this.aviso.Show();
            }));

            if (this.db.restoreDB(this.ofd.FileName))
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(new MethodInvoker(delegate()
                    {
                        this.aviso.Close();
                        genericDefinitions.ok("La base de datos ha sido importada satisfactoriamente!");
                        this.Visible = true;
                    }));
                }
                else
                {
                    genericDefinitions.ok("La base de datos ha sido importada satisfactoriamente!");
                    this.Visible = true;
                }
            }
            else
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(new MethodInvoker(delegate()
                    {
                        this.aviso.Close();
                        genericDefinitions.error("Error al importar base de datos.");
                        this.Visible = true;
                    }));
                }
                else
                {
                    this.aviso.Close();
                    genericDefinitions.ok("Error al importar base de datos.");
                    this.Visible = true;
                }
            }

            genericDefinitions.closeAccess = true;
        }
コード例 #3
0
 public exportdb()
 {
     InitializeComponent();
     this.initialsettings();
     this.aviso = new inneradvice();
 }