/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdinsearchcriteria(ref DataRow row, Pdinsearchcriteria entity) { row.SetField("orderno", entity.orderno); row.SetField("vendno", entity.vendno); row.SetField("claimno", entity.claimno); row.SetField("invfrdt", entity.invfrdt); row.SetField("invtodt", entity.invtodt); row.SetField("origordno", entity.origordno); row.SetField("paidfrdt", entity.paidfrdt); row.SetField("paidtodt", entity.paidtodt); row.SetField("origordpo", entity.origordpo); row.SetField("statusty", entity.statusty); row.SetField("tolexpfl", entity.tolexpfl); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Pdinsearchcriteria BuildPdinsearchcriteriaFromRow(DataRow row) { Pdinsearchcriteria entity = new Pdinsearchcriteria(); entity.orderno = row.IsNull("orderno") ? string.Empty : row.Field <string>("orderno"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.claimno = row.IsNull("claimno") ? string.Empty : row.Field <string>("claimno"); entity.invfrdt = row.Field <DateTime?>("invfrdt"); entity.invtodt = row.Field <DateTime?>("invtodt"); entity.origordno = row.IsNull("origordno") ? string.Empty : row.Field <string>("origordno"); entity.paidfrdt = row.Field <DateTime?>("paidfrdt"); entity.paidtodt = row.Field <DateTime?>("paidtodt"); entity.origordpo = row.IsNull("origordpo") ? string.Empty : row.Field <string>("origordpo"); entity.statusty = row.IsNull("statusty") ? string.Empty : row.Field <string>("statusty"); entity.tolexpfl = row.Field <bool>("tolexpfl"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }