private void dgwResult_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } if ((dgwResult.Rows.Count > 0) && (dgwResult.CurrentRow.Cells[1].Value != null)) { var frmCustomerOrderViewForm = new frmCustomerOrderView(); frmCustomerOrderViewForm.pedidoID = DataUtil.GetInt(dgwResult.CurrentRow.Cells[1].Value); frmCustomerOrderViewForm.ventaIdParam = DataUtil.GetInt(dgwResult.CurrentRow.Cells[0].Value); frmCustomerOrderViewForm.ShowDialog(); } }
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(); } } } }