/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcprodlinecopy(ref DataRow row, Icprodlinecopy entity) { row.SetField("fromvendno", entity.fromvendno); row.SetField("fromwhse", entity.fromwhse); row.SetField("fromprodline", entity.fromprodline); row.SetField("tovendno", entity.tovendno); row.SetField("towhse", entity.towhse); row.SetField("toprodline", entity.toprodline); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Icprodlinecopy BuildIcprodlinecopyFromRow(DataRow row) { Icprodlinecopy entity = new Icprodlinecopy(); entity.fromvendno = row.IsNull("fromvendno") ? decimal.Zero : row.Field <decimal>("fromvendno"); entity.fromwhse = row.IsNull("fromwhse") ? string.Empty : row.Field <string>("fromwhse"); entity.fromprodline = row.IsNull("fromprodline") ? string.Empty : row.Field <string>("fromprodline"); entity.tovendno = row.IsNull("tovendno") ? decimal.Zero : row.Field <decimal>("tovendno"); entity.towhse = row.IsNull("towhse") ? string.Empty : row.Field <string>("towhse"); entity.toprodline = row.IsNull("toprodline") ? string.Empty : row.Field <string>("toprodline"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }