升级
This commit is contained in:
@@ -83,7 +83,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
|
||||
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,C.SourceDes,
|
||||
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
|
||||
InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification,(CASE WHEN IsCheckOK=1 THEN '是' WHEN IsCheckOK=0 THEN '否' ELSE '' END) AS IsCheckOK, InspectionType, LeaveDate, UnitsCount
|
||||
from Comprehensive_InspectionMachine C
|
||||
@@ -107,6 +107,18 @@ namespace FineUIPro.Web.Comprehensive
|
||||
strSql += " AND C.InspectionType=@InspectionType";
|
||||
listStr.Add(new SqlParameter("@InspectionType", sdrpType.SelectedValue));
|
||||
}
|
||||
string isOnSite = this.ckIsOnSite.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(isOnSite))
|
||||
{
|
||||
strSql += " AND C.IsOnSite = @IsOnSite ";
|
||||
listStr.Add(new SqlParameter("@IsOnSite", this.ckIsOnSite.SelectedValue));
|
||||
}
|
||||
if (this.rbSource.SelectedValue == "1")
|
||||
{
|
||||
strSql += " AND C.SourceDes LIKE @SourceDes ";
|
||||
listStr.Add(new SqlParameter("@SourceDes", "%#%"));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -162,7 +174,54 @@ namespace FineUIPro.Web.Comprehensive
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 退场
|
||||
|
||||
/// <summary>
|
||||
/// 批量退场按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOutSite_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
int succ = 0;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var rows = BLL.InspectionMachineService.GetInspectionMachineById(rowID);
|
||||
if (rows != null && rows.IsOnSite != false)
|
||||
{
|
||||
rows.IsOnSite = false;
|
||||
rows.LeaveDate = rows.LeaveDate != null ? rows.LeaveDate : DateTime.Now;
|
||||
BLL.InspectionMachineService.UpdateInspectionMachine(rows);
|
||||
succ++;
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
ShowNotify("操作完成,已退场" + succ + "条", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择需要退场的机具设备", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
@@ -271,6 +330,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
this.btnOutSite.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user