public seeproductsinternal(centralVenta venta)
        {
            InitializeComponent();
            this.venta      = venta;
            this.isforventa = true;

            this.initialconfigs();
        }
        public Central2(string alias)
        {
            InitializeComponent();
            this.DB              = new dbop();
            this.MaximizeBox     = true;
            this.Text            = "SET SOFTWARE";
            this.Shown          += this.showINFO;
            this.FormClosing    += onClose;
            this.DoubleBuffered  = true;
            this.FormBorderStyle = FormBorderStyle.None;
            this.usr             = this.DB.usrget(alias);

            this.sesion = new login()
            {
                idusuario    = this.usr.id_usuario,
                hora_inicio  = TimeSpan.Parse(genericDefinitions.getTimeExact()),
                fecha_inicio = DateTime.Parse(genericDefinitions.getDate()),
            };

            genericDefinitions.globalsesion = this.sesion;

            this.lblnombreusuario.Text = (this.usr.nombre + " " + this.usr.apellido).ToUpper();
            this.lblhorainicio.Text    = this.sesion.hora_inicio.ToString();

            this.btnusuario.MouseHover += (sender, atgs) =>
            {
                this.panelSesion.Visible = true;
            };

            this.btnusuario.MouseLeave += (sender, atgs) =>
            {
                this.panelSesion.Visible = false;
            };

            this.product  = null;
            this.customer = null;
            this.addcat   = null;
            this.updcat   = null;
            this.delcat   = null;
            this.addpay   = null;
            this.delpay   = null;
            this.updpay   = null;
            this.seepay   = null;
            this.xventa   = null;
        }
 /*
  * private void centerBackgroundPicture(object x, EventArgs arg) CENTRAR IMAGEN TOP
  * {
  *  this.centralPictureBox.Left = (this.Width - this.centralPictureBox.Width) / 2;
  *  this.centralPictureBox.Top = (this.Height - this.centralPictureBox.Height) / 2 -50;
  * }
  *
  * private void deactivateBackg()
  * {
  *  this.centralPictureBox.Visible = false;
  * }
  */
 public void openxventa()
 {
     if (this.xventa == null)
     {
         this.xventa = new centralVenta(this, ref this.usr)
         {
             MdiParent = this
         };
         this.xventa.Show();
     }
     else if (this.xventa.WindowState == FormWindowState.Normal)
     {
         this.xventa.WindowState = FormWindowState.Minimized;
     }
     else
     {
         this.xventa.WindowState = FormWindowState.Normal;
     }
 }