Fix Search

This commit is contained in:
Georgy Khatuncev 2021-07-24 13:44:49 +05:00
parent 2eccc7a25d
commit cdefe04db2
17 changed files with 44 additions and 42 deletions

Binary file not shown.

@ -312,11 +312,11 @@ namespace Diplom_B.DB
var tmp = (from a in db.Dogovory
where
a.Id.ToString().ToLower().Contains(f) ||
a.DogNum.ToLower().Contains(f) ||
(!string.IsNullOrEmpty(a.DogNum) && a.DogNum.ToLower().Contains(f)) ||
a.DataPostavky.ToString("yyyy.MM.dd").Contains(f) ||
a.PrikazZapusk.ToLower().Contains(f) ||
a.Garantiy.ToLower().Contains(f) ||
a.Primechanie.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.PrikazZapusk) && a.PrikazZapusk.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Garantiy) && a.Garantiy.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Primechanie) && a.Primechanie.ToLower().Contains(f))
select a).ToArray();
return tmp;
}
@ -380,7 +380,7 @@ namespace Diplom_B.DB
var tmp = (from a in db.Users
where
a.Id.ToString().ToLower().Contains(f) ||
a.Name.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f))
select a).ToArray();
return tmp;
}
@ -456,14 +456,14 @@ namespace Diplom_B.DB
var tmp = (from a in db.Izdeliya
where
a.Id.ToString().ToLower().Contains(f) ||
a.Name.ToLower().Contains(f) ||
a.DecNum.ToLower().Contains(f) ||
a.Shifr.ToLower().Contains(f) ||
a.Litera.ToLower().Contains(f) ||
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.DecNum) && a.DecNum.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Shifr) && a.Shifr.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Litera) && a.Litera.ToLower().Contains(f)) ||
a.Cena.ToString("F2").ToLower().Contains(f) ||
a.OtdelRazrab.ToString().ToLower().Contains(f) ||
a.Ved.ToLower().Contains(f) ||
a.GlavKonstr.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.Ved) && a.Ved.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.GlavKonstr) && a.GlavKonstr.ToLower().Contains(f))
select a).ToArray();
return tmp;
}
@ -543,12 +543,12 @@ namespace Diplom_B.DB
var tmp = (from a in db.Izvescheniya
where
a.Id.ToString().ToLower().Contains(f) ||
a.IzvNum.ToLower().Contains(f) ||
(!string.IsNullOrEmpty(a.IzvNum) && a.IzvNum.ToLower().Contains(f)) ||
a.InvNum.ToString().ToLower().Contains(f) ||
a.IzmNum.ToString().ToLower().Contains(f) ||
a.UkazZad.ToLower().Contains(f) ||
a.UkazVnedr.ToLower().Contains(f) ||
a.FileName.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.UkazZad) && a.UkazZad.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.UkazVnedr) && a.UkazVnedr.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.FileName) && a.FileName.ToLower().Contains(f))
select a).ToArray();
return tmp;
}
@ -628,10 +628,10 @@ namespace Diplom_B.DB
var tmp = (from a in db.Zakazchiki
where
a.Id.ToString().ToLower().Contains(f) ||
a.Name.ToLower().Contains(f) ||
a.Adress.ToLower().Contains(f) ||
a.Phone.ToLower().Contains(f) ||
a.Email.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Adress) && a.Adress.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Phone) && a.Phone.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Email) && a.Email.ToLower().Contains(f))
select a).ToArray();
return tmp;
}
@ -802,10 +802,10 @@ namespace Diplom_B.DB
var tmp = (from a in db.Postavki
where
a.Id.ToString().ToLower().Contains(f) ||
a.ZavNum.ToLower().Contains(f) ||
(!string.IsNullOrEmpty(a.ZavNum) && a.ZavNum.ToLower().Contains(f)) ||
a.DataPostavki.ToString("yyyy.MM.dd").ToLower().Contains(f) ||
a.Status.Stat.ToString().ToLower().Contains(f) ||
a.Primechanie.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.Primechanie) && a.Primechanie.ToLower().Contains(f))
select a).ToArray();
return tmp;
}
@ -924,11 +924,11 @@ namespace Diplom_B.DB
var tmp = (from a in db.Documenty
where
a.Id.ToString().ToLower().Contains(f) ||
a.InvNum.ToLower().Contains(f) ||
a.DecNum.ToLower().Contains(f) ||
a.Name.ToLower().Contains(f) ||
a.FileName.ToLower().Contains(f) ||
a.Primechanie.ToLower().Contains(f)
(!string.IsNullOrEmpty(a.InvNum) && a.InvNum.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.DecNum) && a.DecNum.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.FileName) && a.FileName.ToLower().Contains(f)) ||
(!string.IsNullOrEmpty(a.Primechanie) && a.Primechanie.ToLower().Contains(f))
select a).ToArray();
return tmp;
}

@ -233,6 +233,8 @@ namespace Diplom_B
private Task filterDrop;
private void searchBox_TextChanged(object sender, EventArgs e)
{
try
{
filterDrop = new Task(() =>
{
@ -245,6 +247,8 @@ namespace Diplom_B
});
filterDrop.Start();
}
catch (Exception ex) { ShowError(ex.Message); }
}
private void resetSearchButton_Click(object sender, EventArgs e)
{
searchBox.Text = "";

@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>X0hvKwTTHcE7anb0WonPeVSVBpfYZcFUxNBKIpU62qQ=</dsig:DigestValue>
<dsig:DigestValue>TzNPHv6M8mLAxSDQqyZLoIm9WvZPLJIFosQQ8OaR9jY=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

@ -41,7 +41,6 @@ D:\GIT\Diplom B\bin\Debug\System.Collections.Immutable.xml
D:\GIT\Diplom B\bin\Debug\System.Diagnostics.DiagnosticSource.xml
D:\GIT\Diplom B\bin\Debug\System.Interactive.Async.xml
D:\GIT\Diplom B\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.AssemblyReference.cache
D:\GIT\Diplom B\obj\Debug\Diplom_B.Properties.Resources.resources
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.GenerateResource.cache
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.CoreCompileInputs.cache

Binary file not shown.

@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Diplom B.exe" size="173536">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Diplom B.exe" size="174048">
<assemblyIdentity name="Diplom B" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>PcItQ+GLTtgDVnU0grCE/UCpxJx55939ybCOeLAFj8s=</dsig:DigestValue>
<dsig:DigestValue>Lc+oIKpqjyk+uMl/kgdtTvFquZkAokG2jNhSx9lEB2Q=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

Binary file not shown.

@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>fPKE9Ykhf57d+LLvJiCpB4OlTVuwhSJg0Bs+5QRYRBM=</dsig:DigestValue>
<dsig:DigestValue>lMmOGp1uIwtT2dNr3+3fWIPdX3FRGB1464GxGoN9k4o=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

@ -97,7 +97,6 @@ D:\GIT\Diplom B\bin\Release\System.Collections.Immutable.xml
D:\GIT\Diplom B\bin\Release\System.Diagnostics.DiagnosticSource.xml
D:\GIT\Diplom B\bin\Release\System.Interactive.Async.xml
D:\GIT\Diplom B\bin\Release\System.Runtime.CompilerServices.Unsafe.xml
D:\GIT\Diplom B\obj\Release\Diplom B.csproj.AssemblyReference.cache
D:\GIT\Diplom B\obj\Release\Diplom_B.IzdForm.resources
D:\GIT\Diplom B\obj\Release\Diplom_B.Properties.Resources.resources
D:\GIT\Diplom B\obj\Release\Diplom B.csproj.GenerateResource.cache

Binary file not shown.

@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Diplom B.exe" size="163296">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Diplom B.exe" size="165344">
<assemblyIdentity name="Diplom B" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>wN4CjE2QB5CLoWcBFD3Ij2JAKDKNrasXYx1pqFfgHFQ=</dsig:DigestValue>
<dsig:DigestValue>5IMSNokcUtxxd4wOofGAsTg3J4ncSjw4FjYzeZyZbis=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

Binary file not shown.