private void UltraGrid_OrdenGiro_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { try { cp_orden_giro_Info row = (cp_orden_giro_Info)UltraGrid_OrdenGiro.GetRow(e.RowHandle); if (row == null) { return; } if (e.Column == col_tipo_flujo) { if (MessageBox.Show("¿Está seguro que desea modificar el tipo de flujo para la F# " + row.IdCbteCble_Ogiro.ToString() + "?", param.Nombre_sistema, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { if (e.Value == null) { OrdenGiro_B.Modificar_tipo_flujo(row.IdEmpresa, row.IdTipoCbte_Ogiro, row.IdCbteCble_Ogiro, null); } else { OrdenGiro_B.Modificar_tipo_flujo(row.IdEmpresa, row.IdTipoCbte_Ogiro, row.IdCbteCble_Ogiro, Convert.ToDecimal(e.Value)); } } load_datos(); } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void UltraGrid_OrdenGiro_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { try { var data = UltraGrid_OrdenGiro.GetRow(e.RowHandle) as cp_orden_giro_Info; if (data == null) { return; } if (data.Estado == "I") { e.Appearance.ForeColor = Color.Red; return; } if (data.saldo <= 0) { e.Appearance.ForeColor = Color.Blue; return; } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }