/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdenhlookupresults(ref DataRow row, Pdenhlookupresults entity) { row.SetField("cono", entity.cono); row.SetField("claimno", entity.claimno); row.SetField("vendno", entity.vendno); row.SetField("vendname", entity.vendname); row.SetField("clmordno", entity.clmordno); row.SetField("stagecd", entity.stagecd); row.SetField("invdt", entity.invdt); row.SetField("unpaidamt", entity.unpaidamt); row.SetField("pdenhrowid", entity.pdenhrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Pdenhlookupresults BuildPdenhlookupresultsFromRow(DataRow row) { Pdenhlookupresults entity = new Pdenhlookupresults(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.claimno = row.IsNull("claimno") ? string.Empty : row.Field <string>("claimno"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendname = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname"); entity.clmordno = row.IsNull("clmordno") ? string.Empty : row.Field <string>("clmordno"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.invdt = row.Field <DateTime?>("invdt"); entity.unpaidamt = row.IsNull("unpaidamt") ? decimal.Zero : row.Field <decimal>("unpaidamt"); entity.pdenhrowid = row.Field <byte[]>("pdenhrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }