/// <summary> /// 返回list对象 /// </summary> /// <param name="dt"></param> /// <returns></returns> public static List <lsDatFlowChartData> ListValue(DataTable dt) { List <lsDatFlowChartData> FlowChartDataList = new List <lsDatFlowChartData>(); lsDatFlowChartData FlowChart; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { FlowChart = new lsDatFlowChartData(); FlowChartDataList.Add(SetValue(FlowChart, dt.Rows[i])); } } return(FlowChartDataList); }
public static lsDatFlowChartData SetValue(lsDatFlowChartData IDFCD, DataRow dr) { if (dr != null) { IDFCD.KaiGongID = dr["KaiGongID"].ToString(); IDFCD.KaiGongName = dr["KaiGongName"].ToString(); IDFCD.WanGongID = dr["WanGongID"].ToString(); IDFCD.WanGongName = dr["WanGongName"].ToString(); IDFCD.RepairState = dr["RepairState"].ToString(); IDFCD.Remarks = dr["Remarks"].ToString(); IDFCD.ID = PageBase.static_ext_int(dr["ID"].ToString()); IDFCD.JiHuaID = PageBase.static_ext_int(dr["JiHuaID"].ToString()); IDFCD.JDID = PageBase.static_ext_int(dr["JDID"].ToString()); IDFCD.OperateGroup = PageBase.static_ext_int(dr["OperateGroup"].ToString()); IDFCD.WanGongDate = PageBase.static_ext_date(dr["WanGongDate"].ToString()); IDFCD.KaiGongDate = PageBase.static_ext_date(dr["KaiGongDate"].ToString()); } return(IDFCD); }