Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceantransactionsresults(ref DataRow row, Iceantransactionsresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("prodnote", entity.prodnote);
     row.SetField("whse", entity.whse);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("order", entity.order);
     row.SetField("vendno", entity.vendno);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("disptypecd", entity.disptypecd);
     row.SetField("opendt", entity.opendt);
     row.SetField("closedt", entity.closedt);
     row.SetField("module", entity.module);
     row.SetField("closety", entity.closety);
     row.SetField("activefl", entity.activefl);
     row.SetField("binloc1", entity.binloc1);
     row.SetField("binloc2", entity.binloc2);
     row.SetField("binlocenabled", entity.binlocenabled);
     row.SetField("tiedqty", entity.tiedqty);
     row.SetField("tiedval", entity.tiedval);
     row.SetField("availqty", entity.availqty);
     row.SetField("availval", entity.availval);
     row.SetField("brokentiefl", entity.brokentiefl);
     row.SetField("seqno", entity.seqno);
     row.SetField("icenh-rowid", entity.icenhRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Iceantransactionsresults BuildIceantransactionsresultsFromRow(DataRow row)
        {
            Iceantransactionsresults entity = new Iceantransactionsresults();

            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnote      = row.IsNull("prodnote") ? string.Empty : row.Field <string>("prodnote");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prodcat       = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.order         = row.IsNull("order") ? string.Empty : row.Field <string>("order");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.jrnlno        = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.disptypecd    = row.IsNull("disptypecd") ? string.Empty : row.Field <string>("disptypecd");
            entity.opendt        = row.Field <DateTime?>("opendt");
            entity.closedt       = row.Field <DateTime?>("closedt");
            entity.module        = row.IsNull("module") ? string.Empty : row.Field <string>("module");
            entity.closety       = row.IsNull("closety") ? string.Empty : row.Field <string>("closety");
            entity.activefl      = row.Field <bool>("activefl");
            entity.binloc1       = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1");
            entity.binloc2       = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2");
            entity.binlocenabled = row.Field <bool>("binlocenabled");
            entity.tiedqty       = row.IsNull("tiedqty") ? decimal.Zero : row.Field <decimal>("tiedqty");
            entity.tiedval       = row.IsNull("tiedval") ? decimal.Zero : row.Field <decimal>("tiedval");
            entity.availqty      = row.IsNull("availqty") ? decimal.Zero : row.Field <decimal>("availqty");
            entity.availval      = row.IsNull("availval") ? decimal.Zero : row.Field <decimal>("availval");
            entity.brokentiefl   = row.Field <bool>("brokentiefl");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.icenhRowid    = row.Field <byte[]>("icenh-rowid").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }