/// <summary> /// 检查业务中是否存在此物品相关信息 /// </summary> /// <param name="id">物品ID</param> /// <param name="prompt">存在时返回的提示信息</param> /// <returns>存在返回true, 不存在返回false</returns> public bool IsExistInBusiness(int id, out string prompt) { prompt = null; IStoreServer storeServer = ServerModuleFactory.GetServerModule <IStoreServer>(); View_S_Stock storeData = storeServer.GetGoodsStore(id); if (storeServer != null) { prompt = "库存中存在此物品的相关信息"; return(true); } ICheckOutInDepotServer cs = ServerModuleFactory.GetServerModule <ICheckOutInDepotServer>(); if (cs.IsExist(id)) { prompt = "报检入库单中存在此物品的相关信息"; return(true); } IOrdinaryInDepotGoodsBill og = ServerModuleFactory.GetServerModule <IOrdinaryInDepotGoodsBill>(); if (og.IsExist(id)) { prompt = "普通入库单中存在此物品的相关信息"; return(true); } IHomemadePartInDepotServer hs = ServerModuleFactory.GetServerModule <IHomemadePartInDepotServer>(); if (hs.IsExist(id)) { prompt = "自制件入库单中存在此物品的相关信息"; return(true); } return(false); }