New Search Stored Procedure - Improved Performance

This commit is contained in:
Rich 2009-07-30 18:59:12 +00:00
parent 0ff065de42
commit 9859b74db8

View File

@ -868,10 +868,6 @@ namespace VEPROMS.CSLA.Library
//{
// return ToString();
//}
public string nz(string str, string def)
{
return (str == null ? def : str);
}
internal string _SearchDVPath;
public string SearchDVPath
{
@ -966,7 +962,7 @@ namespace VEPROMS.CSLA.Library
{
get
{
string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : (nz(DisplayNumber,"")==""? DisplayText: DisplayNumber));
string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : ((DisplayNumber ?? "")==""? DisplayText: DisplayNumber));
ItemInfo parent = this;
while (parent.MyPrevious != null) parent = parent.MyPrevious;
if (parent.ItemPartCount == 0)
@ -982,7 +978,7 @@ namespace VEPROMS.CSLA.Library
{
get
{
string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : (nz(MyContent.Number, "") == "" ? MyContent.Text : MyContent.Number));
string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : ((MyContent.Number ?? "") == "" ? MyContent.Text : MyContent.Number));
ItemInfo parent = this;
while (parent.MyPrevious != null) parent = parent.MyPrevious;
if (parent.ItemPartCount == 0)
@ -1507,7 +1503,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_SearchItemAndChildren";
cm.CommandText = "vesp_SearchItemAndChildrenNew";
cm.Parameters.AddWithValue("@DocVersionList", criteria.DocVersionList);
cm.Parameters.AddWithValue("@StepTypeList", criteria.StepTypeList);
cm.Parameters.AddWithValue("@SearchString", criteria.SearchString);