public pruebasquerys(int x)
        {
            InitializeComponent();
            this.db    = new dbop();
            this.Move += (sender, args) =>
            {
                if (this.Top < genericDefinitions.WND_TOP)
                {
                    this.Top = genericDefinitions.WND_TOP;
                }

                if (this.Left < genericDefinitions.WND_LEFT)
                {
                    this.Left = genericDefinitions.WND_LEFT;
                }

                if (this.Right > genericDefinitions.WND_RIGHT)
                {
                    this.Left = genericDefinitions.WND_RIGHT - this.Width;
                }

                if (this.Bottom > genericDefinitions.WND_BOTTOM)
                {
                    this.Top = genericDefinitions.WND_BOTTOM - Height;
                }
            };

            this.tb1.KeyUp += (a, b) => { if (b.KeyCode == Keys.F12)
                                          {
                                              genericDefinitions.ok("ok");
                                          }
            };
        }
Beispiel #2
0
        public addPayMode()
        {
            InitializeComponent();
            this.Text = "Agregar Modo de pago";

            this.db   = new dbop();
            this.modo = new modo_pago();

            behaviorDefinitions.txtUPPER(this.txtnombre);

            this.txtnombre.KeyPress += (sender, args) =>
            {
                if (args.KeyChar == (char)Keys.Enter && this.txtnombre.Text != "")
                {
                    this.rtb.Focus();
                }
            };

            this.rtb.PreviewKeyDown += (sender, args) =>
            {
                if (this.rtb.Text.Trim() != "" && args.KeyCode == Keys.F1)
                {
                    this.onaccept();
                }
            };

            this.bcancel.Click += (x, y) => { this.oncancel(); };
            this.baccept.Click += (x, y) => { this.onaccept(); };
        }
        public consultas_inicios()
        {
            InitializeComponent();
            this.db = new dbop();

            this.setatribs();
        }
        public LogInternals(Login1 parentForm)
        {
            InitializeComponent();
            this.Text         = "Iniciar sesión";
            this.Move        += this.onMove;
            this.firstbase    = parentForm;
            this.DB           = new dbop();
            this.FormClosing += this.onClose;

            this.txtuser.KeyUp += (sender, args) =>
            {
                if (args.KeyCode == Keys.Enter && this.txtuser.Text.Trim() != "")
                {
                    this.txtpass.Focus();
                }
            };

            this.txtpass.KeyUp += (sender, args) =>
            {
                if (args.KeyCode == Keys.Enter)
                {
                    this.verify();
                }
            };

            this.MinimizeBox = true;

            this.SizeChanged += (sender, args) =>
            {
                if (this.WindowState == FormWindowState.Minimized)
                {
                    this.firstbase.WindowState = FormWindowState.Minimized;
                }
            };
        }
 private void initfunc()
 {
     this.heightinit = this.Height;
     this.Text       = "Cancelar Venta";
     this.tabla      = new DataTable();
     this.db         = new dbop();
     this.Move      += (sender, args) =>
     {
         this.Refresh();
     };
     this.dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
     behaviorDefinitions.txtOnlyNumbers(ref this.txtfirst);
     this.txtfirst.KeyPress += (x, y) =>
     {
         if (y.KeyChar == (char)Keys.Enter)
         {
             this.validate();
         }
     };
     this.btncancelarventa.GotFocus += (sender, args) =>
     {
         this.dgv.Focus();
     };
     this.ShowInTaskbar = false;
 }
        private void Central2_Load(object sender, EventArgs e)
        {
            this.info        = new central2OnLoad("Bienvenido");
            this.WindowState = FormWindowState.Maximized;

            foreach (Control ctl in this.Controls)
            {
                try
                {
                    myMDI = (MdiClient)ctl;
                    myMDI.BackgroundImage = global::MundoMusical.Properties.Resources.wf;
                }
                catch (InvalidCastException ex)
                {
                    //NOTHING
                }
            }

            this.DB = new dbop();
            this.setBounds();
            genericDefinitions.WND_BOTTOM -= (this.panel1.Height + this.menuStrip1.Height);

            if (!this.DB.insertlogin(ref this.sesion))
            {
                genericDefinitions.dangerInfo("Problema al registrar inicio de sesion");
            }
            ;
        }
Beispiel #7
0
        private void initialsettings() // CONFIGURACION INICIAL
        {
            this.db = new dbop();

            this.ofd = new OpenFileDialog()
            {
                Title            = "Seleccione Script Sql",
                Filter           = ".sql (Script .sql)|*.sql",
                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                CheckFileExists  = true,
                CheckPathExists  = true,
                RestoreDirectory = true
            };

            this.sfd = new SaveFileDialog()
            {
                Title            = "Guardar Script Sql",
                Filter           = ".sql (Script .sql)|*.sql",
                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                CheckPathExists  = true,
                RestoreDirectory = true
            };

            this.Text = "Exportar Base de Datos";

            this.cbopt.Items.Add("Exportar");
            this.cbopt.Items.Add("Importar");
            this.cbopt.SelectedItem          = "Exportar";
            this.cbopt.SelectedIndexChanged += (a, b) => { this.typeoperation(); };
        }
 public addProduct()
 {
     InitializeComponent();
     this.Text = "Agregar Producto";
     this.cbar = new cb();
     this.db   = new dbop();
     this.setAtribs();
 }
        public printcbGui()
        {
            InitializeComponent();
            this.db     = new dbop();
            this.xprint = new printCbar();


            this.myload();
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.db = new dbop();

            if (globals.logedIn)
            {
                globals.go(this.Page, "wfCentral.aspx");
            }
        }
        public consultas_inicios(consultas_central central)
        {
            InitializeComponent();
            this.db = new dbop();

            this.setatribs();

            this.FormClosed += (sender, args) => { central.Close(); };
        }
Beispiel #12
0
        public consulta_clientes(consultas_central central)
        {
            InitializeComponent();
            this.initialsets();

            this.db = new dbop();

            this.FormClosed += (a, b) => { central.Close(); };
        }
Beispiel #13
0
 public addCategory()
 {
     InitializeComponent();
     this.Text = "Agregar Categoria";
     this.setatribs();
     this.KeyPreview = true;
     this.db         = new dbop();
     this.cat        = new categoria();
 }
 public printerticketdefault(Central2 central)
 {
     InitializeComponent();
     this.db          = new dbop();
     this.FormClosed += (sender, args) =>
     {
         central.impresoras = null;
     };
     this.stopBounds();
 }
Beispiel #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            globals.current_asp_page = this;

            if (!globals.logedIn)
            {
                globals.go(this.Page, "wfLogin.aspx");
            }
            this.db = new DB.dbop();
            this.showNextFolio();
        }
        public printcbGui(Central2 central)
        {
            InitializeComponent();
            this.db     = new dbop();
            this.xprint = new printCbar();


            this.myload();

            this.FormClosed += (sender, args) => { central.etiquetas = null; };
        }
Beispiel #17
0
 public addCategory(Central2 central)
 {
     InitializeComponent();
     this.Text = "Agregar Categoria";
     this.setatribs();
     this.KeyPreview  = true;
     this.db          = new dbop();
     this.cat         = new categoria();
     this.central     = central;
     this.FormClosed += (sender, args) => { this.closed(); };
     this.stopBounds();
 }
 public addProduct(midformProduct origen)
 {
     InitializeComponent();
     this.Text   = "Agregar Producto";
     this.origen = origen;
     this.origen.addbtn.Enabled = false;
     this.FormClosed           += (x, y) => { this.origen.addbtn.Enabled = true; };
     this.cbar = new cb();
     this.db   = new dbop();
     this.setAtribs();
     this.stopBounds();
 }
Beispiel #19
0
        public securityPassword()
        {
            InitializeComponent();
            this.Text        = "Seguridad SMP";
            this.db          = new dbop();
            this.MinimizeBox = false;

            this.txtpass.KeyPress += (a, b) => { if (b.KeyChar == (char)Keys.Enter)
                                                 {
                                                     this.verify();
                                                 }
            };
        }
Beispiel #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!globals.logedIn)
            {
                globals.go(this.Page, "wfLogin.aspx");
            }
            this.db = new dbop();

            if (!IsPostBack)
            {
                this.integraFolio();
            }
        }
Beispiel #21
0
        public globalTicket(List <detallesTicket> dt, venta xventa)
        {
            this.xventa   = xventa;
            this.detalles = dt;
            this.codebar  = new cb();
            this.xform    = new Form();
            this.db       = new dbop();
            this.xcliente = this.db.getclientAsobject(this.xventa.idcliente);

            this.xtienda = this.db.getTienda();

            this.myfont = new Font("Lucida Console", 7, FontStyle.Regular);

            this.brush      = new SolidBrush(Color.Black);
            this.marginLeft = 5;
            this.vertical   = 0;
            this.widthDoc   = inchesCM * 100 * 8; // AUTOMATIZAR PARA FORMATOS
            this.heightDoc  = 0;
            this.setAttribs(dt.Count);

            this.nombretienda   = this.xtienda.nombre.ToUpper();
            this.rfc            = "RFC " + this.xtienda.rfc;
            this.direccion      = this.xtienda.calle.ToUpper() + " #" + this.xtienda.numero.ToString().ToUpper();
            this.colonia        = "COL. " + this.xtienda.colonia.ToUpper();
            this.ciudad         = (this.xtienda.ciudad + "," + this.xtienda.estado).ToUpper();
            this.telefono       = "TEL. " + this.xtienda.telefono.ToUpper();
            this.fecha          = ">>FECHA: " + this.xventa.fecha.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture) + " >>HORA: " + this.xventa.hora.ToString();
            this.numticket      = ">>TICKET #: " + this.db.getticketid(this.xventa.idventa).ToString();
            this.clientename    = ">>CLIENTE: " + this.xcliente.nombre.ToUpper();
            this.subtotalletra  = "SUBTOTAL $";
            this.subtotal       = this.xventa.subtotal.ToString("F1").Replace(",", ".");
            this.totalletra     = "TOTAL $";
            this.total          = this.xventa.total.ToString("F2").Replace(",", ".");
            this.descuentoletra = "DESCUENTO $";
            this.descuento      = this.xventa.descuentoextra.ToString("F1").Replace(",", ".");

            this.ivaletra = "IVA $";
            this.iva      = (this.xventa.subtotal / 100 * 16).ToString("F1").Replace(",", ".");

            this.precioletra = "PROXIMAMENTE";
            this.leyenda     = "¡Gracias por su compra!";

            this.cantidad   = "Cant.";
            this.producto   = "Producto";
            this.preciounit = "P.Unit";
            this.importe    = "Importe";

            this.xconvierte  = new convierte();
            this.xtotalletra = this.xconvierte.getstring(this.xventa.total).ToUpper() + "MN.";
        }
Beispiel #22
0
        public LogInternals(Login1 parentForm)
        {
            InitializeComponent();
            this.Text      = "Iniciar sesión";
            this.Move     += this.onMove;
            this.firstbase = parentForm;
            this.DB        = new dbop();
            this.msdb      = new msdbop();

            genericDefinitions.arduino = new ctg(this);

            this.arduino = genericDefinitions.arduino;

            this.FormClosing += this.onClose;

            this.txtArduino.TextChanged += (a, b) =>
            {
                if (this.panelArduino.Visible == false)
                {
                    this.panelArduino.Visible = true;
                }
            };

            this.txtuser.KeyUp += (sender, args) =>
            {
                if (args.KeyCode == Keys.Enter && this.txtuser.Text.Trim() != "")
                {
                    this.txtpass.Focus();
                }
            };

            this.txtpass.KeyUp += (sender, args) =>
            {
                if (args.KeyCode == Keys.Enter)
                {
                    this.verify();
                }
            };

            this.MinimizeBox = true;

            this.SizeChanged += (sender, args) =>
            {
                if (this.WindowState == FormWindowState.Minimized)
                {
                    this.firstbase.WindowState = FormWindowState.Minimized;
                }
            };
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!globals.logedIn)
            {
                globals.go(this.Page, "wfLogin.aspx");
            }

            this.db = new dbop();

            this.lblcount.Text = "Registros: 0";

            if (globals.rBitacoraQ != null)
            {
                this.consulta();
                globals.rBitacoraQ = null;
            }
        }
        public printTicket(venta xventa, tienda xtienda)
        {
            this.xtienda   = xtienda;
            this.xventa    = xventa;
            this.db        = new dbop();
            this.reporte   = new rptticket();
            this.translate = new convierte();
            this.codbar    = new cb();

            this.xcliente = this.db.getclientAsobject(this.xventa.idcliente);

            this.pathcbar = Path.Combine(genericDefinitions.TICKETLOGOSPATH + @"\logocbar.png");
            this.pathlogo = Path.Combine(genericDefinitions.TICKETLOGOSPATH + @"\logotienda.png");

            this.widthcbar  = (int)(widthcbar * 50 / 2.54);
            this.heightcbar = (int)(heightcbar * 50 / 2.54);
        }
        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;
        }
Beispiel #26
0
        public ventaCobro()
        {
            InitializeComponent();
            this.gb.BorderColor = Color.DarkSeaGreen;
            this.Text           = "Confirmar Venta";
            this.ShowInTaskbar  = false;
            this.MinimizeBox    = false;
            behaviorDefinitions.txtPrice(this.txtpagocon);

            this.cbmodopago.KeyPress += (sender, args) =>
            {
                if (args.KeyChar == (char)Keys.Enter)
                {
                    this.txtpagocon.Focus();
                }
            };
            this.db = new dbop();
        }
Beispiel #27
0
        public ventaCobro(centralVenta source)
        {
            InitializeComponent();
            this.gb.BorderColor = Color.DarkSeaGreen;
            this.Text           = "Confirmar Venta";
            this.ShowInTaskbar  = false;
            this.MinimizeBox    = false;
            behaviorDefinitions.txtPrice(this.txtpagocon);

            this.cbmodopago.KeyPress += (sender, args) =>
            {
                if (args.KeyChar == (char)Keys.Enter)
                {
                    this.txtpagocon.Focus();
                }
            };
            this.db             = new dbop();
            this.source         = source;
            this.txttotal.Text += this.source.ventatmp.total;
            this.total          = this.source.ventatmp.total;

            this.txtpagocon.KeyUp += (sender, args) =>
            {
                if (this.txtpagocon.Text.Trim() == "")
                {
                    this.txtcambio.Text = "$";
                }
                else
                {
                    this.txtcambio.Text = "$" + (Double.Parse(this.txtpagocon.Text, CultureInfo.InvariantCulture) - this.total).ToString("F2");
                }

                if (args.KeyData == Keys.F12)
                {
                    this.executeventa();
                }
            };

            this.cbticket.Checked = true;
        }
        public altaproducto(inventarioBase invbase)
        {
            InitializeComponent();
            this.FormClosed += (sender, args) => { invbase.Close(); };
            this.centercruds();
            this.nupd1.Maximum = 500000;
            this.nupd1.Minimum = 1;

            this.Resize += (sender, args) => {
                this.centercruds();
            };

            behaviorDefinitions.txtOnlyNumbers(ref this.txtcodigo);

            this.txtcodigo.KeyPress += (sender, args) => {
                if (args.KeyChar == (char)Keys.Enter)
                {
                    this.txtcodigoenter();
                }
            };

            this.db = new dbop();

            this.btnagregar.Click += (sender, args) => { this.agregar(); };

            this.nupd1.KeyPress += (sender, args) =>
            {
                if (args.KeyChar == (char)Keys.Enter)
                {
                    this.agregar();
                }
            };

            this.btnagregar.GotFocus += (sender, args) => { this.nupd1.Focus(); };

            this.btnreload.Visible = false;

            this.nupd1.GotFocus += (sender, args) => { this.nupd1.Select(0, 0); };
        }
Beispiel #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            globals.current_asp_page = this.Page;
            this.db = new dbop();
            if (!globals.logedIn)
            {
                globals.go(this.Page, "wfLogin.aspx");
            }

            if (globals.usuario != null)
            {
                this.llena(globals.usuario);
                globals.usuario           = null;
                this.btnEliminar.Enabled  = true;
                this.btnGuardaUsr.Enabled = true;
            }
            else
            {
                this.btnEliminar.Enabled  = false;
                this.btnGuardaUsr.Enabled = false;
            }
        }
        public BaseForm()
        {
            InitializeComponent();

            this.db = new dbop();

            this.Text            = "Mundo Musical";
            this.StartPosition   = FormStartPosition.CenterScreen;
            this.FormBorderStyle = FormBorderStyle.Fixed3D;
            this.MaximizeBox     = false;
            this.BackColor       = SystemColors.ButtonHighlight;
            this.escexitproperty();
            this.KeyPreview = true;

            this.Load += (sender, args) =>
            {
                foreach (Control x in this.Controls)
                {
                    x.TabStop = false;
                    foreach (Control y in x.Controls)
                    {
                        y.TabStop = false;

                        foreach (Control z in y.Controls)
                        {
                            z.TabStop = false;

                            foreach (Control inter in z.Controls)
                            {
                                inter.TabStop = false;
                            }
                        }
                    }
                }
            };
        }