安全管理,作业票等,补充公司级树
This commit is contained in:
@@ -42,16 +42,10 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
|
||||
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("SpecialMeetingEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -73,14 +67,29 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
this.BindGrid();
|
||||
}
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false);
|
||||
Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询");
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
string strSql = "SELECT SpecialMeeting.SpecialMeetingId,SpecialMeeting.ProjectId,CodeRecords.Code AS SpecialMeetingCode,Unit.UnitId,Unit.UnitName,SpecialMeeting.SpecialMeetingName,SpecialMeeting.SpecialMeetingDate,SpecialMeeting.CompileMan,SpecialMeeting.SpecialMeetingContents,SpecialMeeting.CompileDate,SpecialMeeting.States,SpecialMeeting.MeetingHours,SpecialMeeting.MeetingHostMan,SpecialMeeting.AttentPersonNum,SpecialMeeting.AttentPerson"
|
||||
@@ -96,7 +105,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
strSql += " AND SpecialMeeting.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Unit.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
@@ -219,7 +228,7 @@ namespace FineUIPro.Web.HSSE.Meeting
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialMeetingEdit.aspx?SpecialMeetingId={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user