public static void ChangeDateTimeActionToCurrentData <T>(IEnumerable <T> item, BarStaticItem[] bar_static_items) { try { DataRow temp = ConvertEngine.ConvertObjectListToDataRow <T>(item); if (temp != null) { bar_static_items[0].Visibility = bar_static_items[1].Visibility = bar_static_items[2].Visibility = bar_static_items[3].Visibility = BarItemVisibility.Always; bar_static_items[1].Caption = string.Format(@"<b><color=RED>{0}</color></b>", temp["Creater"]); bar_static_items[3].Caption = string.Format(@"<b><color=RED>{0}</color></b>", Convert.ToDateTime(temp["CreateTime"] + "").ToString(ConfigEngine.DateTimeFormat)); if (!string.IsNullOrEmpty(temp["Editer"] + "")) { bar_static_items[4].Visibility = bar_static_items[5].Visibility = bar_static_items[6].Visibility = bar_static_items[7].Visibility = BarItemVisibility.Always; bar_static_items[5].Caption = string.Format(@"<b><color=RED>{0}</color></b>", temp["Editer"]); bar_static_items[7].Caption = string.Format(@"<b><color=RED>{0}</color></b>", Convert.ToDateTime(temp["EditTime"] + "").ToString(ConfigEngine.DateTimeFormat)); } else { bar_static_items[4].Visibility = bar_static_items[5].Visibility = bar_static_items[6].Visibility = bar_static_items[7].Visibility = BarItemVisibility.Never; } } else { foreach (BarStaticItem bar_static_item in bar_static_items) { bar_static_item.Visibility = BarItemVisibility.Never; } } } catch (Exception ex) { logger.Equals(ex); return; } }