/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromEtccdoclistpocriteria(ref DataRow row, Etccdoclistpocriteria entity) { row.SetField("vendno", entity.vendno); row.SetField("shipfmno", entity.shipfmno); row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("buyer", entity.buyer); row.SetField("whse", entity.whse); row.SetField("approvty", entity.approvty); row.SetField("duedt", entity.duedt); row.SetField("userfield", entity.userfield); }
public static Etccdoclistpocriteria BuildEtccdoclistpocriteriaFromRow(DataRow row) { Etccdoclistpocriteria entity = new Etccdoclistpocriteria(); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.buyer = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.duedt = row.Field <DateTime?>("duedt"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }