/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPackinglistaddpo(ref DataRow row, Packinglistaddpo entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("user_id", entity.userId); row.SetField("rt_num", entity.rtNum); row.SetField("po_num", entity.poNum); row.SetField("po_suffix", entity.poSuffix); row.SetField("mixvendorokfl", entity.mixvendorokfl); row.SetField("packinglistaddpouserfield", entity.packinglistaddpouserfield); row.SetField("userfield", entity.userfield); }
public static Packinglistaddpo BuildPackinglistaddpoFromRow(DataRow row) { Packinglistaddpo entity = new Packinglistaddpo(); 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.userId = row.IsNull("user_id") ? string.Empty : row.Field <string>("user_id"); entity.rtNum = row.IsNull("rt_num") ? string.Empty : row.Field <string>("rt_num"); entity.poNum = row.IsNull("po_num") ? string.Empty : row.Field <string>("po_num"); entity.poSuffix = row.IsNull("po_suffix") ? string.Empty : row.Field <string>("po_suffix"); entity.mixvendorokfl = row.Field <bool>("mixvendorokfl"); entity.packinglistaddpouserfield = row.IsNull("packinglistaddpouserfield") ? string.Empty : row.Field <string>("packinglistaddpouserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }