private void gridView1_CustomDrawCell(object sender, RowCellCustomDrawEventArgs e) { if (showDifferent == false) { return; } e.Appearance.ForeColor = Color.Black; e.Appearance.BackColor = Color.Transparent; ManagementTraineePayRiseStandardInput row = bandedGridView1.GetRow(e.RowHandle) as ManagementTraineePayRiseStandardInput; if (row != null) { foreach (ModifyField field in row.内容不同的字段) { if (field.称 == e.Column.FieldName) { e.Appearance.ForeColor = Color.Yellow; e.Appearance.BackColor = Color.Red; } } } }
protected void LoadData(bool compare) { CreateWaitDialog("正在查询...", "请稍等"); rist_items = ManagementTraineePayRiseStandardInput.GetEditingRows(division, grade, type, isCheck); //如果没有记录,自动创建 if (rist_items.Count == 0) { rist_items = CreateEditingRows(); } //如果比较 if (compare) { rist_items_opposite = ManagementTraineePayRiseStandardInput.GetEditingRows(division, grade, type, !isCheck); } SetWaitDialogCaption("正在加载..."); gridControl1.DataSource = rist_items; gridControl1.RefreshDataSource(); CloseWaitDialog(); showDifferent = compare; }
private ManagementTraineePayRiseStandardInput AddManagementTraineePayRiseStandardInput(int order, string type) { ManagementTraineePayRiseStandardInput item = ManagementTraineePayRiseStandardInput.AddManagementTraineePayRiseStandardInput(order, division, grade, type, (int)rise_type_final, isCheck); return(item); }