/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcepeserlotinitcriteria(ref DataRow row, Icepeserlotinitcriteria entity) { row.SetField("whse", entity.whse); row.SetField("runno", entity.runno); row.SetField("prod", entity.prod); row.SetField("unavailfl", entity.unavailfl); row.SetField("qtycnt", entity.qtycnt); row.SetField("unit", entity.unit); row.SetField("ticketno", entity.ticketno); row.SetField("adjustfl", entity.adjustfl); row.SetField("userfield", entity.userfield); }
public static Icepeserlotinitcriteria BuildIcepeserlotinitcriteriaFromRow(DataRow row) { Icepeserlotinitcriteria entity = new Icepeserlotinitcriteria(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.runno = row.IsNull("runno") ? 0 : row.Field <int>("runno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.unavailfl = row.Field <bool>("unavailfl"); entity.qtycnt = row.IsNull("qtycnt") ? decimal.Zero : row.Field <decimal>("qtycnt"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.ticketno = row.IsNull("ticketno") ? 0 : row.Field <int>("ticketno"); entity.adjustfl = row.Field <bool>("adjustfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }