ALTER procedure FullSearch(@sumeryFieldOnly as bit,@allPropertyCompany as bit,@txtSearc as nvarchar(200))
as
begin
if @sumeryFieldOnly=1
begin
select SummaryField,NameCompany,idCompany from propertyCompany where SummaryField like '%'[email protected]+'%'
end
if @allPropertyCompany =1
begin
select IdCompany, NameCompany,Manager,CenterOfficeAddress,CompanyAddress,Website,EmailCompany,Tel1,Tel2,Country,Province,City,WorkExperience,ResumeManager,HistoryCompany,DescriptionField,SummaryField,'MainPP.aspx?idCompany='+cast(IdCompany as nvarchar(20)) as URL
from PropertyCompany
where NameCompany like '%'[email protected]+'%' or Manager like '%'[email protected]+'%' or CenterOfficeAddress like '%'[email protected]+'%' or CompanyAddress like '%'[email protected]+'%' or Website like '%'[email protected]+'%' or EmailCompany like '%'[email protected]+'%' or Tel1 like '%'[email protected]+'%' or Tel2 like '%'[email protected]+'%' or Country like '%'[email protected]+'%' or Province like '%'[email protected]+'%' or City like '%'[email protected]+'%' or WorkExperience like '%'[email protected]+'%' or ResumeManager like '%'[email protected]+'%' or HistoryCompany like '%'[email protected]+'%' or DescriptionField like '%'[email protected]+'%' or SummaryField like '%'[email protected]+'%'
end
end
LINQは、ストアドプロシージャの値を取得しようとすると - エラー: "定義が含まれていません"
var result = dc.FullSearch(true,false,"abc");
foreach (var item in result){
str +=item.SummaryField;
}
はstrが仕事の罰金であるとSummaryField
しかし
var result = dc.FullSearch(false,true,"abc");
foreach (var item in result){
str +=item.idCompany;
}
を表示します
エラーを返します。
Error:'FullSearchResult' does not contain a definition for 'IdCompany' and no extension method 'IdCompany' accepting a first argument of type 'FullSearchResult' could be found (are you missing a using directive or an assembly reference?)
NITのピッキング:それは** SummaryFieldOnly **だろう - 何それは関係なく –