Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeirheaderretrieveresults(ref DataRow row, Oeirheaderretrieveresults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernox", entity.ordernox);
     row.SetField("billtoname", entity.billtoname);
     row.SetField("billtoaddr1", entity.billtoaddr1);
     row.SetField("billtoaddr2", entity.billtoaddr2);
     row.SetField("billtoaddr3", entity.billtoaddr3);
     row.SetField("billtocity", entity.billtocity);
     row.SetField("billtostate", entity.billtostate);
     row.SetField("billtozip", entity.billtozip);
     row.SetField("shiptoname", entity.shiptoname);
     row.SetField("shiptoaddr1", entity.shiptoaddr1);
     row.SetField("shiptoaddr2", entity.shiptoaddr2);
     row.SetField("shiptoaddr3", entity.shiptoaddr3);
     row.SetField("shiptocity", entity.shiptocity);
     row.SetField("shiptostate", entity.shiptostate);
     row.SetField("shiptozip", entity.shiptozip);
     row.SetField("termstype", entity.termstype);
     row.SetField("shipviaty", entity.shipviaty);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("codfl", entity.codfl);
     row.SetField("CODCollAmt", entity.cODCollAmt);
     row.SetField("comment1", entity.comment1);
     row.SetField("comment2", entity.comment2);
     row.SetField("geolabel", entity.geolabel);
     row.SetField("geocode", entity.geocode);
     row.SetField("note", entity.note);
     row.SetField("addonno1", entity.addonno1);
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addonlabel1", entity.addonlabel1);
     row.SetField("addonnet1", entity.addonnet1);
     row.SetField("addonno2", entity.addonno2);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addonlabel2", entity.addonlabel2);
     row.SetField("addonnet2", entity.addonnet2);
     row.SetField("addonno3", entity.addonno3);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addonlabel3", entity.addonlabel3);
     row.SetField("addonnet3", entity.addonnet3);
     row.SetField("addonno4", entity.addonno4);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("addonlabel4", entity.addonlabel4);
     row.SetField("addonnet4", entity.addonnet4);
     row.SetField("freightinfl", entity.freightinfl);
     row.SetField("freightoutfl", entity.freightoutfl);
     row.SetField("pmfl", entity.pmfl);
     row.SetField("type", entity.type);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("whse", entity.whse);
     row.SetField("custpo", entity.custpo);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("approvty", entity.approvty);
     row.SetField("ccavailablefl", entity.ccavailablefl);
     row.SetField("totalinvamt", entity.totalinvamt);
     row.SetField("totalqtyord", entity.totalqtyord);
     row.SetField("totalqtyship", entity.totalqtyship);
     row.SetField("totdatccost", entity.totdatccost);
     row.SetField("numlines", entity.numlines);
     row.SetField("totalweight", entity.totalweight);
     row.SetField("totalcubes", entity.totalcubes);
     row.SetField("shiptofl", entity.shiptofl);
     row.SetField("termsoverfl", entity.termsoverfl);
     row.SetField("holdoverfl", entity.holdoverfl);
     row.SetField("modvtfl", entity.modvtfl);
     row.SetField("currsymbol", entity.currsymbol);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Oeirheaderretrieveresults BuildOeirheaderretrieveresultsFromRow(DataRow row)
        {
            Oeirheaderretrieveresults entity = new Oeirheaderretrieveresults();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernox      = row.IsNull("ordernox") ? string.Empty : row.Field <string>("ordernox");
            entity.billtoname    = row.IsNull("billtoname") ? string.Empty : row.Field <string>("billtoname");
            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.billtostate   = row.IsNull("billtostate") ? string.Empty : row.Field <string>("billtostate");
            entity.billtozip     = row.IsNull("billtozip") ? string.Empty : row.Field <string>("billtozip");
            entity.shiptoname    = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname");
            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.shiptostate   = row.IsNull("shiptostate") ? string.Empty : row.Field <string>("shiptostate");
            entity.shiptozip     = row.IsNull("shiptozip") ? string.Empty : row.Field <string>("shiptozip");
            entity.termstype     = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype");
            entity.shipviaty     = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty");
            entity.orderdisp     = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.codfl         = row.Field <bool>("codfl");
            entity.cODCollAmt    = row.IsNull("CODCollAmt") ? decimal.Zero : row.Field <decimal>("CODCollAmt");
            entity.comment1      = row.IsNull("comment1") ? string.Empty : row.Field <string>("comment1");
            entity.comment2      = row.IsNull("comment2") ? string.Empty : row.Field <string>("comment2");
            entity.geolabel      = row.IsNull("geolabel") ? string.Empty : row.Field <string>("geolabel");
            entity.geocode       = row.IsNull("geocode") ? string.Empty : row.Field <string>("geocode");
            entity.note          = row.IsNull("note") ? string.Empty : row.Field <string>("note");
            entity.addonno1      = row.IsNull("addonno1") ? 0 : row.Field <int>("addonno1");
            entity.addonamt1     = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1");
            entity.addonlabel1   = row.IsNull("addonlabel1") ? string.Empty : row.Field <string>("addonlabel1");
            entity.addonnet1     = row.IsNull("addonnet1") ? decimal.Zero : row.Field <decimal>("addonnet1");
            entity.addonno2      = row.IsNull("addonno2") ? 0 : row.Field <int>("addonno2");
            entity.addonamt2     = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2");
            entity.addonlabel2   = row.IsNull("addonlabel2") ? string.Empty : row.Field <string>("addonlabel2");
            entity.addonnet2     = row.IsNull("addonnet2") ? decimal.Zero : row.Field <decimal>("addonnet2");
            entity.addonno3      = row.IsNull("addonno3") ? 0 : row.Field <int>("addonno3");
            entity.addonamt3     = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3");
            entity.addonlabel3   = row.IsNull("addonlabel3") ? string.Empty : row.Field <string>("addonlabel3");
            entity.addonnet3     = row.IsNull("addonnet3") ? decimal.Zero : row.Field <decimal>("addonnet3");
            entity.addonno4      = row.IsNull("addonno4") ? 0 : row.Field <int>("addonno4");
            entity.addonamt4     = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4");
            entity.addonlabel4   = row.IsNull("addonlabel4") ? string.Empty : row.Field <string>("addonlabel4");
            entity.addonnet4     = row.IsNull("addonnet4") ? decimal.Zero : row.Field <decimal>("addonnet4");
            entity.freightinfl   = row.Field <bool>("freightinfl");
            entity.freightoutfl  = row.Field <bool>("freightoutfl");
            entity.pmfl          = row.Field <bool>("pmfl");
            entity.type          = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto        = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custpo        = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.stagecd       = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx      = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.approvty      = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.ccavailablefl = row.Field <bool>("ccavailablefl");
            entity.totalinvamt   = row.IsNull("totalinvamt") ? decimal.Zero : row.Field <decimal>("totalinvamt");
            entity.totalqtyord   = row.IsNull("totalqtyord") ? decimal.Zero : row.Field <decimal>("totalqtyord");
            entity.totalqtyship  = row.IsNull("totalqtyship") ? decimal.Zero : row.Field <decimal>("totalqtyship");
            entity.totdatccost   = row.IsNull("totdatccost") ? decimal.Zero : row.Field <decimal>("totdatccost");
            entity.numlines      = row.IsNull("numlines") ? 0 : row.Field <int>("numlines");
            entity.totalweight   = row.IsNull("totalweight") ? decimal.Zero : row.Field <decimal>("totalweight");
            entity.totalcubes    = row.IsNull("totalcubes") ? decimal.Zero : row.Field <decimal>("totalcubes");
            entity.shiptofl      = row.Field <bool>("shiptofl");
            entity.termsoverfl   = row.Field <bool>("termsoverfl");
            entity.holdoverfl    = row.Field <bool>("holdoverfl");
            entity.modvtfl       = row.Field <bool>("modvtfl");
            entity.currsymbol    = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }