コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSledgetheadlistresults(ref DataRow row, Sledgetheadlistresults entity)
 {
     row.SetField("sledrowid", entity.sledrowid.ToByteArray());
     row.SetField("imptype", entity.imptype);
     row.SetField("slupdtno", entity.slupdtno);
     row.SetField("whse", entity.whse);
     row.SetField("statustype", entity.statustype);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("seqno", entity.seqno);
     row.SetField("issuedt", entity.issuedt);
     row.SetField("action", entity.action);
     row.SetField("activecd", entity.activecd);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Sledgetheadlistresults BuildSledgetheadlistresultsFromRow(DataRow row)
        {
            Sledgetheadlistresults entity = new Sledgetheadlistresults();

            entity.sledrowid  = row.Field <byte[]>("sledrowid").ToStringEncoded();
            entity.imptype    = row.IsNull("imptype") ? string.Empty : row.Field <string>("imptype");
            entity.slupdtno   = row.IsNull("slupdtno") ? string.Empty : row.Field <string>("slupdtno");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.statustype = row.Field <bool>("statustype");
            entity.statuscd   = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.seqno      = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.issuedt    = row.Field <DateTime?>("issuedt");
            entity.action     = row.IsNull("action") ? string.Empty : row.Field <string>("action");
            entity.activecd   = row.IsNull("activecd") ? string.Empty : row.Field <string>("activecd");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }