/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromLoadporetnallocresults(ref DataRow row, Loadporetnallocresults entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("lineno", entity.lineno); row.SetField("cStageCd", entity.cStageCd); row.SetField("receiptdt", entity.receiptdt); row.SetField("qty", entity.qty); row.SetField("qtyalloc", entity.qtyalloc); row.SetField("coreduedt", entity.coreduedt); row.SetField("whse", entity.whse); row.SetField("coreprod", entity.coreprod); row.SetField("expirefl", entity.expirefl); }
public static Loadporetnallocresults BuildLoadporetnallocresultsFromRow(DataRow row) { Loadporetnallocresults entity = new Loadporetnallocresults(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.cStageCd = row.IsNull("cStageCd") ? string.Empty : row.Field <string>("cStageCd"); entity.receiptdt = row.Field <DateTime?>("receiptdt"); entity.qty = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty"); entity.qtyalloc = row.IsNull("qtyalloc") ? decimal.Zero : row.Field <decimal>("qtyalloc"); entity.coreduedt = row.Field <DateTime?>("coreduedt"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.coreprod = row.IsNull("coreprod") ? string.Empty : row.Field <string>("coreprod"); entity.expirefl = row.Field <bool>("expirefl"); return(entity); }