public static Vasectionlistresults BuildVasectionlistresultsFromRow(DataRow row) { Vasectionlistresults entity = new Vasectionlistresults(); entity.dseqno = row.IsNull("dseqno") ? decimal.Zero : row.Field <decimal>("dseqno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.sctntype = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.sctncode = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode"); entity.codedesc = row.IsNull("codedesc") ? string.Empty : row.Field <string>("codedesc"); entity.orderaltno = row.IsNull("orderaltno") ? string.Empty : row.Field <string>("orderaltno"); entity.orderaltty = row.IsNull("orderaltty") ? string.Empty : row.Field <string>("orderaltty"); entity.orderaltstg = row.IsNull("orderaltstg") ? string.Empty : row.Field <string>("orderaltstg"); entity.destdesc = row.IsNull("destdesc") ? string.Empty : row.Field <string>("destdesc"); entity.botext = row.IsNull("botext") ? string.Empty : row.Field <string>("botext"); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.completefl = row.Field <bool>("completefl"); entity.allowcancel = row.Field <bool>("allowcancel"); entity.allowdelete = row.Field <bool>("allowdelete"); entity.icincaddgl = row.Field <bool>("icincaddgl"); entity.rowid = row.Field <byte[]>("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 UpdateRowFromVasectionlistresults(ref DataRow row, Vasectionlistresults entity) { row.SetField("dseqno", entity.dseqno); row.SetField("notesfl", entity.notesfl); row.SetField("sctntype", entity.sctntype); row.SetField("stagecdx", entity.stagecdx); row.SetField("sctncode", entity.sctncode); row.SetField("codedesc", entity.codedesc); row.SetField("orderaltno", entity.orderaltno); row.SetField("orderaltty", entity.orderaltty); row.SetField("orderaltstg", entity.orderaltstg); row.SetField("destdesc", entity.destdesc); row.SetField("botext", entity.botext); row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("seqno", entity.seqno); row.SetField("stagecd", entity.stagecd); row.SetField("completefl", entity.completefl); row.SetField("allowcancel", entity.allowcancel); row.SetField("allowdelete", entity.allowdelete); row.SetField("icincaddgl", entity.icincaddgl); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }