Exemplo n.º 1
0
        public static Iceanmaintmassupdatesingle BuildIceanmaintmassupdatesingleFromRow(DataRow row)
        {
            Iceanmaintmassupdatesingle entity = new Iceanmaintmassupdatesingle();

            entity.whse                   = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod                   = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodenabled            = row.Field <bool>("prodenabled");
            entity.unitstock              = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.descrip1               = row.IsNull("descrip1") ? string.Empty : row.Field <string>("descrip1");
            entity.descrip1enabled        = row.Field <bool>("descrip1enabled");
            entity.descrip2               = row.IsNull("descrip2") ? string.Empty : row.Field <string>("descrip2");
            entity.descrip2enabled        = row.Field <bool>("descrip2enabled");
            entity.extdesc                = row.IsNull("extdesc") ? string.Empty : row.Field <string>("extdesc");
            entity.extdescenabled         = row.Field <bool>("extdescenabled");
            entity.prodcat                = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.prodcatenabled         = row.Field <bool>("prodcatenabled");
            entity.prodcatdesc            = row.IsNull("prodcatdesc") ? string.Empty : row.Field <string>("prodcatdesc");
            entity.altprodgrp             = row.IsNull("altprodgrp") ? string.Empty : row.Field <string>("altprodgrp");
            entity.altprodgrpenabled      = row.Field <bool>("altprodgrpenabled");
            entity.altprodgrpdesc         = row.IsNull("altprodgrpdesc") ? string.Empty : row.Field <string>("altprodgrpdesc");
            entity.statustype             = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.statustypeenabled      = row.Field <bool>("statustypeenabled");
            entity.vendno                 = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnoenabled          = row.Field <bool>("vendnoenabled");
            entity.vendname               = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.prodline               = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.prodlineenabled        = row.Field <bool>("prodlineenabled");
            entity.prodlinedesc           = row.IsNull("prodlinedesc") ? string.Empty : row.Field <string>("prodlinedesc");
            entity.acquiredt              = row.Field <DateTime?>("acquiredt");
            entity.acquiredtenabled       = row.Field <bool>("acquiredtenabled");
            entity.ncnr                   = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr");
            entity.ncnrenabled            = row.Field <bool>("ncnrenabled");
            entity.eccnclasscd            = row.IsNull("eccnclasscd") ? string.Empty : row.Field <string>("eccnclasscd");
            entity.eccnclasscdenabled     = row.Field <bool>("eccnclasscdenabled");
            entity.countryoforigin        = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.countryoforiginenabled = row.Field <bool>("countryoforiginenabled");
            entity.tariffcd               = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.tariffcdenabled        = row.Field <bool>("tariffcdenabled");
            entity.icenhRowid             = row.Field <byte[]>("icenh-rowid").ToStringEncoded();
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceanmaintmassupdatesingle(ref DataRow row, Iceanmaintmassupdatesingle entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("prodenabled", entity.prodenabled);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("descrip1", entity.descrip1);
     row.SetField("descrip1enabled", entity.descrip1enabled);
     row.SetField("descrip2", entity.descrip2);
     row.SetField("descrip2enabled", entity.descrip2enabled);
     row.SetField("extdesc", entity.extdesc);
     row.SetField("extdescenabled", entity.extdescenabled);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("prodcatenabled", entity.prodcatenabled);
     row.SetField("prodcatdesc", entity.prodcatdesc);
     row.SetField("altprodgrp", entity.altprodgrp);
     row.SetField("altprodgrpenabled", entity.altprodgrpenabled);
     row.SetField("altprodgrpdesc", entity.altprodgrpdesc);
     row.SetField("statustype", entity.statustype);
     row.SetField("statustypeenabled", entity.statustypeenabled);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnoenabled", entity.vendnoenabled);
     row.SetField("vendname", entity.vendname);
     row.SetField("prodline", entity.prodline);
     row.SetField("prodlineenabled", entity.prodlineenabled);
     row.SetField("prodlinedesc", entity.prodlinedesc);
     row.SetField("acquiredt", entity.acquiredt);
     row.SetField("acquiredtenabled", entity.acquiredtenabled);
     row.SetField("ncnr", entity.ncnr);
     row.SetField("ncnrenabled", entity.ncnrenabled);
     row.SetField("eccnclasscd", entity.eccnclasscd);
     row.SetField("eccnclasscdenabled", entity.eccnclasscdenabled);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("countryoforiginenabled", entity.countryoforiginenabled);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("tariffcdenabled", entity.tariffcdenabled);
     row.SetField("icenh-rowid", entity.icenhRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }