public IList <TB_DailyPlanSign> ExtractEntries(DataTable dataTable) { IList <TB_DailyPlanSign> result = new List <TB_DailyPlanSign>(); foreach (DataRow row in dataTable.Rows) { //if (Boolean.Parse(row[this.IsSign].ToString())) { TB_DailyPlanSign temp = new TB_DailyPlanSign(); temp.IsSign = (row[this.IsSign].ToString()); temp.Other = row[this.Other].ToString(); temp.Completion = row[this.Completion].ToString(); temp.CatalogID = long.Parse(row[this.CatalogID].ToString()); result.Add(temp); } } return(result); }
void vGridControl1_CustomDrawRowValueCell(object sender, DevExpress.XtraVerticalGrid.Events.CustomDrawRowValueCellEventArgs e) { TB_DailyPlanSign temp = e.CellValue as TB_DailyPlanSign; if (temp != null) { switch (temp.Completion) { case EnumDailyPlanState.Well_Done: e.Appearance.BackColor = Color.LightGreen; break; case EnumDailyPlanState.Just_Soso: e.Appearance.BackColor = Color.LightBlue; break; case EnumDailyPlanState.Go_Ahead: e.Appearance.BackColor = Color.LightPink; break; case EnumDailyPlanState.Worse: e.Appearance.BackColor = Color.Pink; break; case EnumDailyPlanState.Trouble: e.Appearance.BackColor = Color.Red; break; } e.CellText = temp.Other; } }