/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApeceserialviewresult(ref DataRow row, Apeceserialviewresult entity) { row.SetField("prod", entity.prod); row.SetField("ordqty", entity.ordqty); row.SetField("proofqty", entity.proofqty); row.SetField("invqty", entity.invqty); row.SetField("lineno", entity.lineno); row.SetField("proddesc", entity.proddesc); row.SetField("type", entity.type); row.SetField("whse", entity.whse); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("seqno", entity.seqno); row.SetField("icspecrecno", entity.icspecrecno); row.SetField("userfield", entity.userfield); }
public static Apeceserialviewresult BuildApeceserialviewresultFromRow(DataRow row) { Apeceserialviewresult entity = new Apeceserialviewresult(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.ordqty = row.IsNull("ordqty") ? decimal.Zero : row.Field <decimal>("ordqty"); entity.proofqty = row.IsNull("proofqty") ? decimal.Zero : row.Field <decimal>("proofqty"); entity.invqty = row.IsNull("invqty") ? decimal.Zero : row.Field <decimal>("invqty"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.type = row.IsNull("type") ? string.Empty : row.Field <string>("type"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.icspecrecno = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }