Fix Search
This commit is contained in:
parent
2eccc7a25d
commit
cdefe04db2
Binary file not shown.
52
DB/WorkDB.cs
52
DB/WorkDB.cs
@ -312,11 +312,11 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Dogovory
|
var tmp = (from a in db.Dogovory
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
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.DataPostavky.ToString("yyyy.MM.dd").Contains(f) ||
|
||||||
a.PrikazZapusk.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.PrikazZapusk) && a.PrikazZapusk.ToLower().Contains(f)) ||
|
||||||
a.Garantiy.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Garantiy) && a.Garantiy.ToLower().Contains(f)) ||
|
||||||
a.Primechanie.ToLower().Contains(f)
|
(!string.IsNullOrEmpty(a.Primechanie) && a.Primechanie.ToLower().Contains(f))
|
||||||
select a).ToArray();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -380,7 +380,7 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Users
|
var tmp = (from a in db.Users
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
a.Id.ToString().ToLower().Contains(f) ||
|
||||||
a.Name.ToLower().Contains(f)
|
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f))
|
||||||
select a).ToArray();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -456,14 +456,14 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Izdeliya
|
var tmp = (from a in db.Izdeliya
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
a.Id.ToString().ToLower().Contains(f) ||
|
||||||
a.Name.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f)) ||
|
||||||
a.DecNum.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.DecNum) && a.DecNum.ToLower().Contains(f)) ||
|
||||||
a.Shifr.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Shifr) && a.Shifr.ToLower().Contains(f)) ||
|
||||||
a.Litera.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Litera) && a.Litera.ToLower().Contains(f)) ||
|
||||||
a.Cena.ToString("F2").ToLower().Contains(f) ||
|
a.Cena.ToString("F2").ToLower().Contains(f) ||
|
||||||
a.OtdelRazrab.ToString().ToLower().Contains(f) ||
|
a.OtdelRazrab.ToString().ToLower().Contains(f) ||
|
||||||
a.Ved.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Ved) && a.Ved.ToLower().Contains(f)) ||
|
||||||
a.GlavKonstr.ToLower().Contains(f)
|
(!string.IsNullOrEmpty(a.GlavKonstr) && a.GlavKonstr.ToLower().Contains(f))
|
||||||
select a).ToArray();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -543,12 +543,12 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Izvescheniya
|
var tmp = (from a in db.Izvescheniya
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
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.InvNum.ToString().ToLower().Contains(f) ||
|
||||||
a.IzmNum.ToString().ToLower().Contains(f) ||
|
a.IzmNum.ToString().ToLower().Contains(f) ||
|
||||||
a.UkazZad.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.UkazZad) && a.UkazZad.ToLower().Contains(f)) ||
|
||||||
a.UkazVnedr.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.UkazVnedr) && a.UkazVnedr.ToLower().Contains(f)) ||
|
||||||
a.FileName.ToLower().Contains(f)
|
(!string.IsNullOrEmpty(a.FileName) && a.FileName.ToLower().Contains(f))
|
||||||
select a).ToArray();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -628,10 +628,10 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Zakazchiki
|
var tmp = (from a in db.Zakazchiki
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
a.Id.ToString().ToLower().Contains(f) ||
|
||||||
a.Name.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f)) ||
|
||||||
a.Adress.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Adress) && a.Adress.ToLower().Contains(f)) ||
|
||||||
a.Phone.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Phone) && a.Phone.ToLower().Contains(f)) ||
|
||||||
a.Email.ToLower().Contains(f)
|
(!string.IsNullOrEmpty(a.Email) && a.Email.ToLower().Contains(f))
|
||||||
select a).ToArray();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -802,10 +802,10 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Postavki
|
var tmp = (from a in db.Postavki
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
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.DataPostavki.ToString("yyyy.MM.dd").ToLower().Contains(f) ||
|
||||||
a.Status.Stat.ToString().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();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -924,11 +924,11 @@ namespace Diplom_B.DB
|
|||||||
var tmp = (from a in db.Documenty
|
var tmp = (from a in db.Documenty
|
||||||
where
|
where
|
||||||
a.Id.ToString().ToLower().Contains(f) ||
|
a.Id.ToString().ToLower().Contains(f) ||
|
||||||
a.InvNum.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.InvNum) && a.InvNum.ToLower().Contains(f)) ||
|
||||||
a.DecNum.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.DecNum) && a.DecNum.ToLower().Contains(f)) ||
|
||||||
a.Name.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.Name) && a.Name.ToLower().Contains(f)) ||
|
||||||
a.FileName.ToLower().Contains(f) ||
|
(!string.IsNullOrEmpty(a.FileName) && a.FileName.ToLower().Contains(f)) ||
|
||||||
a.Primechanie.ToLower().Contains(f)
|
(!string.IsNullOrEmpty(a.Primechanie) && a.Primechanie.ToLower().Contains(f))
|
||||||
select a).ToArray();
|
select a).ToArray();
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
20
DocForm.cs
20
DocForm.cs
@ -234,16 +234,20 @@ namespace Diplom_B
|
|||||||
private Task filterDrop;
|
private Task filterDrop;
|
||||||
private void searchBox_TextChanged(object sender, EventArgs e)
|
private void searchBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
filterDrop = new Task(() =>
|
try
|
||||||
{
|
{
|
||||||
var fd = filterDrop.Id;
|
filterDrop = new Task(() =>
|
||||||
Task.Delay(1000).Wait();
|
{
|
||||||
if (filterDrop.Id == fd)
|
var fd = filterDrop.Id;
|
||||||
if (InvokeRequired) Invoke((Action)(() => { UpdateTable(WorkDB.ListDocumenty(searchBox.Text)); }));
|
Task.Delay(1000).Wait();
|
||||||
else UpdateTable(WorkDB.ListDocumenty(searchBox.Text));
|
if (filterDrop.Id == fd)
|
||||||
|
if (InvokeRequired) Invoke((Action)(() => { UpdateTable(WorkDB.ListDocumenty(searchBox.Text)); }));
|
||||||
|
else UpdateTable(WorkDB.ListDocumenty(searchBox.Text));
|
||||||
|
|
||||||
});
|
});
|
||||||
filterDrop.Start();
|
filterDrop.Start();
|
||||||
|
}
|
||||||
|
catch (Exception ex) { ShowError(ex.Message); }
|
||||||
}
|
}
|
||||||
private void resetSearchButton_Click(object sender, EventArgs e)
|
private void resetSearchButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>X0hvKwTTHcE7anb0WonPeVSVBpfYZcFUxNBKIpU62qQ=</dsig:DigestValue>
|
<dsig:DigestValue>TzNPHv6M8mLAxSDQqyZLoIm9WvZPLJIFosQQ8OaR9jY=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
Binary file not shown.
@ -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.Diagnostics.DiagnosticSource.xml
|
||||||
D:\GIT\Diplom B\bin\Debug\System.Interactive.Async.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\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.Properties.Resources.resources
|
||||||
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.GenerateResource.cache
|
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.GenerateResource.cache
|
||||||
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.CoreCompileInputs.cache
|
D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.CoreCompileInputs.cache
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -42,14 +42,14 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
<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" />
|
<assemblyIdentity name="Diplom B" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||||
<hash>
|
<hash>
|
||||||
<dsig:Transforms>
|
<dsig:Transforms>
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<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>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
Binary file not shown.
@ -14,7 +14,7 @@
|
|||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<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>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
Binary file not shown.
@ -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.Diagnostics.DiagnosticSource.xml
|
||||||
D:\GIT\Diplom B\bin\Release\System.Interactive.Async.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\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.IzdForm.resources
|
||||||
D:\GIT\Diplom B\obj\Release\Diplom_B.Properties.Resources.resources
|
D:\GIT\Diplom B\obj\Release\Diplom_B.Properties.Resources.resources
|
||||||
D:\GIT\Diplom B\obj\Release\Diplom B.csproj.GenerateResource.cache
|
D:\GIT\Diplom B\obj\Release\Diplom B.csproj.GenerateResource.cache
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -42,14 +42,14 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
<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" />
|
<assemblyIdentity name="Diplom B" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||||
<hash>
|
<hash>
|
||||||
<dsig:Transforms>
|
<dsig:Transforms>
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>wN4CjE2QB5CLoWcBFD3Ij2JAKDKNrasXYx1pqFfgHFQ=</dsig:DigestValue>
|
<dsig:DigestValue>5IMSNokcUtxxd4wOofGAsTg3J4ncSjw4FjYzeZyZbis=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user