/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGetnotelistresults(ref DataRow row, Getnotelistresults entity) { row.SetField("pageno", entity.pageno); row.SetField("type", entity.type); row.SetField("firstline", entity.firstline); row.SetField("transdt", entity.transdt); row.SetField("transtm", entity.transtm); row.SetField("operinit", entity.operinit); row.SetField("flags", entity.flags); row.SetField("textreference", entity.textreference); row.SetField("filedesc", entity.filedesc); row.SetField("filereference", entity.filereference); row.SetField("urldesc", entity.urldesc); row.SetField("urlreference", entity.urlreference); row.SetField("printfl", entity.printfl); row.SetField("printfl2", entity.printfl2); row.SetField("printfl3", entity.printfl3); row.SetField("printfl4", entity.printfl4); row.SetField("printfl5", entity.printfl5); row.SetField("securefl", entity.securefl); row.SetField("requirefl", entity.requirefl); row.SetField("notes-rowid", entity.notesRowid.ToByteArray()); row.SetField("userfield", entity.userfield); row.SetField("notecategory", entity.notecategory); row.SetField("headerfl", entity.headerfl); }
public static Getnotelistresults BuildGetnotelistresultsFromRow(DataRow row) { Getnotelistresults entity = new Getnotelistresults(); entity.pageno = row.IsNull("pageno") ? 0 : row.Field <int>("pageno"); entity.type = row.IsNull("type") ? string.Empty : row.Field <string>("type"); entity.firstline = row.IsNull("firstline") ? string.Empty : row.Field <string>("firstline"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.flags = row.IsNull("flags") ? string.Empty : row.Field <string>("flags"); entity.textreference = row.IsNull("textreference") ? string.Empty : row.Field <string>("textreference"); entity.filedesc = row.IsNull("filedesc") ? string.Empty : row.Field <string>("filedesc"); entity.filereference = row.IsNull("filereference") ? string.Empty : row.Field <string>("filereference"); entity.urldesc = row.IsNull("urldesc") ? string.Empty : row.Field <string>("urldesc"); entity.urlreference = row.IsNull("urlreference") ? string.Empty : row.Field <string>("urlreference"); entity.printfl = row.Field <bool>("printfl"); entity.printfl2 = row.Field <bool>("printfl2"); entity.printfl3 = row.Field <bool>("printfl3"); entity.printfl4 = row.Field <bool>("printfl4"); entity.printfl5 = row.Field <bool>("printfl5"); entity.securefl = row.Field <bool>("securefl"); entity.requirefl = row.Field <bool>("requirefl"); entity.notesRowid = row.Field <byte[]>("notes-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); entity.notecategory = row.IsNull("notecategory") ? string.Empty : row.Field <string>("notecategory"); entity.headerfl = row.Field <bool>("headerfl"); return(entity); }