예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcswlookupresults(ref DataRow row, Icswlookupresults entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("icswstatus", entity.icswstatus);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("lookupnm", entity.lookupnm);
     row.SetField("arpvendno", entity.arpvendno);
     row.SetField("prodline", entity.prodline);
     row.SetField("descrip", entity.descrip);
     row.SetField("extdesc", entity.extdesc);
     row.SetField("netavail", entity.netavail);
     row.SetField("brandcode", entity.brandcode);
     row.SetField("mfgprod", entity.mfgprod);
     row.SetField("vendprod", entity.vendprod);
     row.SetField("altprodgrp", entity.altprodgrp);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("rowid-icsw", entity.rowidIcsw.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Icswlookupresults BuildIcswlookupresultsFromRow(DataRow row)
        {
            Icswlookupresults entity = new Icswlookupresults();

            entity.cono       = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.icswstatus = row.IsNull("icswstatus") ? string.Empty : row.Field <string>("icswstatus");
            entity.notesfl    = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.lookupnm   = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm");
            entity.arpvendno  = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno");
            entity.prodline   = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.descrip    = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.extdesc    = row.IsNull("extdesc") ? string.Empty : row.Field <string>("extdesc");
            entity.netavail   = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.brandcode  = row.IsNull("brandcode") ? string.Empty : row.Field <string>("brandcode");
            entity.mfgprod    = row.IsNull("mfgprod") ? string.Empty : row.Field <string>("mfgprod");
            entity.vendprod   = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod");
            entity.altprodgrp = row.IsNull("altprodgrp") ? string.Empty : row.Field <string>("altprodgrp");
            entity.msdsfl     = row.Field <bool>("msdsfl");
            entity.rowidIcsw  = row.Field <byte[]>("rowid-icsw").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }