private void btnVenta_Click(object sender, EventArgs e) { Form frmVenta = new frmVenta(); frmVenta.Show(); this.Hide(); }
private void tsFacturacion_Click(object sender, EventArgs e) { frmVenta frm = frmVenta.GetInstancia(); frm.MdiParent = this; frm.Show(); }
private void ventasToolStripMenuItem1_Click(object sender, EventArgs e) { frmVenta frm = frmVenta.GetInstancia(); frm.MdiParent = this; frm.Show(); frm.IdTrabajador = Convert.ToInt32(this.idTrabajador); }
private void mnuVentas_Click(object sender, EventArgs e) { frmVenta frm = frmVenta.GetInstancia(); frm.MdiParent = this; frm.Show(); frm.Idempleado = Convert.ToInt32(IDEmpleado); }
private void btnVentas_Click(object sender, EventArgs e) { frmVenta frm = frmVenta.GetInstancia(); frm.MdiParent = this; frm.Show(); frm.Idtrabajador = Convert.ToInt32(this.Idtrabajador); }
private void ventasToolStripMenuItem1_Click_1(object sender, EventArgs e) { frmVenta frmV = frmVenta.GetInstancia(); frmV.MdiParent = this; frmV.Show(); frmV.IdEmpleado = Convert.ToInt32(this.IdEmpleado); }
private void puntoVentaToolStripMenuItem_Click(object sender, EventArgs e) { frmVenta frm = new frmVenta(); frm.MdiParent = this; frm.lblIdUsuario.Text = this.lblIdUsuario.Text; frm.nombreMesero = this.lblUsuario.Text + " " + lblApellidos.Text; frm.Show(); frm.dgvProductos.ClearSelection(); }
public void mostrarMesas(string idSalon) { if (idSalon != "") { this.lblNroMesas.Text = "0"; dtMesa = NMesa.Mostrar(Convert.ToInt32(idSalon)); nroMesa = dtMesa.Rows.Count; int y1 = 50; int x1 = 6; btnMesa = new Button[nroMesa]; for (int i = 0; i < nroMesa; i++) { if (i == 8) { y1 = 180; x1 = 3; } else if (i == 16) { y1 = 290; x1 = 3; } else if (i == 24) { y1 = 400; x1 = 3; } else if (i == 32) { y1 = 510; x1 = 3; } else if (i == 40) { y1 = 620; x1 = 3; } else if (i == 48) { y1 = 730; x1 = 3; } else if (i == 56) { y1 = 840; x1 = 3; } else if (i == 64) { y1 = 950; x1 = 3; } DataRow row = dtMesa.Rows[i]; btnMesa[i] = new Button(); btnMesa[i].Location = new Point(x1, y1); btnMesa[i].Name = string.Concat("btnMesa", i.ToString()); //String mesa = row[0].ToString(); //btnMesa[i].Name = string.Concat("btnMesa",mesa); btnMesa[i].Size = new Size(120, 90); btnMesa[i].Font = new Font("Roboto", 14f, FontStyle.Bold); btnMesa[i].TabIndex = i; btnMesa[i].Text = row[1].ToString(); btnMesa[i].Visible = true; if (dtMesa.Rows[i][3].ToString().Equals("Libre")) { btnMesa[i].BackColor = Color.DarkOliveGreen; } else if (dtMesa.Rows[i][3].ToString().Equals("Ocupada")) { btnMesa[i].BackColor = Color.Red; } else if (dtMesa.Rows[i][3].ToString().Equals("Por Salir")) { btnMesa[i].BackColor = Color.Orange; } btnMesa[i].ForeColor = Color.White; btnMesa[i].Tag = i; lblNroMesas.Text = nroMesa.ToString(); x1 += 133; gbMesas.Controls.Add(btnMesa[i]); btnMesa[i].Click += new EventHandler((sender, e) => { //this.btnMesa[2].BackColor = Color.Red; this.lblIdMesa.Text = String.Concat(row[0].ToString()); this.lblPrueba.Visible = true; this.lblPrueba.Text = String.Concat("Mesa ", row[1].ToString()); if (row[3].ToString().Equals("Ocupada") || row[3].ToString().Equals("Por Salir")) { /* * DataTable dtIdVenta; * frmVenta form = new frmVenta(); * dtIdVenta = NMesa.mostrarIdVentaMesa(Convert.ToInt32(this.lblIdMesa.Text)); * form.lblIdVenta.Text = dtIdVenta.Rows[0][0].ToString(); * form.lblIdUsuario.Text = this.lblIdUsuario.Text; * this.tActualizarEstado.Enabled = false; * form.Show();*/ this.lblBanderaEstado.Text = "1"; //frmMesero form = new frmMesero(); frmVenta form = new frmVenta(); DataTable dtMesero = NTrabajador.MostrarMesero(); DataTable dtIdVenta; dtIdVenta = NMesa.mostrarIdVentaMesa(Convert.ToInt32(lblIdMesa.Text)); form.lblBanderaEstado.Text = "1"; form.lblIdVenta.Text = dtIdVenta.Rows[0][0].ToString(); form.nroMesa = row[1].ToString(); form.idMesa = this.lblIdMesa.Text; form.idSalon = this.lblIdSalon.Text; form.nombreSalon = this.lblNombreSalon.Text; form.nombreMesero = this.lblUsuario.Text; form.lblIdUsuario.Text = this.lblIdUsuario.Text; form.lblIdMesa.Text = this.lblIdMesa.Text; form.idMesero = this.lblIdUsuario.Text; this.tEstado.Enabled = false; form.Show(); } else { this.lblBanderaEstado.Text = "0"; //frmMesero form = new frmMesero(); frmVenta form = new frmVenta(); form.lblBanderaEstado.Text = "0"; form.nroMesa = row[1].ToString(); form.idMesa = this.lblIdMesa.Text; form.lblIdMesa.Text = this.lblIdMesa.Text; form.idSalon = this.lblIdSalon.Text; form.nombreSalon = this.lblNombreSalon.Text; form.nombreMesero = this.lblUsuario.Text; form.lblIdUsuario.Text = this.lblIdUsuario.Text; form.idMesero = this.lblIdUsuario.Text; this.tEstado.Enabled = false; form.Show(); } // form.lbli = }); } } }
private void mostrarMeseros() { dtMesero = NTrabajador.MostrarMesero(); nroMesero = dtMesero.Rows.Count; int y = 40; int x = 20; btnMesero = new Button[nroMesero]; for (int i = 0; i < nroMesero; i++) { if (i == 5) { y = 40; x = 190; } else if (i == 10) { y = 40; x = 360; } else if (i == 15) { y = 40; x = 530; } else if (i == 20) { y = 40; x = 700; } else if (i == 25) { y = 40; x = 870; } else if (i == 30) { y = 40; x = 1040; } else if (i == 35) { y = 40; x = 1210; } else if (i == 40) { y = 40; x = 1380; } else if (i == 45) { y = 40; x = 1550; } else if (i == 50) { y = 40; x = 1720; } DataRow row = dtMesero.Rows[i]; btnMesero[i] = new Button(); btnMesero[i].Location = new Point(x, y); btnMesero[i].Name = string.Concat("Mesero", i.ToString()); btnMesero[i].Size = new Size(148, 80); btnMesero[i].TabIndex = i; btnMesero[i].Text = row[1].ToString(); btnMesero[i].BackColor = Color.FromArgb(240, 240, 240); btnMesero[i].Visible = true; btnMesero[i].Tag = i; btnMesero[i].Click += new EventHandler((sender, e) => { if (lblBandera.Text == "0") { if (this.lblBanderaEstado.Text == "0") { frmVenta form = new frmVenta(); form.idMesa = idMesa; form.lblIdMesa.Text = idMesa; form.nroMesa = nroMesa; form.idMesero = row[0].ToString(); form.lblIdTrabajador.Text = row[0].ToString(); form.nombreMesero = row[1].ToString(); form.idSalon = idSalon; form.nombreSalon = nombreSalon; form.lblIdUsuario.Text = row[0].ToString(); form.Show(); this.Dispose(); } else { DataTable dtIdVenta; frmVenta form = new frmVenta(); dtIdVenta = NMesa.mostrarIdVentaMesa(Convert.ToInt32(idMesa)); form.lblIdVenta.Text = dtIdVenta.Rows[0][0].ToString(); form.lblIdUsuario.Text = row[0].ToString(); form.idMesero = row[0].ToString(); form.nombreMesero = row[1].ToString(); form.Show(); this.Dispose(); } } else { if (this.lblBanderaEstado.Text == "0") { frmDelivery form = new frmDelivery(); form.idMesa = idMesa; form.lblIdMesa.Text = idMesa; form.nroMesa = "DELIVERY"; form.idMesero = row[0].ToString(); form.lblIdTrabajador.Text = row[0].ToString(); form.nombreMesero = row[1].ToString(); form.lblIdUsuario.Text = this.lblIdUsuario.Text; form.idSalon = idSalon; form.nombreSalon = "DELIVERY"; // form.lblIdUsuario.Text = this.lblIdUsuario.Text; form.Show(); this.Dispose(); } else { DataTable dtIdVenta; frmDelivery form = new frmDelivery(); dtIdVenta = NMesa.mostrarIdVentaMesa(Convert.ToInt32(idMesa)); form.lblIdVenta.Text = dtIdVenta.Rows[0][0].ToString(); form.lblIdUsuario.Text = row[0].ToString(); form.nombreMesero = row[1].ToString(); form.idMesero = row[0].ToString(); form.Show(); this.Dispose(); } } }); //this.Controls.Add(this.btnSalon[i]); y += 90; gbMeseros.Controls.Add(btnMesero[i]); } }
private void btnVenta_Click(object sender, EventArgs e) { frmVenta venta = new frmVenta(); venta.Show(); }