/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeesdetailhdrsingle(ref DataRow row, Oeesdetailhdrsingle entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("jrnlno", entity.jrnlno); row.SetField("currsymbol", entity.currsymbol); row.SetField("pmshipfl", entity.pmshipfl); row.SetField("pmcodfl", entity.pmcodfl); row.SetField("icdatclabel", entity.icdatclabel); row.SetField("totdatccost", entity.totdatccost); row.SetField("shiptofl", entity.shiptofl); row.SetField("taxinterfacety", entity.taxinterfacety); row.SetField("taxmethodty", entity.taxmethodty); row.SetField("countrycd", entity.countrycd); row.SetField("modvtfl", entity.modvtfl); row.SetField("holdoverfl", entity.holdoverfl); row.SetField("holdcodefl", entity.holdcodefl); row.SetField("freeformaddrfl", entity.freeformaddrfl); row.SetField("shipvia", entity.shipvia); row.SetField("shipviadesc", entity.shipviadesc); row.SetField("orderdisp", entity.orderdisp); row.SetField("shiptoname", entity.shiptoname); row.SetField("shiptoaddress1", entity.shiptoaddress1); row.SetField("shiptoaddress2", entity.shiptoaddress2); row.SetField("shiptoaddress3", entity.shiptoaddress3); row.SetField("shiptocity", entity.shiptocity); row.SetField("shiptostate", entity.shiptostate); row.SetField("shiptozip", entity.shiptozip); row.SetField("packageid", entity.packageid); row.SetField("nopackages", entity.nopackages); row.SetField("geocode", entity.geocode); row.SetField("forcegeo", entity.forcegeo); row.SetField("outofcityfl", entity.outofcityfl); row.SetField("approvetype", entity.approvetype); row.SetField("approveintltype", entity.approveintltype); row.SetField("stagearea", entity.stagearea); row.SetField("shipdate", entity.shipdate); row.SetField("route", entity.route); row.SetField("instructions", entity.instructions); row.SetField("extshipinstr", entity.extshipinstr); row.SetField("pickinit", entity.pickinit); row.SetField("inboundfreight", entity.inboundfreight); row.SetField("outboundfreight", entity.outboundfreight); row.SetField("pmflag", entity.pmflag); row.SetField("datc", entity.datc); row.SetField("origdatc", entity.origdatc); row.SetField("totalinvamount", entity.totalinvamount); row.SetField("totalqtyordered", entity.totalqtyordered); row.SetField("totalqtyshipped", entity.totalqtyshipped); row.SetField("totalweight", entity.totalweight); row.SetField("totalcubes", entity.totalcubes); row.SetField("numberoflines", entity.numberoflines); row.SetField("specdiscamt", entity.specdiscamt); row.SetField("wodiscamt", entity.wodiscamt); row.SetField("statecd", entity.statecd); row.SetField("resetstagefl", entity.resetstagefl); row.SetField("billtoname", entity.billtoname); row.SetField("billtoaddress1", entity.billtoaddress1); row.SetField("billtoaddress2", entity.billtoaddress2); row.SetField("billtoaddress3", entity.billtoaddress3); row.SetField("billtocity", entity.billtocity); row.SetField("billtostate", entity.billtostate); row.SetField("billtozip", entity.billtozip); row.SetField("note", entity.note); row.SetField("totlineamt", entity.totlineamt); row.SetField("origapprovty", entity.origapprovty); row.SetField("totalship", entity.totalship); row.SetField("servicekey", entity.servicekey); row.SetField("userfield", entity.userfield); }
public static Oeesdetailhdrsingle BuildOeesdetailhdrsingleFromRow(DataRow row) { Oeesdetailhdrsingle entity = new Oeesdetailhdrsingle(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.currsymbol = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol"); entity.pmshipfl = row.Field <bool>("pmshipfl"); entity.pmcodfl = row.Field <bool>("pmcodfl"); entity.icdatclabel = row.IsNull("icdatclabel") ? string.Empty : row.Field <string>("icdatclabel"); entity.totdatccost = row.IsNull("totdatccost") ? decimal.Zero : row.Field <decimal>("totdatccost"); entity.shiptofl = row.Field <bool>("shiptofl"); entity.taxinterfacety = row.IsNull("taxinterfacety") ? string.Empty : row.Field <string>("taxinterfacety"); entity.taxmethodty = row.IsNull("taxmethodty") ? string.Empty : row.Field <string>("taxmethodty"); entity.countrycd = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd"); entity.modvtfl = row.Field <bool>("modvtfl"); entity.holdoverfl = row.Field <bool>("holdoverfl"); entity.holdcodefl = row.Field <bool>("holdcodefl"); entity.freeformaddrfl = row.Field <bool>("freeformaddrfl"); entity.shipvia = row.IsNull("shipvia") ? string.Empty : row.Field <string>("shipvia"); entity.shipviadesc = row.IsNull("shipviadesc") ? string.Empty : row.Field <string>("shipviadesc"); entity.orderdisp = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp"); entity.shiptoname = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname"); entity.shiptoaddress1 = row.IsNull("shiptoaddress1") ? string.Empty : row.Field <string>("shiptoaddress1"); entity.shiptoaddress2 = row.IsNull("shiptoaddress2") ? string.Empty : row.Field <string>("shiptoaddress2"); entity.shiptoaddress3 = row.IsNull("shiptoaddress3") ? string.Empty : row.Field <string>("shiptoaddress3"); 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.packageid = row.IsNull("packageid") ? string.Empty : row.Field <string>("packageid"); entity.nopackages = row.IsNull("nopackages") ? 0 : row.Field <int>("nopackages"); entity.geocode = row.IsNull("geocode") ? string.Empty : row.Field <string>("geocode"); entity.forcegeo = row.Field <bool>("forcegeo"); entity.outofcityfl = row.Field <bool>("outofcityfl"); entity.approvetype = row.IsNull("approvetype") ? string.Empty : row.Field <string>("approvetype"); entity.approveintltype = row.IsNull("approveintltype") ? string.Empty : row.Field <string>("approveintltype"); entity.stagearea = row.IsNull("stagearea") ? string.Empty : row.Field <string>("stagearea"); entity.shipdate = row.Field <DateTime?>("shipdate"); entity.route = row.IsNull("route") ? string.Empty : row.Field <string>("route"); entity.instructions = row.IsNull("instructions") ? string.Empty : row.Field <string>("instructions"); entity.extshipinstr = row.IsNull("extshipinstr") ? string.Empty : row.Field <string>("extshipinstr"); entity.pickinit = row.IsNull("pickinit") ? string.Empty : row.Field <string>("pickinit"); entity.inboundfreight = row.Field <bool>("inboundfreight"); entity.outboundfreight = row.Field <bool>("outboundfreight"); entity.pmflag = row.Field <bool>("pmflag"); entity.datc = row.IsNull("datc") ? decimal.Zero : row.Field <decimal>("datc"); entity.origdatc = row.IsNull("origdatc") ? decimal.Zero : row.Field <decimal>("origdatc"); entity.totalinvamount = row.IsNull("totalinvamount") ? decimal.Zero : row.Field <decimal>("totalinvamount"); entity.totalqtyordered = row.IsNull("totalqtyordered") ? decimal.Zero : row.Field <decimal>("totalqtyordered"); entity.totalqtyshipped = row.IsNull("totalqtyshipped") ? decimal.Zero : row.Field <decimal>("totalqtyshipped"); entity.totalweight = row.IsNull("totalweight") ? decimal.Zero : row.Field <decimal>("totalweight"); entity.totalcubes = row.IsNull("totalcubes") ? decimal.Zero : row.Field <decimal>("totalcubes"); entity.numberoflines = row.IsNull("numberoflines") ? 0 : row.Field <int>("numberoflines"); entity.specdiscamt = row.IsNull("specdiscamt") ? decimal.Zero : row.Field <decimal>("specdiscamt"); entity.wodiscamt = row.IsNull("wodiscamt") ? decimal.Zero : row.Field <decimal>("wodiscamt"); entity.statecd = row.IsNull("statecd") ? string.Empty : row.Field <string>("statecd"); entity.resetstagefl = row.Field <bool>("resetstagefl"); entity.billtoname = row.IsNull("billtoname") ? string.Empty : row.Field <string>("billtoname"); entity.billtoaddress1 = row.IsNull("billtoaddress1") ? string.Empty : row.Field <string>("billtoaddress1"); entity.billtoaddress2 = row.IsNull("billtoaddress2") ? string.Empty : row.Field <string>("billtoaddress2"); entity.billtoaddress3 = row.IsNull("billtoaddress3") ? string.Empty : row.Field <string>("billtoaddress3"); 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.note = row.IsNull("note") ? string.Empty : row.Field <string>("note"); entity.totlineamt = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt"); entity.origapprovty = row.IsNull("origapprovty") ? string.Empty : row.Field <string>("origapprovty"); entity.totalship = row.IsNull("totalship") ? decimal.Zero : row.Field <decimal>("totalship"); entity.servicekey = row.IsNull("servicekey") ? string.Empty : row.Field <string>("servicekey"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }