private void btnReporte_Click(object sender, EventArgs e) { if (FormMDI.IsUsuarioAdmin()) { if (!frm_reporte.Visible) { try { this.frm_reporte.MdiParent = this; System.Threading.Thread.Sleep(250); frm_reporte.Show(); } catch (System.ObjectDisposedException) { frm_reporte = new Reportes.FormReporte(); this.frm_reporte.MdiParent = this; System.Threading.Thread.Sleep(250); frm_reporte.Show(); } } else { frm_reporte.Focus(); } } }
private void btnConfiguracion_Click(object sender, EventArgs e) { //Base.FormDataBusq bs = new Base.FormDataBusq(); //bs.Show(); if (FormMDI.IsUsuarioAdmin()) { if (!frm_configuracion.Visible) { try { this.frm_configuracion.MdiParent = this; System.Threading.Thread.Sleep(250); this.frm_configuracion.Show(); } catch (System.ObjectDisposedException) { frm_configuracion = new FormConfiguracion(); this.frm_configuracion.MdiParent = this; System.Threading.Thread.Sleep(250); this.frm_configuracion.Show(); } } else { frm_configuracion.Focus(); } } }
private void btnProducto_Click(object sender, EventArgs e) { if (FormMDI.IsUsuarioAdmin()) { if (!frm_dproductos.Visible) { try { frm_dproductos.MdiParent = this; //Thread.SpinWait(1); frm_dproductos.Show(); // Task t = Task.Factory.StartNew(() => LoadForm(frm_dproductos)); } catch (System.ObjectDisposedException) { frm_dproductos = new Producto.FormDataProductos(); frm_dproductos.MdiParent = this; frm_dproductos.Show(); } } else { frm_dproductos.Focus(); } } }
private void btnRestaurar_Click(object sender, EventArgs e) { if (FormMDI.IsUsuarioAdmin()) { //Cursor.Current = Cursors.WaitCursor; Producto.FormRestaurarSeleccion frm = new Producto.FormRestaurarSeleccion(); frm.ShowDialog(); } }
private void btnRespaldo_Click(object sender, EventArgs e) { if (FormMDI.IsUsuarioAdmin()) { Cursor.Current = Cursors.WaitCursor; // MessageBox.Show(@"backup database sistema to disk='C:\dbexportaX.ba' wITH INIT,STATs"); if (new Negocios.NBaseDatos().Create()) { MessageBox.Show("El Respaldo de la base de datos fue realizado satisfactoriamente", "Respaldo", MessageBoxButtons.OK, MessageBoxIcon.Information); Cursor.Current = Cursors.AppStarting; } else { Cursor.Current = Cursors.AppStarting; } } }