Ejemplo n.º 1
0
        private void btnDisp_Click(object sender, EventArgs e)
        {
            Button btnDisp = sender as Button;

            Codigo   = btnDisp.Name;
            Finaliza = false;
            frmPDVSkin frm = new frmPDVSkin("0");

            //  frm.CarregarToushMesa(Finaliza,Codigo);
            frm.txtTicket.Enabled = true;
            frm.txtTicket.Visible = true;
            carregarPanelMesasDisponivel();
            carregarPanelMesasOcupadas(0);
            frm = null;
            Contexto   con = new Contexto();
            SqlCommand cmd = null;

            try
            {
                cmd             = new SqlCommand();
                cmd.CommandText = String.Concat("UPDATE  Mesa SET status=@status Where MesaID = @id");
                cmd.Parameters.Add(new SqlParameter("@id", SqlDbType.Int)).Value     = Codigo;
                cmd.Parameters.Add(new SqlParameter("@status", SqlDbType.Int)).Value = 1;
                con.ExecutaConsulta(cmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            cmd = null;
            this.Close();
        }
Ejemplo n.º 2
0
        private void pDVToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPDVSkin frm = new frmPDVSkin("0");

            frm.TopLevel = false;
            //   pnlVendas.Controls.Clear();
            // VerificarPermissao(txtUsuario.Text);
            // pnlVendas.Controls.Add(frm);
            frm.txtUsuario.Text = global.nomeUsuario;
            // frm.txtUsuario.Visible = true;
            frm.Visible  = true;
            HabitarVenda = true;
            tabControl1.SelectedIndex = 0;
            tabControl1.Enabled       = true;
        }
Ejemplo n.º 3
0
        private void btn_Click(object sender, EventArgs e)
        {
            Button btnOcup = sender as Button;

            Codigo   = btnOcup.Name;
            Finaliza = true;
            frmPDVSkin frm = new frmPDVSkin("0");

            //frm.txtLocalizarMesa.Text = Codigo;
            carregarPanelMesasOcupadas(0);
            DataTable tab  = null;
            DataTable tab2 = null;

            tab2 = ConsultaDetalheMesaVendas(int.Parse(btnOcup.Name));
            tab  = ConsultaDetalheMesa(int.Parse(btnOcup.Name));
            dgDetalheMesa.DataSource = tab;
            dgDetalhes.DataSource    = tab2;
            this.dgDetalheMesa.Columns[2].Visible = false;
            carregarPanelMesasDisponivel();
            frm = null;
            Contexto   con = new Contexto();
            SqlCommand cmd = null;

            try
            {
                cmd             = new SqlCommand();
                cmd.CommandText = String.Concat("UPDATE  Mesa SET status=@status Where MesaID = @id");
                cmd.Parameters.Add(new SqlParameter("@id", SqlDbType.Int)).Value     = Codigo;
                cmd.Parameters.Add(new SqlParameter("@status", SqlDbType.Int)).Value = 0;
                con.ExecutaConsulta(cmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            cmd = null;
            this.Close();
        }