private void btnAddOrder_Click(object sender, EventArgs e) { if (lblCodigoCliente.Text.Trim() != string.Empty && lblNombreCliente.Text.Trim() != string.Empty) { var frmCustomerOrderForm = new frmCustomerOrder(); if (rbDelivery.Checked) { frmCustomerOrderForm.tipoVenta = AppConstant.TipoVenta.Delivery; } else { frmCustomerOrderForm.tipoVenta = "RECOGER"; } frmCustomerOrderForm.clienteID = lblCodigoCliente.Text.Trim(); frmCustomerOrderForm.ShowDialog(); GetOrders(); IsReadyPaid(); txtNumeroCliente.Text = string.Empty; lblCodigoCliente.Text = string.Empty; lblNombreCliente.Text = string.Empty; txtDireccion.Text = string.Empty; } else { txtNumeroCliente.Focus(); MessageBox.Show(@"Debe ingresar el Cliente y el cliente debe tener telfono fijo.", @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button66_Click(object sender, EventArgs e) { if (sender is Button) { Button btn = sender as Button; frmCustomerOrder frmCustomerOrderForm = new frmCustomerOrder(); frmCustomerOrderForm.mesaID = DataUtil.GetString(btn.Tag); frmCustomerOrderForm.tipoMesa = "Bar :"; frmCustomerOrderForm.tipoVenta = AppConstant.TipoVenta.Salon; frmCustomerOrderForm.ShowDialog(); LoadButtons(); IsReadyPaid(); } }
private void dgwCuenta_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } if (dgwCuenta.CurrentRow != null && ((dgwCuenta.Rows.Count > 0) && (dgwCuenta.CurrentRow.Cells[1].Value != null))) { var frmCustomerOrderForm = new frmCustomerOrder(); frmCustomerOrderForm.pedidoID = DataUtil.GetInt(dgwCuenta.CurrentRow.Cells[0].Value); frmCustomerOrderForm.ShowDialog(); if (!IsReadyPaid()) { GetOrders(); } } }
private void dgwResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } if ((dgwResult.Rows.Count > 0) && (dgwResult.CurrentRow.Cells[1].Value != null)) { if (pedidoOrigen != string.Empty) { var frmCustomerOrderViewForm = new frmCustomerOrderView(); frmCustomerOrderViewForm.pedidoID = DataUtil.GetInt(dgwResult.CurrentRow.Cells[0].Value); frmCustomerOrderViewForm.pedidoOrigenView = pedidoOrigen; frmCustomerOrderViewForm.ShowDialog(); } else { if (pedidoEstado.Equals(AppConstant.PedidoEstado.Atendiendo)) { var frmCustomerOrderForm = new frmCustomerOrder(); frmCustomerOrderForm.pedidoID = DataUtil.GetInt(dgwResult.CurrentRow.Cells[0].Value); frmCustomerOrderForm.ShowDialog(); if (!IsReadyPaid()) { GetOrders(); } } else { var frmCustomerOrderViewForm = new frmCustomerOrderView(); frmCustomerOrderViewForm.pedidoID = DataUtil.GetInt(dgwResult.CurrentRow.Cells[0].Value); frmCustomerOrderViewForm.ShowDialog(); } } } }