/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIceuupdatecriteria(ref DataRow row, Iceuupdatecriteria entity) { row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("mode", entity.mode); row.SetField("origreasunavty", entity.origreasunavty); row.SetField("newreasunavty", entity.newreasunavty); row.SetField("stkqtyship", entity.stkqtyship); row.SetField("unit", entity.unit); row.SetField("orderno", entity.orderno); row.SetField("refer", entity.refer); row.SetField("noassn", entity.noassn); row.SetField("userfield", entity.userfield); }
public static Iceuupdatecriteria BuildIceuupdatecriteriaFromRow(DataRow row) { Iceuupdatecriteria entity = new Iceuupdatecriteria(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.mode = row.IsNull("mode") ? string.Empty : row.Field <string>("mode"); entity.origreasunavty = row.IsNull("origreasunavty") ? string.Empty : row.Field <string>("origreasunavty"); entity.newreasunavty = row.IsNull("newreasunavty") ? string.Empty : row.Field <string>("newreasunavty"); entity.stkqtyship = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.noassn = row.IsNull("noassn") ? decimal.Zero : row.Field <decimal>("noassn"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }