public static Etccdoclistresults BuildEtccdoclistresultsFromRow(DataRow row) { Etccdoclistresults entity = new Etccdoclistresults(); entity.gUISelect = row.IsNull("GUISelect") ? string.Empty : row.Field <string>("GUISelect"); entity.attrText = row.IsNull("attrText") ? string.Empty : row.Field <string>("attrText"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.createdt = row.Field <DateTime?>("createdt"); entity.createtm = row.IsNull("createtm") ? 0 : row.Field <int>("createtm"); entity.createtmdisplay = row.IsNull("createtmdisplay") ? string.Empty : row.Field <string>("createtmdisplay"); entity.direction = row.IsNull("direction") ? string.Empty : row.Field <string>("direction"); entity.docFrom = row.IsNull("docFrom") ? string.Empty : row.Field <string>("docFrom"); entity.docId = row.IsNull("docId") ? 0 : row.Field <int>("docId"); entity.docNm = row.IsNull("docNm") ? string.Empty : row.Field <string>("docNm"); entity.docStatus = row.IsNull("docStatus") ? string.Empty : row.Field <string>("docStatus"); entity.docTo = row.IsNull("docTo") ? string.Empty : row.Field <string>("docTo"); entity.docTxnId = row.IsNull("docTxnId") ? string.Empty : row.Field <string>("docTxnId"); entity.docTxnType = row.IsNull("docTxnType") ? string.Empty : row.Field <string>("docTxnType"); entity.keytype = row.IsNull("keytype") ? string.Empty : row.Field <string>("keytype"); entity.primarykey = row.IsNull("primarykey") ? string.Empty : row.Field <string>("primarykey"); entity.replyToDocId = row.IsNull("replyToDocId") ? 0 : row.Field <int>("replyToDocId"); entity.secondarykey = row.IsNull("secondarykey") ? string.Empty : row.Field <string>("secondarykey"); entity.sourceHub = row.IsNull("sourceHub") ? string.Empty : row.Field <string>("sourceHub"); entity.batchnm = row.IsNull("batchnm") ? string.Empty : row.Field <string>("batchnm"); entity.statmessage = row.IsNull("statmessage") ? string.Empty : row.Field <string>("statmessage"); entity.statmessageformat = row.IsNull("statmessageformat") ? string.Empty : row.Field <string>("statmessageformat"); entity.uIselected = row.Field <bool>("UIselected"); entity.oEEHcustno = row.IsNull("OEEHcustno") ? decimal.Zero : row.Field <decimal>("OEEHcustno"); entity.oEEHcustnotesfl = row.IsNull("OEEHcustnotesfl") ? string.Empty : row.Field <string>("OEEHcustnotesfl"); entity.oEEHshipto = row.IsNull("OEEHshipto") ? string.Empty : row.Field <string>("OEEHshipto"); entity.oEEHshiptonotesfl = row.IsNull("OEEHshiptonotesfl") ? string.Empty : row.Field <string>("OEEHshiptonotesfl"); entity.oEEHcustpo = row.IsNull("OEEHcustpo") ? string.Empty : row.Field <string>("OEEHcustpo"); entity.oEEHcustname = row.IsNull("OEEHcustname") ? string.Empty : row.Field <string>("OEEHcustname"); entity.oEEHwhse = row.IsNull("OEEHwhse") ? string.Empty : row.Field <string>("OEEHwhse"); entity.oEEHapprovty = row.IsNull("OEEHapprovty") ? string.Empty : row.Field <string>("OEEHapprovty"); entity.oEEHstage = row.IsNull("OEEHstage") ? string.Empty : row.Field <string>("OEEHstage"); entity.oEEHshiptorec = row.Field <bool>("OEEHshiptorec"); entity.oEEHordernosuf = row.IsNull("OEEHordernosuf") ? string.Empty : row.Field <string>("OEEHordernosuf"); entity.oEEHordnotesfl = row.IsNull("OEEHordnotesfl") ? string.Empty : row.Field <string>("OEEHordnotesfl"); entity.oEEHtotordamt = row.IsNull("OEEHtotordamt") ? decimal.Zero : row.Field <decimal>("OEEHtotordamt"); entity.oEEHslsrepin = row.IsNull("OEEHslsrepin") ? string.Empty : row.Field <string>("OEEHslsrepin"); entity.oEEHslsrepout = row.IsNull("OEEHslsrepout") ? string.Empty : row.Field <string>("OEEHslsrepout"); entity.ackrsn = row.IsNull("ackrsn") ? string.Empty : row.Field <string>("ackrsn"); entity.eDIHerrstatusty = row.IsNull("EDIHerrstatusty") ? string.Empty : row.Field <string>("EDIHerrstatusty"); entity.eDIHupdstat = row.IsNull("EDIHupdstat") ? string.Empty : row.Field <string>("EDIHupdstat"); entity.eDIHerrcnt = row.IsNull("EDIHerrcnt") ? 0 : row.Field <int>("EDIHerrcnt"); entity.eDIHexccnt = row.IsNull("EDIHexccnt") ? 0 : row.Field <int>("EDIHexccnt"); entity.eDILerrcnt = row.IsNull("EDILerrcnt") ? 0 : row.Field <int>("EDILerrcnt"); entity.eDILexccnt = row.IsNull("EDILexccnt") ? 0 : row.Field <int>("EDILexccnt"); entity.oEEHshiptoaddr1 = row.IsNull("OEEHshiptoaddr1") ? string.Empty : row.Field <string>("OEEHshiptoaddr1"); entity.oEEHDueDt = row.Field <DateTime?>("OEEHDueDt"); entity.oEEHarpvendno = row.IsNull("OEEHarpvendno") ? decimal.Zero : row.Field <decimal>("OEEHarpvendno"); entity.correctable = row.Field <bool>("correctable"); entity.sxxmldocRowid = row.Field <byte[]>("sxxmldoc-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromEtccdoclistresults(ref DataRow row, Etccdoclistresults entity) { row.SetField("GUISelect", entity.gUISelect); row.SetField("attrText", entity.attrText); row.SetField("cono", entity.cono); row.SetField("createdt", entity.createdt); row.SetField("createtm", entity.createtm); row.SetField("createtmdisplay", entity.createtmdisplay); row.SetField("direction", entity.direction); row.SetField("docFrom", entity.docFrom); row.SetField("docId", entity.docId); row.SetField("docNm", entity.docNm); row.SetField("docStatus", entity.docStatus); row.SetField("docTo", entity.docTo); row.SetField("docTxnId", entity.docTxnId); row.SetField("docTxnType", entity.docTxnType); row.SetField("keytype", entity.keytype); row.SetField("primarykey", entity.primarykey); row.SetField("replyToDocId", entity.replyToDocId); row.SetField("secondarykey", entity.secondarykey); row.SetField("sourceHub", entity.sourceHub); row.SetField("batchnm", entity.batchnm); row.SetField("statmessage", entity.statmessage); row.SetField("statmessageformat", entity.statmessageformat); row.SetField("UIselected", entity.uIselected); row.SetField("OEEHcustno", entity.oEEHcustno); row.SetField("OEEHcustnotesfl", entity.oEEHcustnotesfl); row.SetField("OEEHshipto", entity.oEEHshipto); row.SetField("OEEHshiptonotesfl", entity.oEEHshiptonotesfl); row.SetField("OEEHcustpo", entity.oEEHcustpo); row.SetField("OEEHcustname", entity.oEEHcustname); row.SetField("OEEHwhse", entity.oEEHwhse); row.SetField("OEEHapprovty", entity.oEEHapprovty); row.SetField("OEEHstage", entity.oEEHstage); row.SetField("OEEHshiptorec", entity.oEEHshiptorec); row.SetField("OEEHordernosuf", entity.oEEHordernosuf); row.SetField("OEEHordnotesfl", entity.oEEHordnotesfl); row.SetField("OEEHtotordamt", entity.oEEHtotordamt); row.SetField("OEEHslsrepin", entity.oEEHslsrepin); row.SetField("OEEHslsrepout", entity.oEEHslsrepout); row.SetField("ackrsn", entity.ackrsn); row.SetField("EDIHerrstatusty", entity.eDIHerrstatusty); row.SetField("EDIHupdstat", entity.eDIHupdstat); row.SetField("EDIHerrcnt", entity.eDIHerrcnt); row.SetField("EDIHexccnt", entity.eDIHexccnt); row.SetField("EDILerrcnt", entity.eDILerrcnt); row.SetField("EDILexccnt", entity.eDILexccnt); row.SetField("OEEHshiptoaddr1", entity.oEEHshiptoaddr1); row.SetField("OEEHDueDt", entity.oEEHDueDt); row.SetField("OEEHarpvendno", entity.oEEHarpvendno); row.SetField("correctable", entity.correctable); row.SetField("sxxmldoc-rowid", entity.sxxmldocRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }