三库
This commit is contained in:
@@ -48,6 +48,12 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
WorkPostService.InitWorkPostNameDropDownList(this.drpPost, true);
|
||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, null, true);
|
||||
Funs.FineUIPleaseSelect(this.dpAccidentLevel);
|
||||
Funs.FineUIPleaseSelect(this.dpAccidentType);
|
||||
Funs.FineUIPleaseSelect(this.dpResponsibilityType);
|
||||
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
@@ -98,6 +104,34 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
{
|
||||
this.txtDeathPersonNum.Text = accidentHandle.DeathPersonNum.ToString();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(accidentHandle.AccidentLevel))
|
||||
{
|
||||
this.dpAccidentLevel.SelectedValue = accidentHandle.AccidentLevel.ToString();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(accidentHandle.AccidentType))
|
||||
{
|
||||
this.dpAccidentType.SelectedValue = accidentHandle.AccidentType.ToString();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(accidentHandle.PositionName))
|
||||
{
|
||||
this.drpPost.SelectedValue = accidentHandle.PositionName.ToString();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(accidentHandle.ResponsibilityType))
|
||||
{
|
||||
this.dpResponsibilityType.SelectedValue = accidentHandle.ResponsibilityType.ToString();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(accidentHandle.ResponsibleMan))
|
||||
{
|
||||
this.drpResponsibleMan.SelectedValue = accidentHandle.ResponsibleMan.ToString();
|
||||
}
|
||||
this.txtAccidentLocation.Text = accidentHandle.AccidentLocation;
|
||||
this.txtContractingResponsibility.Text = accidentHandle.ContractingResponsibility;
|
||||
this.txtResponsibilityDesc.Text = accidentHandle.ResponsibilityDesc;
|
||||
if (accidentHandle.IndirectMoneyLoss != null)
|
||||
{
|
||||
this.txtIndirectMoneyLoss.Text = accidentHandle.IndirectMoneyLoss.ToString();
|
||||
}
|
||||
|
||||
this.txtAccidentHandle.Text = accidentHandle.AccidentHandle;
|
||||
//this.txtRemark.Text = accidentHandle.Remark;
|
||||
}
|
||||
@@ -145,8 +179,36 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
//Remark = this.txtRemark.Text.Trim(),
|
||||
CompileMan = this.CurrUser.UserId,
|
||||
CompileDate = DateTime.Now,
|
||||
States = BLL.Const.State_0
|
||||
States = BLL.Const.State_0,
|
||||
AccidentLocation = this.txtAccidentLocation.Text.Trim(),
|
||||
IndirectMoneyLoss = Funs.GetNewDecimalOrZero(this.txtIndirectMoneyLoss.Text.Trim()),
|
||||
ContractingResponsibility = this.txtContractingResponsibility.Text.Trim(),
|
||||
ResponsibilityDesc = this.txtResponsibilityDesc.Text.Trim(),
|
||||
|
||||
};
|
||||
|
||||
if (this.dpAccidentLevel.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentHandle.AccidentLevel = this.dpAccidentLevel.SelectedValue;
|
||||
}
|
||||
if (this.dpAccidentType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentHandle.AccidentType = this.dpAccidentType.SelectedValue;
|
||||
}
|
||||
if (this.drpPost.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentHandle.PositionName = this.drpPost.SelectedValue;
|
||||
}
|
||||
if (this.dpResponsibilityType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentHandle.ResponsibilityType = this.dpResponsibilityType.SelectedValue;
|
||||
}
|
||||
if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentHandle.ResponsibleMan = this.drpResponsibleMan.SelectedValue;
|
||||
accidentHandle.ResponsibleManName = this.drpResponsibleMan.SelectedText;
|
||||
}
|
||||
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
accidentHandle.UnitId = this.drpUnitId.SelectedValue;
|
||||
@@ -165,6 +227,14 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
BLL.AccidentHandleService.AddAccidentHandle(accidentHandle);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, this.txtAccidentHandleCode.Text, this.AccidentHandleId, BLL.Const.ProjectAccidentHandleMenuId, Const.BtnAdd);
|
||||
}
|
||||
//更新三库事故事件
|
||||
string message = string.Empty;
|
||||
SanKuDataSummaryReportService.UpdateAccidentRecord(this.AccidentHandleId ,ref message);
|
||||
if (!string.IsNullOrWhiteSpace(message))
|
||||
{
|
||||
ShowNotify(message, MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
//Project_HSSEData_HSSEService.StatisticalData(accidentHandle.ProjectId, Project_HSSEData_HSSEService.HSSEDateType.WorkingHours);
|
||||
}
|
||||
#endregion
|
||||
@@ -184,5 +254,29 @@ namespace FineUIPro.Web.HSSE.Accident
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/AccidentHandleAttachUrl&menuId={1}", this.AccidentHandleId, BLL.Const.ProjectAccidentHandleMenuId)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 单位选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
this.drpResponsibleMan.Items.Clear();
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
this.drpResponsibleMan.DataSource = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnitId.SelectedValue
|
||||
select x;
|
||||
this.drpResponsibleMan.DataBind();
|
||||
}
|
||||
Funs.FineUIPleaseSelect(this.drpResponsibleMan);
|
||||
this.drpResponsibleMan.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user