/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlifdetailbrowserresults(ref DataRow row, Glifdetailbrowserresults entity) { row.SetField("yr", entity.yr); row.SetField("columnno", entity.columnno); row.SetField("glno", entity.glno); row.SetField("notesfl", entity.notesfl); row.SetField("glsarid", entity.glsarid.ToByteArray()); row.SetField("lookupnm", entity.lookupnm); row.SetField("ptd", entity.ptd); row.SetField("bptd", entity.bptd); row.SetField("ptdpctchg", entity.ptdpctchg); row.SetField("ptdpctbdgt", entity.ptdpctbdgt); row.SetField("ptdpctcomp", entity.ptdpctcomp); row.SetField("ytd", entity.ytd); row.SetField("bytd", entity.bytd); row.SetField("ytdpctchg", entity.ytdpctchg); row.SetField("ytdpctbdgt", entity.ytdpctbdgt); row.SetField("ytdpctcomp", entity.ytdpctcomp); row.SetField("baltype", entity.baltype); row.SetField("accttype", entity.accttype); }
public static Glifdetailbrowserresults BuildGlifdetailbrowserresultsFromRow(DataRow row) { Glifdetailbrowserresults entity = new Glifdetailbrowserresults(); entity.yr = row.IsNull("yr") ? 0 : row.Field <int>("yr"); entity.columnno = row.IsNull("columnno") ? 0 : row.Field <int>("columnno"); entity.glno = row.IsNull("glno") ? string.Empty : row.Field <string>("glno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.glsarid = row.Field <byte[]>("glsarid").ToStringEncoded(); entity.lookupnm = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm"); entity.ptd = row.IsNull("ptd") ? decimal.Zero : row.Field <decimal>("ptd"); entity.bptd = row.IsNull("bptd") ? decimal.Zero : row.Field <decimal>("bptd"); entity.ptdpctchg = row.IsNull("ptdpctchg") ? decimal.Zero : row.Field <decimal>("ptdpctchg"); entity.ptdpctbdgt = row.IsNull("ptdpctbdgt") ? decimal.Zero : row.Field <decimal>("ptdpctbdgt"); entity.ptdpctcomp = row.IsNull("ptdpctcomp") ? decimal.Zero : row.Field <decimal>("ptdpctcomp"); entity.ytd = row.IsNull("ytd") ? decimal.Zero : row.Field <decimal>("ytd"); entity.bytd = row.IsNull("bytd") ? decimal.Zero : row.Field <decimal>("bytd"); entity.ytdpctchg = row.IsNull("ytdpctchg") ? decimal.Zero : row.Field <decimal>("ytdpctchg"); entity.ytdpctbdgt = row.IsNull("ytdpctbdgt") ? decimal.Zero : row.Field <decimal>("ytdpctbdgt"); entity.ytdpctcomp = row.IsNull("ytdpctcomp") ? decimal.Zero : row.Field <decimal>("ytdpctcomp"); entity.baltype = row.Field <bool>("baltype"); entity.accttype = row.IsNull("accttype") ? string.Empty : row.Field <string>("accttype"); return(entity); }