public static void Decrease(DataGridView dataGridView, string ColumnName, int row) { if ((Convert.ToDouble(GridUtility.GetValue(dataGridView, row, ColumnName)) - 1) > 0) { GridUtility.UpdateARow(dataGridView, row, ColumnName, Convert.ToDouble(GridUtility.GetValue(dataGridView, row, ColumnName)) - 1); } }
public static void Increase(DataGridView dataGridView, string ColumnName, int row, decimal qty) { GridUtility.UpdateARow(dataGridView, row, ColumnName, Conversion.ToDecimal(GridUtility.GetValue(dataGridView, row, ColumnName)) + qty); }