增加数据穿透界面
This commit is contained in:
@@ -48,19 +48,9 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
var unit = UnitService.GetUnitByUnitId(Const.UnitId_CWCEC);
|
||||
if (unit != null && !string.IsNullOrEmpty(unit.UnitCode))
|
||||
{
|
||||
string url = "../../Images/SUBimages/" + unit.UnitCode + ".jpg";
|
||||
if (url.Contains('*'))
|
||||
{
|
||||
url = url.Replace('*', '-');
|
||||
}
|
||||
this.Image1.ImageUrl = url;
|
||||
}
|
||||
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Funs.FineUIPleaseSelect(this.drpAccidentDegree);
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.lblProjectName.Text = BLL.ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName;
|
||||
@@ -89,6 +79,10 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
{
|
||||
this.drpUnitId.SelectedValue = accidentReport.UnitId;
|
||||
}
|
||||
if(!string.IsNullOrEmpty(accidentReport.AccidentDegree))
|
||||
{
|
||||
this.drpAccidentDegree.SelectedValue = accidentReport.AccidentDegree;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(accidentReport.CompileMan))
|
||||
{
|
||||
this.drpCompileMan.SelectedValue = accidentReport.CompileMan;
|
||||
@@ -97,7 +91,6 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
{
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReport.CompileDate);
|
||||
}
|
||||
this.txtFileContents.Text = HttpUtility.HtmlDecode(accidentReport.FileContent);
|
||||
this.txtAccidentReportName.Text = accidentReport.AccidentReportName;
|
||||
if (!string.IsNullOrEmpty(accidentReport.AccidentTypeId))
|
||||
{
|
||||
@@ -191,11 +184,6 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
this.drpCompileMan.SelectedValue = this.CurrUser.UserId;
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
///初始化审核菜单
|
||||
this.ctlAuditFlow.MenuId = BLL.Const.ProjectAccidentReportMenuId;
|
||||
this.ctlAuditFlow.DataId = this.AccidentReportId;
|
||||
this.ctlAuditFlow.ProjectId = this.ProjectId;
|
||||
this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -267,39 +255,36 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSubmit);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
{
|
||||
bool res = SaveData(BLL.Const.BtnSave);
|
||||
if (res)
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据保存
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
private bool SaveData(string type)
|
||||
{
|
||||
if (this.drpAccidentTypeId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择事故类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (this.drpAccidentDegree.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择严重程度!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
if (this.rbIsNotConfirm.SelectedValue == "True")
|
||||
{
|
||||
if (this.drpUnitId2.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择事故责任单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -307,7 +292,7 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择事故责任单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,14 +301,17 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
ProjectId = this.ProjectId,
|
||||
AccidentReportCode = this.txtAccidentReportCode.Text.Trim(),
|
||||
//accidentReport.AccidentReportType = this.drpAccidentReportType.SelectedValue;
|
||||
FileContent = HttpUtility.HtmlEncode(this.txtFileContents.Text)
|
||||
};
|
||||
if (this.drpCompileMan.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentReport.CompileMan = this.drpCompileMan.SelectedValue;
|
||||
}
|
||||
if (this.drpAccidentDegree.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentReport.AccidentDegree = this.drpAccidentDegree.SelectedValue;
|
||||
}
|
||||
accidentReport.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
|
||||
accidentReport.States = BLL.Const.State_0;
|
||||
accidentReport.States = BLL.Const.State_2;
|
||||
accidentReport.AccidentReportName = this.txtAccidentReportName.Text.Trim();
|
||||
if (this.drpAccidentTypeId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
@@ -356,10 +344,6 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
accidentReport.ReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
|
||||
accidentReport.ProcessDescription = this.txtProcessDescription.Text.Trim();
|
||||
accidentReport.EmergencyMeasures = this.txtEmergencyMeasures.Text.Trim();
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
accidentReport.States = this.ctlAuditFlow.NextStep;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.AccidentReportId))
|
||||
{
|
||||
accidentReport.AccidentReportId = this.AccidentReportId;
|
||||
@@ -378,8 +362,9 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
BLL.AccidentReportService.AddAccidentReport(accidentReport);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, this.txtAccidentReportCode.Text, this.AccidentReportId, BLL.Const.ProjectAccidentReportMenuId, Const.BtnAdd);
|
||||
}
|
||||
//保存流程审核数据
|
||||
this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectAccidentReportMenuId, this.AccidentReportId, (type == BLL.Const.BtnSubmit ? true : false), accidentReport.AccidentReportCode, "../Accident/AccidentReportView.aspx?AccidentReportId={0}");
|
||||
Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.WorkingHours);
|
||||
Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.AccidentEvent);
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user