增加数据穿透界面
This commit is contained in:
@@ -46,6 +46,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
}
|
||||
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
UnitTypeService.InitUnitTypeDropDownList(this.drpUnitType,true);
|
||||
BLL.LicenseTypeService.InitLicenseTypeDropDownList(this.drpLicenseType, true);
|
||||
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
@@ -68,7 +69,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,LicenseManager.ProfessionalName,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
|
||||
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.WorkStatesStr,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.IsHighRisk,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UnitTypeName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
|
||||
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM View_License_LicenseManager AS LicenseManager "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId "
|
||||
@@ -77,13 +78,16 @@ namespace FineUIPro.Web.HSSE.License
|
||||
+ @" WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND LicenseManager.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
strSql += " AND LicenseManager.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
strSql += " AND LicenseManager.UnitId = @UnitId"; ///状态为已完成
|
||||
@@ -114,6 +118,11 @@ namespace FineUIPro.Web.HSSE.License
|
||||
strSql += " AND LicenseManager.UnitId = @UnitId2";
|
||||
listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue));
|
||||
}
|
||||
if (this.drpUnitType.SelectedValue!=BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND LicenseManager.UnitTypeId = @UnitTypeId";
|
||||
listStr.Add(new SqlParameter("@UnitTypeId", this.drpUnitType.SelectedValue));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -217,7 +226,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
var licenseManager = BLL.LicenseManagerService.GetLicenseManagerById(id);
|
||||
if (licenseManager != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden || licenseManager.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LicenseManagerView.aspx?LicenseManagerId={0}", id, "查看 - ")));
|
||||
}
|
||||
@@ -249,7 +258,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
BLL.LicenseManagerService.DeleteLicenseManagerById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.WorkPermit);
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user