Example #1
0
        private void btnCerrar_Click(object sender, EventArgs e)
        {
            FrmMenuPrincipal MP = new FrmMenuPrincipal();

            MP.Show();
            this.Hide();
        }
        private void label7_Click(object sender, EventArgs e)
        {
            FrmMenuPrincipal menu = new FrmMenuPrincipal();

            menu.Show();
            this.Close();
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            M.Desconectar();
            FrmMenuPrincipal MP = new FrmMenuPrincipal();

            using (SqlCommand cmd = new SqlCommand("abrir_caja", M.conexion))
            {
                string id_var = "";
                if (Program.idcaja.ToString() == "" || Program.idcaja.ToString() == null)
                {
                    id_var = "0";
                }
                else
                {
                    id_var = Program.idcaja.ToString();
                }

                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add("@id_caja", SqlDbType.Int).Value    = id_var;
                cmd.Parameters.Add("@monto", SqlDbType.Decimal).Value  = Convert.ToDecimal(txtmontoinicial.Text);
                cmd.Parameters.Add("@fecha", SqlDbType.DateTime).Value = DateTime.Today;

                M.Conectar();
                cmd.ExecuteNonQuery();
                M.Desconectar();
            }

            obtenerFiladeCaja();
            RecuperarDatosSesion();
            Program.idcaja = Program.idcaja + 1;
            MP.Show();
            this.Hide();
        }
Example #4
0
        private void button4_Click(object sender, EventArgs e)
        {
            FrmMenuPrincipal MP = new FrmMenuPrincipal();

            Program.LoginStatus = "Inventario";
            MP.Show();
            this.Hide();
        }
Example #5
0
        private void btnCancelar_Click(object sender, EventArgs e)
        {
            /*if (DevComponents.DotNetBar.MessageBoxEx.Show("¿Está Seguro que Desea Salir.?", "Sistema de Ventas.", MessageBoxButtons.YesNo,MessageBoxIcon.Error) == DialogResult.Yes)
             * {
             *  Close();
             * }*/
            FrmMenuPrincipal P = new FrmMenuPrincipal();

            P.Show();
        }
Example #6
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            FrmMenuPrincipal  menu = new FrmMenuPrincipal();
            FrmRegistroVentas V    = new FrmRegistroVentas();

            V.txtUsu.Text    = menu.lblUsuario.Text;
            V.txtidEmp.Text  = Convert.ToString(Program.IdEmpleadoLogueado);
            V.lblLogo.Text   = menu.lblLogo.Text;
            V.lblDir.Text    = menu.lblDir.Text;
            V.lblTel1.Text   = menu.lblTel1.Text;
            V.lblTel2.Text   = menu.lblTel2.Text;
            V.lblCorreo.Text = menu.lblCorreo.Text;
            V.lblrnc.Text    = menu.lblrnc.Text;
            V.Show();
            Hide();
        }
Example #7
0
 private void btnIngresar_Click(object sender, EventArgs e)
 {
     if (txtUser.Text.Trim() != "")
     {
         if (txtPassword.Text.Trim() != "")
         {
             String Mensaje = "";
             U.User     = txtUser.Text;
             U.Password = txtPassword.Text;
             Mensaje    = U.IniciarSesion();
             if (Mensaje == "Su Contraseña es Incorrecta.")
             {
                 DevComponents.DotNetBar.MessageBoxEx.Show(Mensaje, "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                 txtPassword.Clear();
                 txtPassword.Focus();
             }
             else
             if (Mensaje == "El Nombre de Usuario no Existe.")
             {
                 DevComponents.DotNetBar.MessageBoxEx.Show(Mensaje, "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                 txtUser.Clear();
                 txtPassword.Clear();
                 txtUser.Focus();
             }
             else
             {
                 DevComponents.DotNetBar.MessageBoxEx.Show(Mensaje, "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                 FrmMenuPrincipal MP = new FrmMenuPrincipal();
                 RecuperarDatosSesion();
                 MP.Show();
                 this.Hide();
             }
         }
         else
         {
             DevComponents.DotNetBar.MessageBoxEx.Show("Por Favor Ingrese su Contraseña.", "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Error);
             txtPassword.Focus();
         }
     }
     else
     {
         DevComponents.DotNetBar.MessageBoxEx.Show("Por Favor Ingrese Nombre de Usuario.", "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Error);
         txtUser.Focus();
     }
 }
Example #8
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            FrmMenuPrincipal MP = new FrmMenuPrincipal();

            if (circularProgressBar1.Value < 100)
            {
                circularProgressBar1.Value += 1;
                circularProgressBar1.Text   = circularProgressBar1.Value.ToString();
            }

            if (circularProgressBar1.Value == 100)
            {
                timer1.Stop();
                MP.Show();
                circularProgressBar1.Visible = false;
                this.Hide();
            }
        }