Exemple #1
0
        public static Porrarlineextend BuildPorrarlineextendFromRow(DataRow row)
        {
            Porrarlineextend entity = new Porrarlineextend();

            entity.rowidPoeral          = row.Field <byte[]>("rowid-poeral").ToStringEncoded();
            entity.descrip              = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.descripenabled       = row.Field <bool>("descripenabled");
            entity.weight               = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.weightenabled        = row.Field <bool>("weightenabled");
            entity.cubes                = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.cubesenabled         = row.Field <bool>("cubesenabled");
            entity.duedt                = row.Field <DateTime?>("duedt");
            entity.reqshipdt            = row.Field <DateTime?>("reqshipdt");
            entity.lockfl               = row.Field <bool>("lockfl");
            entity.rcvunavailfl         = row.Field <bool>("rcvunavailfl");
            entity.inspectunavailty     = row.IsNull("inspectunavailty") ? string.Empty : row.Field <string>("inspectunavailty");
            entity.inspectunavailtydesc = row.IsNull("inspectunavailtydesc") ? string.Empty : row.Field <string>("inspectunavailtydesc");
            entity.qtyord               = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.stkqtyord            = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.totweight            = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight");
            entity.totcubes             = row.IsNull("totcubes") ? decimal.Zero : row.Field <decimal>("totcubes");
            entity.ignoreltfl           = row.Field <bool>("ignoreltfl");
            entity.ignoreltflenabled    = row.Field <bool>("ignoreltflenabled");
            entity.inclunavailreasqty   = row.IsNull("inclunavailreasqty") ? string.Empty : row.Field <string>("inclunavailreasqty");
            entity.regrind              = row.IsNull("regrind") ? string.Empty : row.Field <string>("regrind");
            entity.frozenmmyy           = row.IsNull("frozenmmyy") ? string.Empty : row.Field <string>("frozenmmyy");
            entity.frozenmnths          = row.IsNull("frozenmnths") ? 0 : row.Field <int>("frozenmnths");
            entity.frozentype           = row.IsNull("frozentype") ? string.Empty : row.Field <string>("frozentype");
            entity.frozentypedesc       = row.IsNull("frozentypedesc") ? string.Empty : row.Field <string>("frozentypedesc");
            entity.laststkoutdt         = row.Field <DateTime?>("laststkoutdt");
            entity.nodaysstockout       = row.IsNull("nodaysstockout") ? 0 : row.Field <int>("nodaysstockout");
            entity.notimesstockout      = row.IsNull("notimesstockout") ? 0 : row.Field <int>("notimesstockout");
            entity.stockout15fl         = row.Field <bool>("stockout15fl");
            entity.stockavaildt         = row.Field <DateTime?>("stockavaildt");
            entity.seasonbeg            = row.IsNull("seasonbeg") ? 0 : row.Field <int>("seasonbeg");
            entity.seasonend            = row.IsNull("seasonend") ? 0 : row.Field <int>("seasonend");
            entity.acquiredt            = row.Field <DateTime?>("acquiredt");
            entity.acquiredtenabled     = row.Field <bool>("acquiredtenabled");
            entity.enterdt              = row.Field <DateTime?>("enterdt");
            entity.netavail             = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.bo               = row.IsNull("bo") ? decimal.Zero : row.Field <decimal>("bo");
            entity.qtyonorder       = row.IsNull("qtyonorder") ? decimal.Zero : row.Field <decimal>("qtyonorder");
            entity.qtydemand        = row.IsNull("qtydemand") ? decimal.Zero : row.Field <decimal>("qtydemand");
            entity.ponetavail       = row.IsNull("ponetavail") ? decimal.Zero : row.Field <decimal>("ponetavail");
            entity.tiedorder        = row.IsNull("tiedorder") ? string.Empty : row.Field <string>("tiedorder");
            entity.tiedorderenabled = row.Field <bool>("tiedorderenabled");
            entity.countryoforigin  = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.countryenabled   = row.Field <bool>("countryenabled");
            entity.tariffcd         = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.tariffcdenabled  = row.Field <bool>("tariffcdenabled");
            entity.dutyrate         = row.IsNull("dutyrate") ? decimal.Zero : row.Field <decimal>("dutyrate");
            entity.upcid            = row.IsNull("upcid") ? string.Empty : row.Field <string>("upcid");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarlineextend(ref DataRow row, Porrarlineextend entity)
 {
     row.SetField("rowid-poeral", entity.rowidPoeral.ToByteArray());
     row.SetField("descrip", entity.descrip);
     row.SetField("descripenabled", entity.descripenabled);
     row.SetField("weight", entity.weight);
     row.SetField("weightenabled", entity.weightenabled);
     row.SetField("cubes", entity.cubes);
     row.SetField("cubesenabled", entity.cubesenabled);
     row.SetField("duedt", entity.duedt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("lockfl", entity.lockfl);
     row.SetField("rcvunavailfl", entity.rcvunavailfl);
     row.SetField("inspectunavailty", entity.inspectunavailty);
     row.SetField("inspectunavailtydesc", entity.inspectunavailtydesc);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("totweight", entity.totweight);
     row.SetField("totcubes", entity.totcubes);
     row.SetField("ignoreltfl", entity.ignoreltfl);
     row.SetField("ignoreltflenabled", entity.ignoreltflenabled);
     row.SetField("inclunavailreasqty", entity.inclunavailreasqty);
     row.SetField("regrind", entity.regrind);
     row.SetField("frozenmmyy", entity.frozenmmyy);
     row.SetField("frozenmnths", entity.frozenmnths);
     row.SetField("frozentype", entity.frozentype);
     row.SetField("frozentypedesc", entity.frozentypedesc);
     row.SetField("laststkoutdt", entity.laststkoutdt);
     row.SetField("nodaysstockout", entity.nodaysstockout);
     row.SetField("notimesstockout", entity.notimesstockout);
     row.SetField("stockout15fl", entity.stockout15fl);
     row.SetField("stockavaildt", entity.stockavaildt);
     row.SetField("seasonbeg", entity.seasonbeg);
     row.SetField("seasonend", entity.seasonend);
     row.SetField("acquiredt", entity.acquiredt);
     row.SetField("acquiredtenabled", entity.acquiredtenabled);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("netavail", entity.netavail);
     row.SetField("bo", entity.bo);
     row.SetField("qtyonorder", entity.qtyonorder);
     row.SetField("qtydemand", entity.qtydemand);
     row.SetField("ponetavail", entity.ponetavail);
     row.SetField("tiedorder", entity.tiedorder);
     row.SetField("tiedorderenabled", entity.tiedorderenabled);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("countryenabled", entity.countryenabled);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("tariffcdenabled", entity.tariffcdenabled);
     row.SetField("dutyrate", entity.dutyrate);
     row.SetField("upcid", entity.upcid);
     row.SetField("userfield", entity.userfield);
 }