public static Etccdetdata855ihdr BuildEtccdetdata855ihdrFromRow(DataRow row) { Etccdetdata855ihdr entity = new Etccdetdata855ihdr(); entity.sxxmldocRowid = row.Field <byte[]>("sxxmldoc-rowid").ToStringEncoded(); entity.section = row.IsNull("section") ? string.Empty : row.Field <string>("section"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.datasource = row.IsNull("datasource") ? string.Empty : row.Field <string>("datasource"); entity.sectionD = row.IsNull("section-d") ? string.Empty : row.Field <string>("section-d"); entity.secseq = row.IsNull("secseq") ? 0 : row.Field <int>("secseq"); entity.errcnt = row.IsNull("errcnt") ? 0 : row.Field <int>("errcnt"); entity.exccnt = row.IsNull("exccnt") ? 0 : row.Field <int>("exccnt"); entity.infocnt = row.IsNull("infocnt") ? 0 : row.Field <int>("infocnt"); entity.stageword = row.IsNull("stageword") ? string.Empty : row.Field <string>("stageword"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.processedfl = row.Field <bool>("processedfl"); entity.ackdt = row.Field <DateTime?>("ackdt"); entity.ackty = row.IsNull("ackty") ? string.Empty : row.Field <string>("ackty"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.poty = row.IsNull("poty") ? string.Empty : row.Field <string>("poty"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.partnerid = row.IsNull("partnerid") ? string.Empty : row.Field <string>("partnerid"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.expshipdt = row.Field <DateTime?>("expshipdt"); entity.expduedt = row.Field <DateTime?>("expduedt"); entity.transetcd = row.IsNull("transetcd") ? string.Empty : row.Field <string>("transetcd"); entity.createdt = row.Field <DateTime?>("createdt"); entity.createtm = row.IsNull("createtm") ? string.Empty : row.Field <string>("createtm"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.docid = row.IsNull("docid") ? 0 : row.Field <int>("docid"); entity.origdata = row.IsNull("origdata") ? string.Empty : row.Field <string>("origdata"); entity.ovrddata = row.IsNull("ovrddata") ? string.Empty : row.Field <string>("ovrddata"); entity.transdata = row.IsNull("transdata") ? string.Empty : row.Field <string>("transdata"); entity.sortseq = row.IsNull("sortseq") ? 0 : row.Field <int>("sortseq"); entity.docidD = row.IsNull("docid-d") ? string.Empty : row.Field <string>("docid-d"); 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 UpdateRowFromEtccdetdata855ihdr(ref DataRow row, Etccdetdata855ihdr entity) { row.SetField("sxxmldoc-rowid", entity.sxxmldocRowid.ToByteArray()); row.SetField("section", entity.section); row.SetField("approvty", entity.approvty); row.SetField("datasource", entity.datasource); row.SetField("section-d", entity.sectionD); row.SetField("secseq", entity.secseq); row.SetField("errcnt", entity.errcnt); row.SetField("exccnt", entity.exccnt); row.SetField("infocnt", entity.infocnt); row.SetField("stageword", entity.stageword); row.SetField("stagecd", entity.stagecd); row.SetField("processedfl", entity.processedfl); row.SetField("ackdt", entity.ackdt); row.SetField("ackty", entity.ackty); row.SetField("notesfl", entity.notesfl); row.SetField("poty", entity.poty); row.SetField("vendno", entity.vendno); row.SetField("partnerid", entity.partnerid); row.SetField("whse", entity.whse); row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("enterdt", entity.enterdt); row.SetField("expshipdt", entity.expshipdt); row.SetField("expduedt", entity.expduedt); row.SetField("transetcd", entity.transetcd); row.SetField("createdt", entity.createdt); row.SetField("createtm", entity.createtm); row.SetField("transdt", entity.transdt); row.SetField("transtm", entity.transtm); row.SetField("transproc", entity.transproc); row.SetField("operinit", entity.operinit); row.SetField("docid", entity.docid); row.SetField("origdata", entity.origdata); row.SetField("ovrddata", entity.ovrddata); row.SetField("transdata", entity.transdata); row.SetField("sortseq", entity.sortseq); row.SetField("docid-d", entity.docidD); row.SetField("userfield", entity.userfield); }