Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcamuusagesingle(ref DataRow row, Icamuusagesingle entity)
 {
     row.SetField("secure", entity.secure);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("frozentype", entity.frozentype);
     row.SetField("frozenmmyy", entity.frozenmmyy);
     row.SetField("frozenmos", entity.frozenmos);
     row.SetField("so15fl", entity.so15fl);
     row.SetField("nodaysso", entity.nodaysso);
     row.SetField("notimesso", entity.notimesso);
     row.SetField("availsodt", entity.availsodt);
     row.SetField("lastsodt", entity.lastsodt);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("acquiredt", entity.acquiredt);
     row.SetField("superfl", entity.superfl);
     row.SetField("icacquiredtfl", entity.icacquiredtfl);
     row.SetField("fiAcquireDt-sensitive", entity.fiAcquireDtSensitive);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Icamuusagesingle BuildIcamuusagesingleFromRow(DataRow row)
        {
            Icamuusagesingle entity = new Icamuusagesingle();

            entity.secure               = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.prod                 = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse                 = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.frozentype           = row.IsNull("frozentype") ? string.Empty : row.Field <string>("frozentype");
            entity.frozenmmyy           = row.IsNull("frozenmmyy") ? string.Empty : row.Field <string>("frozenmmyy");
            entity.frozenmos            = row.IsNull("frozenmos") ? 0 : row.Field <int>("frozenmos");
            entity.so15fl               = row.Field <bool>("so15fl");
            entity.nodaysso             = row.IsNull("nodaysso") ? 0 : row.Field <int>("nodaysso");
            entity.notimesso            = row.IsNull("notimesso") ? 0 : row.Field <int>("notimesso");
            entity.availsodt            = row.Field <DateTime?>("availsodt");
            entity.lastsodt             = row.Field <DateTime?>("lastsodt");
            entity.enterdt              = row.Field <DateTime?>("enterdt");
            entity.acquiredt            = row.Field <DateTime?>("acquiredt");
            entity.superfl              = row.Field <bool>("superfl");
            entity.icacquiredtfl        = row.Field <bool>("icacquiredtfl");
            entity.fiAcquireDtSensitive = row.Field <bool>("fiAcquireDt-sensitive");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }