/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWtserlotcriteria(ref DataRow row, Wtserlotcriteria entity) { row.SetField("wtno", entity.wtno); row.SetField("wtsuf", entity.wtsuf); row.SetField("lineno", entity.lineno); row.SetField("prod", entity.prod); row.SetField("serlottype", entity.serlottype); row.SetField("stkqtyship", entity.stkqtyship); row.SetField("shipfmwhse", entity.shipfmwhse); row.SetField("userfield", entity.userfield); }
public static Wtserlotcriteria BuildWtserlotcriteriaFromRow(DataRow row) { Wtserlotcriteria entity = new Wtserlotcriteria(); entity.wtno = row.IsNull("wtno") ? 0 : row.Field <int>("wtno"); entity.wtsuf = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.serlottype = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype"); entity.stkqtyship = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship"); entity.shipfmwhse = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }