/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOtittrackresults3(ref DataRow row, Otittrackresults3 entity) { row.SetField("shipprod", entity.shipprod); row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("lineno", entity.lineno); row.SetField("comment", entity.comment); row.SetField("trackno", entity.trackno); row.SetField("notesfl", entity.notesfl); row.SetField("stagecd", entity.stagecd); row.SetField("tracklineno", entity.tracklineno); row.SetField("qtyord", entity.qtyord); row.SetField("vessnm", entity.vessnm); row.SetField("prodstdt", entity.prodstdt); row.SetField("prodcompdt", entity.prodcompdt); row.SetField("deptdt", entity.deptdt); row.SetField("dockarrdt", entity.dockarrdt); row.SetField("dockreddt", entity.dockreddt); row.SetField("dockdemurdt", entity.dockdemurdt); row.SetField("atwhsedt", entity.atwhsedt); row.SetField("lastfreedt", entity.lastfreedt); row.SetField("whseunldt", entity.whseunldt); row.SetField("empdt", entity.empdt); row.SetField("retdt", entity.retdt); row.SetField("povendno", entity.povendno); row.SetField("povendnotesfl", entity.povendnotesfl); row.SetField("otvendno", entity.otvendno); row.SetField("otvendnotesfl", entity.otvendnotesfl); row.SetField("userfield", entity.userfield); }
public static Otittrackresults3 BuildOtittrackresults3FromRow(DataRow row) { Otittrackresults3 entity = new Otittrackresults3(); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.comment = row.IsNull("comment") ? string.Empty : row.Field <string>("comment"); entity.trackno = row.IsNull("trackno") ? 0 : row.Field <int>("trackno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.tracklineno = row.IsNull("tracklineno") ? 0 : row.Field <int>("tracklineno"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.vessnm = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm"); entity.prodstdt = row.Field <DateTime?>("prodstdt"); entity.prodcompdt = row.Field <DateTime?>("prodcompdt"); entity.deptdt = row.Field <DateTime?>("deptdt"); entity.dockarrdt = row.Field <DateTime?>("dockarrdt"); entity.dockreddt = row.Field <DateTime?>("dockreddt"); entity.dockdemurdt = row.Field <DateTime?>("dockdemurdt"); entity.atwhsedt = row.Field <DateTime?>("atwhsedt"); entity.lastfreedt = row.Field <DateTime?>("lastfreedt"); entity.whseunldt = row.Field <DateTime?>("whseunldt"); entity.empdt = row.Field <DateTime?>("empdt"); entity.retdt = row.Field <DateTime?>("retdt"); entity.povendno = row.IsNull("povendno") ? decimal.Zero : row.Field <decimal>("povendno"); entity.povendnotesfl = row.IsNull("povendnotesfl") ? string.Empty : row.Field <string>("povendnotesfl"); entity.otvendno = row.IsNull("otvendno") ? decimal.Zero : row.Field <decimal>("otvendno"); entity.otvendnotesfl = row.IsNull("otvendnotesfl") ? string.Empty : row.Field <string>("otvendnotesfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }