示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeioloadordtot(ref DataRow row, Oeioloadordtot entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("actfreight", entity.actfreight);
     row.SetField("addcod", entity.addcod);
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("addondesc1", entity.addondesc1);
     row.SetField("addondesc2", entity.addondesc2);
     row.SetField("addondesc3", entity.addondesc3);
     row.SetField("addondesc4", entity.addondesc4);
     row.SetField("billdt", entity.billdt);
     row.SetField("bolabelhidden", entity.bolabelhidden);
     row.SetField("canceldt", entity.canceldt);
     row.SetField("cube", entity.cube);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("floorplan", entity.floorplan);
     row.SetField("floorplanhidden", entity.floorplanhidden);
     row.SetField("inbndfrtfl", entity.inbndfrtfl);
     row.SetField("invoicedt", entity.invoicedt);
     row.SetField("jrnlno1", entity.jrnlno1);
     row.SetField("jrnlno2", entity.jrnlno2);
     row.SetField("jrnlno3", entity.jrnlno3);
     row.SetField("margin", entity.margin);
     row.SetField("marginpct", entity.marginpct);
     row.SetField("nopackages", entity.nopackages);
     row.SetField("operinit", entity.operinit);
     row.SetField("orderedcost", entity.orderedcost);
     row.SetField("outbndfrtfl", entity.outbndfrtfl);
     row.SetField("packageid", entity.packageid);
     row.SetField("paiddt", entity.paiddt);
     row.SetField("pickeddt", entity.pickeddt);
     row.SetField("pickinit", entity.pickinit);
     row.SetField("placedby", entity.placedby);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("rebatedcost", entity.rebatedcost);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("salestax", entity.salestax);
     row.SetField("salestax-bo", entity.salestaxBo);
     row.SetField("shipdt", entity.shipdt);
     row.SetField("specdiscamt", entity.specdiscamt);
     row.SetField("takenby", entity.takenby);
     row.SetField("tendered", entity.tendered);
     row.SetField("tendered-bo", entity.tenderedBo);
     row.SetField("termsdiscamt", entity.termsdiscamt);
     row.SetField("termslabel", entity.termslabel);
     row.SetField("termspct", entity.termspct);
     row.SetField("totcost", entity.totcost);
     row.SetField("totinvamt", entity.totinvamt);
     row.SetField("totinvamt-bo", entity.totinvamtBo);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("totlineord", entity.totlineord);
     row.SetField("totlineord-bo", entity.totlineordBo);
     row.SetField("transdt", entity.transdt);
     row.SetField("weight", entity.weight);
     row.SetField("wodiscamt", entity.wodiscamt);
     row.SetField("seepricefl", entity.seepricefl);
     row.SetField("seecostfl", entity.seecostfl);
     row.SetField("lblsigname", entity.lblsigname);
     row.SetField("origpromisedt", entity.origpromisedt);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Oeioloadordtot BuildOeioloadordtotFromRow(DataRow row)
        {
            Oeioloadordtot entity = new Oeioloadordtot();

            entity.orderno         = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf        = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.actfreight      = row.IsNull("actfreight") ? decimal.Zero : row.Field <decimal>("actfreight");
            entity.addcod          = row.IsNull("addcod") ? decimal.Zero : row.Field <decimal>("addcod");
            entity.addonamt1       = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1");
            entity.addonamt2       = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2");
            entity.addonamt3       = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3");
            entity.addonamt4       = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4");
            entity.addondesc1      = row.IsNull("addondesc1") ? string.Empty : row.Field <string>("addondesc1");
            entity.addondesc2      = row.IsNull("addondesc2") ? string.Empty : row.Field <string>("addondesc2");
            entity.addondesc3      = row.IsNull("addondesc3") ? string.Empty : row.Field <string>("addondesc3");
            entity.addondesc4      = row.IsNull("addondesc4") ? string.Empty : row.Field <string>("addondesc4");
            entity.billdt          = row.Field <DateTime?>("billdt");
            entity.bolabelhidden   = row.Field <bool>("bolabelhidden");
            entity.canceldt        = row.Field <DateTime?>("canceldt");
            entity.cube            = row.IsNull("cube") ? decimal.Zero : row.Field <decimal>("cube");
            entity.enterdt         = row.Field <DateTime?>("enterdt");
            entity.floorplan       = row.IsNull("floorplan") ? string.Empty : row.Field <string>("floorplan");
            entity.floorplanhidden = row.Field <bool>("floorplanhidden");
            entity.inbndfrtfl      = row.Field <bool>("inbndfrtfl");
            entity.invoicedt       = row.Field <DateTime?>("invoicedt");
            entity.jrnlno1         = row.IsNull("jrnlno1") ? 0 : row.Field <int>("jrnlno1");
            entity.jrnlno2         = row.IsNull("jrnlno2") ? 0 : row.Field <int>("jrnlno2");
            entity.jrnlno3         = row.IsNull("jrnlno3") ? 0 : row.Field <int>("jrnlno3");
            entity.margin          = row.IsNull("margin") ? decimal.Zero : row.Field <decimal>("margin");
            entity.marginpct       = row.IsNull("marginpct") ? decimal.Zero : row.Field <decimal>("marginpct");
            entity.nopackages      = row.IsNull("nopackages") ? 0 : row.Field <int>("nopackages");
            entity.operinit        = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.orderedcost     = row.IsNull("orderedcost") ? decimal.Zero : row.Field <decimal>("orderedcost");
            entity.outbndfrtfl     = row.Field <bool>("outbndfrtfl");
            entity.packageid       = row.IsNull("packageid") ? string.Empty : row.Field <string>("packageid");
            entity.paiddt          = row.Field <DateTime?>("paiddt");
            entity.pickeddt        = row.Field <DateTime?>("pickeddt");
            entity.pickinit        = row.IsNull("pickinit") ? string.Empty : row.Field <string>("pickinit");
            entity.placedby        = row.IsNull("placedby") ? string.Empty : row.Field <string>("placedby");
            entity.promisedt       = row.Field <DateTime?>("promisedt");
            entity.rebatedcost     = row.IsNull("rebatedcost") ? decimal.Zero : row.Field <decimal>("rebatedcost");
            entity.reqshipdt       = row.Field <DateTime?>("reqshipdt");
            entity.salestax        = row.IsNull("salestax") ? decimal.Zero : row.Field <decimal>("salestax");
            entity.salestaxBo      = row.IsNull("salestax-bo") ? decimal.Zero : row.Field <decimal>("salestax-bo");
            entity.shipdt          = row.Field <DateTime?>("shipdt");
            entity.specdiscamt     = row.IsNull("specdiscamt") ? decimal.Zero : row.Field <decimal>("specdiscamt");
            entity.takenby         = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby");
            entity.tendered        = row.IsNull("tendered") ? decimal.Zero : row.Field <decimal>("tendered");
            entity.tenderedBo      = row.IsNull("tendered-bo") ? decimal.Zero : row.Field <decimal>("tendered-bo");
            entity.termsdiscamt    = row.IsNull("termsdiscamt") ? decimal.Zero : row.Field <decimal>("termsdiscamt");
            entity.termslabel      = row.IsNull("termslabel") ? string.Empty : row.Field <string>("termslabel");
            entity.termspct        = row.IsNull("termspct") ? decimal.Zero : row.Field <decimal>("termspct");
            entity.totcost         = row.IsNull("totcost") ? decimal.Zero : row.Field <decimal>("totcost");
            entity.totinvamt       = row.IsNull("totinvamt") ? decimal.Zero : row.Field <decimal>("totinvamt");
            entity.totinvamtBo     = row.IsNull("totinvamt-bo") ? decimal.Zero : row.Field <decimal>("totinvamt-bo");
            entity.totlineamt      = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.totlineord      = row.IsNull("totlineord") ? decimal.Zero : row.Field <decimal>("totlineord");
            entity.totlineordBo    = row.IsNull("totlineord-bo") ? decimal.Zero : row.Field <decimal>("totlineord-bo");
            entity.transdt         = row.Field <DateTime?>("transdt");
            entity.weight          = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.wodiscamt       = row.IsNull("wodiscamt") ? decimal.Zero : row.Field <decimal>("wodiscamt");
            entity.seepricefl      = row.Field <bool>("seepricefl");
            entity.seecostfl       = row.Field <bool>("seecostfl");
            entity.lblsigname      = row.IsNull("lblsigname") ? string.Empty : row.Field <string>("lblsigname");
            entity.origpromisedt   = row.Field <DateTime?>("origpromisedt");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }