コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcembresults(ref DataRow row, Icembresults entity)
 {
     row.SetField("oldvalue", entity.oldvalue);
     row.SetField("newvalue", entity.newvalue);
     row.SetField("operinit", entity.operinit);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("fieldchanged", entity.fieldchanged);
     row.SetField("entertm", entity.entertm);
     row.SetField("rowid-pv_samb", entity.rowidPvSamb.ToByteArray());
     row.SetField("reason", entity.reason);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Icembresults BuildIcembresultsFromRow(DataRow row)
        {
            Icembresults entity = new Icembresults();

            entity.oldvalue     = row.IsNull("oldvalue") ? string.Empty : row.Field <string>("oldvalue");
            entity.newvalue     = row.IsNull("newvalue") ? string.Empty : row.Field <string>("newvalue");
            entity.operinit     = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.enterdt      = row.Field <DateTime?>("enterdt");
            entity.fieldchanged = row.IsNull("fieldchanged") ? string.Empty : row.Field <string>("fieldchanged");
            entity.entertm      = row.IsNull("entertm") ? string.Empty : row.Field <string>("entertm");
            entity.rowidPvSamb  = row.Field <byte[]>("rowid-pv_samb").ToStringEncoded();
            entity.reason       = row.IsNull("reason") ? string.Empty : row.Field <string>("reason");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }