/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWteidetailbanner(ref DataRow row, Wteidetailbanner entity) { row.SetField("wtno", entity.wtno); row.SetField("wtsuf", entity.wtsuf); row.SetField("jrnlno", entity.jrnlno); row.SetField("notesfl", entity.notesfl); row.SetField("fromcono", entity.fromcono); row.SetField("shipfmwhse", entity.shipfmwhse); row.SetField("tocono", entity.tocono); row.SetField("shiptowhse", entity.shiptowhse); row.SetField("shiptoname", entity.shiptoname); row.SetField("transtype", entity.transtype); row.SetField("stagecdx", entity.stagecdx); row.SetField("laststgcdx", entity.laststgcdx); row.SetField("botxt", entity.botxt); row.SetField("userfield", entity.userfield); }
public static Wteidetailbanner BuildWteidetailbannerFromRow(DataRow row) { Wteidetailbanner entity = new Wteidetailbanner(); entity.wtno = row.IsNull("wtno") ? 0 : row.Field <int>("wtno"); entity.wtsuf = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.fromcono = row.IsNull("fromcono") ? 0 : row.Field <int>("fromcono"); entity.shipfmwhse = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse"); entity.tocono = row.IsNull("tocono") ? 0 : row.Field <int>("tocono"); entity.shiptowhse = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse"); entity.shiptoname = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.laststgcdx = row.IsNull("laststgcdx") ? string.Empty : row.Field <string>("laststgcdx"); entity.botxt = row.IsNull("botxt") ? string.Empty : row.Field <string>("botxt"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }