Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoblanketheadersingle(ref DataRow row, Poblanketheadersingle entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("ponotesfl", entity.ponotesfl);
     row.SetField("transtype", entity.transtype);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("billtowhse", entity.billtowhse);
     row.SetField("name", entity.name);
     row.SetField("billtoaddr1", entity.billtoaddr1);
     row.SetField("billtoaddr2", entity.billtoaddr2);
     row.SetField("billtoaddr3", entity.billtoaddr3);
     row.SetField("billtocity", entity.billtocity);
     row.SetField("billtost", entity.billtost);
     row.SetField("billtozipcd", entity.billtozipcd);
     row.SetField("billtocountrycd", entity.billtocountrycd);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("shiptonm", entity.shiptonm);
     row.SetField("shiptoaddr1", entity.shiptoaddr1);
     row.SetField("shiptoaddr2", entity.shiptoaddr2);
     row.SetField("shiptoaddr3", entity.shiptoaddr3);
     row.SetField("shiptocity", entity.shiptocity);
     row.SetField("shiptost", entity.shiptost);
     row.SetField("shiptozipcd", entity.shiptozipcd);
     row.SetField("shiptocountry", entity.shiptocountry);
     row.SetField("geocd", entity.geocd);
     row.SetField("outofcityfl", entity.outofcityfl);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("shipviaty", entity.shipviaty);
     row.SetField("shipviadesc", entity.shipviadesc);
     row.SetField("shipinstr", entity.shipinstr);
     row.SetField("nolineitem", entity.nolineitem);
     row.SetField("wodisctype", entity.wodisctype);
     row.SetField("wodiscamt", entity.wodiscamt);
     row.SetField("wodiscnet", entity.wodiscnet);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("totweight", entity.totweight);
     row.SetField("totamt", entity.totamt);
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totqtyrcv", entity.totqtyrcv);
     row.SetField("totcube", entity.totcube);
     row.SetField("addonno1", entity.addonno1);
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addonnet1", entity.addonnet1);
     row.SetField("addonlabel1", entity.addonlabel1);
     row.SetField("addonno2", entity.addonno2);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addonnet2", entity.addonnet2);
     row.SetField("addonlabel2", entity.addonlabel2);
     row.SetField("addonno3", entity.addonno3);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addonnet3", entity.addonnet3);
     row.SetField("addonlabel3", entity.addonlabel3);
     row.SetField("addonno4", entity.addonno4);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("addonnet4", entity.addonnet4);
     row.SetField("addonlabel4", entity.addonlabel4);
     row.SetField("freeformaddr", entity.freeformaddr);
     row.SetField("currsymbol", entity.currsymbol);
     row.SetField("taxinterfacety", entity.taxinterfacety);
     row.SetField("modvtfl", entity.modvtfl);
     row.SetField("shiptofl", entity.shiptofl);
     row.SetField("termsoverfl", entity.termsoverfl);
     row.SetField("fiGeoCode-sensitive", entity.fiGeoCodeSensitive);
     row.SetField("tgOutOfCityFl-sensitive", entity.tgOutOfCityFlSensitive);
     row.SetField("btnLookupGeoCd-sensitive", entity.btnLookupGeoCdSensitive);
 }
Exemple #2
0
        public static Poblanketheadersingle BuildPoblanketheadersingleFromRow(DataRow row)
        {
            Poblanketheadersingle entity = new Poblanketheadersingle();

            entity.pono                    = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf                   = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.ponotesfl               = row.IsNull("ponotesfl") ? string.Empty : row.Field <string>("ponotesfl");
            entity.transtype               = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.vendno                  = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl             = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.shipfmno                = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.billtowhse              = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse");
            entity.name                    = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.billtoaddr1             = row.IsNull("billtoaddr1") ? string.Empty : row.Field <string>("billtoaddr1");
            entity.billtoaddr2             = row.IsNull("billtoaddr2") ? string.Empty : row.Field <string>("billtoaddr2");
            entity.billtoaddr3             = row.IsNull("billtoaddr3") ? string.Empty : row.Field <string>("billtoaddr3");
            entity.billtocity              = row.IsNull("billtocity") ? string.Empty : row.Field <string>("billtocity");
            entity.billtost                = row.IsNull("billtost") ? string.Empty : row.Field <string>("billtost");
            entity.billtozipcd             = row.IsNull("billtozipcd") ? string.Empty : row.Field <string>("billtozipcd");
            entity.billtocountrycd         = row.IsNull("billtocountrycd") ? string.Empty : row.Field <string>("billtocountrycd");
            entity.shiptowhse              = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.shiptonm                = row.IsNull("shiptonm") ? string.Empty : row.Field <string>("shiptonm");
            entity.shiptoaddr1             = row.IsNull("shiptoaddr1") ? string.Empty : row.Field <string>("shiptoaddr1");
            entity.shiptoaddr2             = row.IsNull("shiptoaddr2") ? string.Empty : row.Field <string>("shiptoaddr2");
            entity.shiptoaddr3             = row.IsNull("shiptoaddr3") ? string.Empty : row.Field <string>("shiptoaddr3");
            entity.shiptocity              = row.IsNull("shiptocity") ? string.Empty : row.Field <string>("shiptocity");
            entity.shiptost                = row.IsNull("shiptost") ? string.Empty : row.Field <string>("shiptost");
            entity.shiptozipcd             = row.IsNull("shiptozipcd") ? string.Empty : row.Field <string>("shiptozipcd");
            entity.shiptocountry           = row.IsNull("shiptocountry") ? string.Empty : row.Field <string>("shiptocountry");
            entity.geocd                   = row.IsNull("geocd") ? 0 : row.Field <int>("geocd");
            entity.outofcityfl             = row.Field <bool>("outofcityfl");
            entity.orderdt                 = row.Field <DateTime?>("orderdt");
            entity.shipviaty               = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty");
            entity.shipviadesc             = row.IsNull("shipviadesc") ? string.Empty : row.Field <string>("shipviadesc");
            entity.shipinstr               = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr");
            entity.nolineitem              = row.IsNull("nolineitem") ? 0 : row.Field <int>("nolineitem");
            entity.wodisctype              = row.Field <bool>("wodisctype");
            entity.wodiscamt               = row.IsNull("wodiscamt") ? decimal.Zero : row.Field <decimal>("wodiscamt");
            entity.wodiscnet               = row.IsNull("wodiscnet") ? decimal.Zero : row.Field <decimal>("wodiscnet");
            entity.totlineamt              = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.totweight               = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight");
            entity.totamt                  = row.IsNull("totamt") ? decimal.Zero : row.Field <decimal>("totamt");
            entity.totqtyord               = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totqtyrcv               = row.IsNull("totqtyrcv") ? decimal.Zero : row.Field <decimal>("totqtyrcv");
            entity.totcube                 = row.IsNull("totcube") ? decimal.Zero : row.Field <decimal>("totcube");
            entity.addonno1                = row.IsNull("addonno1") ? 0 : row.Field <int>("addonno1");
            entity.addonamt1               = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1");
            entity.addonnet1               = row.IsNull("addonnet1") ? decimal.Zero : row.Field <decimal>("addonnet1");
            entity.addonlabel1             = row.IsNull("addonlabel1") ? string.Empty : row.Field <string>("addonlabel1");
            entity.addonno2                = row.IsNull("addonno2") ? 0 : row.Field <int>("addonno2");
            entity.addonamt2               = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2");
            entity.addonnet2               = row.IsNull("addonnet2") ? decimal.Zero : row.Field <decimal>("addonnet2");
            entity.addonlabel2             = row.IsNull("addonlabel2") ? string.Empty : row.Field <string>("addonlabel2");
            entity.addonno3                = row.IsNull("addonno3") ? 0 : row.Field <int>("addonno3");
            entity.addonamt3               = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3");
            entity.addonnet3               = row.IsNull("addonnet3") ? decimal.Zero : row.Field <decimal>("addonnet3");
            entity.addonlabel3             = row.IsNull("addonlabel3") ? string.Empty : row.Field <string>("addonlabel3");
            entity.addonno4                = row.IsNull("addonno4") ? 0 : row.Field <int>("addonno4");
            entity.addonamt4               = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4");
            entity.addonnet4               = row.IsNull("addonnet4") ? decimal.Zero : row.Field <decimal>("addonnet4");
            entity.addonlabel4             = row.IsNull("addonlabel4") ? string.Empty : row.Field <string>("addonlabel4");
            entity.freeformaddr            = row.Field <bool>("freeformaddr");
            entity.currsymbol              = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol");
            entity.taxinterfacety          = row.IsNull("taxinterfacety") ? string.Empty : row.Field <string>("taxinterfacety");
            entity.modvtfl                 = row.Field <bool>("modvtfl");
            entity.shiptofl                = row.Field <bool>("shiptofl");
            entity.termsoverfl             = row.Field <bool>("termsoverfl");
            entity.fiGeoCodeSensitive      = row.Field <bool>("fiGeoCode-sensitive");
            entity.tgOutOfCityFlSensitive  = row.Field <bool>("tgOutOfCityFl-sensitive");
            entity.btnLookupGeoCdSensitive = row.Field <bool>("btnLookupGeoCd-sensitive");
            return(entity);
        }