Exemplo n.º 1
0
        /// <summary>
        /// 返回list对象
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public static List <lsDicFlowChart> ListValue(DataTable dt)
        {
            DataRow[]             drs           = dt.Select("1=1", "TimeQuantumCount asc");
            List <lsDicFlowChart> FlowChartList = new List <lsDicFlowChart>();
            lsDicFlowChart        dfc;

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < drs.Length; i++)
                {
                    dfc = new lsDicFlowChart();
                    FlowChartList.Add(SetValue(dfc, drs[i]));
                }
            }
            return(FlowChartList);
        }
Exemplo n.º 2
0
 public static lsDicFlowChart SetValue(lsDicFlowChart dfc, DataRow dr)
 {
     if (dr != null)
     {
         dfc.LocoType     = dr["LocoType"].ToString();
         dfc.JDName       = dr["JDName"].ToString();
         dfc.KSTime       = dr["KSTime"].ToString();
         dfc.JSTime       = dr["JSTime"].ToString();
         dfc.RepairCycle  = dr["RepairCycle"].ToString();
         dfc.ID           = PageBase.static_ext_int(dr["ID"].ToString());
         dfc.JDNum        = PageBase.static_ext_int(dr["JDNum"].ToString());
         dfc.OperateGroup = PageBase.static_ext_int(dr["OperateGroup"].ToString());
         dfc.KSLevel      = PageBase.static_ext_int(dr["KSLevel"].ToString());
         dfc.JSLevel      = PageBase.static_ext_int(dr["JSLevel"].ToString());
         dfc.KSDay        = PageBase.static_ext_int(dr["KSDay"].ToString());
         dfc.JSDay        = PageBase.static_ext_int(dr["JSDay"].ToString());
         dfc.Status       = PageBase.static_ext_int(dr["Status"].ToString());
     }
     return(dfc);
 }