/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromRepltopoffscriteria(ref DataRow row, Repltopoffscriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("abs_num", entity.absNum); row.SetField("bin_num", entity.binNum); row.SetField("aisle", entity.aisle); row.SetField("to_zone", entity.toZone); row.SetField("ch_stat", entity.chStat); row.SetField("repltopoffuserfield", entity.repltopoffuserfield); row.SetField("userfield", entity.userfield); }
public static Repltopoffscriteria BuildRepltopoffscriteriaFromRow(DataRow row) { Repltopoffscriteria entity = new Repltopoffscriteria(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.absNum = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num"); entity.binNum = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num"); entity.aisle = row.IsNull("aisle") ? 0 : row.Field <int>("aisle"); entity.toZone = row.IsNull("to_zone") ? string.Empty : row.Field <string>("to_zone"); entity.chStat = row.IsNull("ch_stat") ? string.Empty : row.Field <string>("ch_stat"); entity.repltopoffuserfield = row.IsNull("repltopoffuserfield") ? string.Empty : row.Field <string>("repltopoffuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }