质量更新:
1、企业及分支机构检查 2、机具设备 批量退场 3、质量会议互通到总包 4、机具设备互通到总包
This commit is contained in:
@@ -33,7 +33,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
|
||||
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
|
||||
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,C.SourceDes,
|
||||
InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode,C.IsOnSite
|
||||
from Comprehensive_InspectionMachine C
|
||||
left join Base_Unit U on C.UnitId=U.UnitId
|
||||
@@ -56,6 +56,17 @@ 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;
|
||||
@@ -253,6 +264,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))
|
||||
{
|
||||
@@ -303,6 +315,50 @@ namespace FineUIPro.Web.Comprehensive
|
||||
|
||||
return "编制";
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
#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 导出按钮
|
||||
/// 导出按钮
|
||||
|
||||
Reference in New Issue
Block a user