/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromItemprimeupd(ref DataRow row, Itemprimeupd entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("abs_num", entity.absNum); row.SetField("fullCase", entity.fullCase); row.SetField("splitCase", entity.splitCase); row.SetField("counter", entity.counter); row.SetField("pallet", entity.pallet); row.SetField("itemprimeupduserfield", entity.itemprimeupduserfield); row.SetField("userfield", entity.userfield); }
public static Itemprimeupd BuildItemprimeupdFromRow(DataRow row) { Itemprimeupd entity = new Itemprimeupd(); 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.fullCase = row.IsNull("fullCase") ? string.Empty : row.Field <string>("fullCase"); entity.splitCase = row.IsNull("splitCase") ? string.Empty : row.Field <string>("splitCase"); entity.counter = row.IsNull("counter") ? string.Empty : row.Field <string>("counter"); entity.pallet = row.IsNull("pallet") ? string.Empty : row.Field <string>("pallet"); entity.itemprimeupduserfield = row.IsNull("itemprimeupduserfield") ? string.Empty : row.Field <string>("itemprimeupduserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }