private void initial_Detail(int?Set_id = null) { Equipment_SET_detail[] Equipment_SET_details = null; ClassSet.GetDate_Equipment_SET_Detail(out Equipment_SET_details, Set_id); if (Equipment_SET_details != null && Equipment_SET_details.Any()) { SSEquipments = null; int?[] Equip_IDs = Equipment_SET_details.Select(x => (int?)x.Equip_ID).Distinct().ToArray(); Addgrid_Detail(Equip_IDs); } }