20231024
This commit is contained in:
@@ -78,7 +78,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
|
||||
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
|
||||
Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
//Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
btnNew.OnClientClick = Window1.GetShowReference("ChecklistEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
@@ -166,25 +166,32 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
strSql += " AND chec.QuestionType=@QuestionType";
|
||||
listStr.Add(new SqlParameter("@QuestionType", drpQuestionType.SelectedValue));
|
||||
}
|
||||
if (dpHandelStatus.SelectedValue != Const._Null)
|
||||
{
|
||||
if (dpHandelStatus.SelectedValue.Equals("1"))
|
||||
{
|
||||
strSql += " AND (chec.state='5' or chec.state='6')";
|
||||
}
|
||||
else if (dpHandelStatus.SelectedValue.Equals("2"))
|
||||
{
|
||||
strSql += " AND chec.state='7'";
|
||||
}
|
||||
else if (dpHandelStatus.SelectedValue.Equals("3"))
|
||||
{
|
||||
strSql += " AND DATEADD(day,1,chec.LimitDate)< GETDATE() and chec.state<>5 and chec.state<>6 and chec.state<>7";
|
||||
}
|
||||
else if (dpHandelStatus.SelectedValue.Equals("4"))
|
||||
{
|
||||
strSql += " AND DATEADD(day,1,chec.LimitDate)> GETDATE() and chec.state<>5 and chec.state<>6 and chec.state<>7";
|
||||
}
|
||||
}
|
||||
if (dpHandelStatus.SelectedValueArray.Count() > 0)
|
||||
{
|
||||
string subQuery = "";
|
||||
if (dpHandelStatus.SelectedValueArray.Contains("1"))
|
||||
{
|
||||
subQuery += " ((chec.state='5' or chec.state='6')) OR";
|
||||
}
|
||||
if (dpHandelStatus.SelectedValueArray.Contains("2"))
|
||||
{
|
||||
subQuery += " (chec.state='7') OR";
|
||||
}
|
||||
if (dpHandelStatus.SelectedValueArray.Contains("3"))
|
||||
{
|
||||
subQuery += " (DATEADD(day,1,chec.LimitDate)< GETDATE() and chec.state<>5 and chec.state<>6 and chec.state<>7) OR";
|
||||
}
|
||||
if (dpHandelStatus.SelectedValueArray.Contains("4"))
|
||||
{
|
||||
subQuery += " (DATEADD(day,1,chec.LimitDate)> GETDATE() and chec.state<>5 and chec.state<>6 and chec.state<>7) OR";
|
||||
}
|
||||
|
||||
subQuery = subQuery.TrimEnd('R').TrimEnd('O');
|
||||
if (!string.IsNullOrEmpty(subQuery))
|
||||
{
|
||||
strSql += " and " + subQuery;
|
||||
}
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
|
||||
Reference in New Issue
Block a user