Exemple #1
0
 public static AcceptItemRecord SetValue(AcceptItemRecord air, DataRow dr)
 {
     if (dr != null)
     {
         air.strID        = dr["strID"].ToString();
         air.dtAcceptTime = PageBase.static_ext_date(dr["dtAcceptTime"]);
         air.nAcceptID    = PageBase.static_ext_int(dr["nAcceptID"]);
         air.nUserID      = PageBase.static_ext_int(dr["nUserID"]);
         air.JiHuaID      = PageBase.static_ext_int(dr["JiHuaID"]);
     }
     return(air);
 }
Exemple #2
0
        /// <summary>
        /// 返回list对象
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public static List <AcceptItemRecord> ListValue(DataTable dt)
        {
            List <AcceptItemRecord> AcceptItemRecordList = new List <AcceptItemRecord>();
            AcceptItemRecord        acceptitemrecord;

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    acceptitemrecord = new AcceptItemRecord();
                    AcceptItemRecordList.Add(SetValue(acceptitemrecord, dt.Rows[i]));
                }
            }
            return(AcceptItemRecordList);
        }