/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCcitemscriteria(ref DataRow row, Ccitemscriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("abs_num", entity.absNum); row.SetField("start_category", entity.startCategory); row.SetField("end_category", entity.endCategory); row.SetField("abc", entity.abc); row.SetField("item_type", entity.itemType); row.SetField("manual_list", entity.manualList); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("ccitemsuserfield", entity.ccitemsuserfield); row.SetField("userfield", entity.userfield); }
public static Ccitemscriteria BuildCcitemscriteriaFromRow(DataRow row) { Ccitemscriteria entity = new Ccitemscriteria(); 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.startCategory = row.IsNull("start_category") ? string.Empty : row.Field <string>("start_category"); entity.endCategory = row.IsNull("end_category") ? string.Empty : row.Field <string>("end_category"); entity.abc = row.IsNull("abc") ? string.Empty : row.Field <string>("abc"); entity.itemType = row.IsNull("item_type") ? string.Empty : row.Field <string>("item_type"); entity.manualList = row.IsNull("manual_list") ? string.Empty : row.Field <string>("manual_list"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.ccitemsuserfield = row.IsNull("ccitemsuserfield") ? string.Empty : row.Field <string>("ccitemsuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }