修改项目安全实施计划
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using BLL;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Plan
|
||||
{
|
||||
public partial class ActionPlanListView : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string ActionPlanListId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ActionPlanListId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ActionPlanListId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpReviewMan, BLL.Const.UnitId_SEDIN, BLL.Const.Depart_constructionId, true);
|
||||
BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpPerson, BLL.Const.UnitId_SEDIN, BLL.Const.Depart_constructionId, true);
|
||||
this.ActionPlanListId = Request.Params["ActionPlanListId"];
|
||||
if (!string.IsNullOrEmpty(this.ActionPlanListId))
|
||||
{
|
||||
Model.ActionPlan_ActionPlanList actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(this.ActionPlanListId);
|
||||
if (actionPlanList != null)
|
||||
{
|
||||
///读取编号
|
||||
this.txtActionPlanListCode.Text = actionPlanList.ActionPlanListCode;
|
||||
this.txtActionPlanListName.Text = actionPlanList.ActionPlanListName;
|
||||
this.txtVersionNo.Text = actionPlanList.VersionNo;
|
||||
if (!string.IsNullOrEmpty(actionPlanList.ProjectType))
|
||||
{
|
||||
this.drpProjectType.SelectedValue = actionPlanList.ProjectType;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpProjectType.Hidden = true;
|
||||
}
|
||||
this.drpCompileMan.Text = BLL.Person_PersonsService.GetPersonsNameById(actionPlanList.CompileMan);
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", actionPlanList.CompileDate);
|
||||
if (actionPlanList.IsReview == true)
|
||||
{
|
||||
this.rblIsReview.SelectedValue = "True";
|
||||
this.drpReviewMan.Hidden = false;
|
||||
this.drpReviewMan.SelectedValue = actionPlanList.ReviewMan;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.rblIsReview.SelectedValue = "False";
|
||||
this.drpPerson.Hidden = true;
|
||||
}
|
||||
List<string> list2 = BLL.ActionPlanListApproveService.GetReviewingPersonIds(this.ActionPlanListId);
|
||||
if (list2.Count > 0)
|
||||
{
|
||||
this.drpPerson.SelectedValueArray = list2.ToArray();
|
||||
}
|
||||
if (actionPlanList.IsCompanyReview != null)
|
||||
{
|
||||
rblIsCompanyReview.Hidden = false;
|
||||
if (actionPlanList.IsCompanyReview == true)
|
||||
{
|
||||
rblIsCompanyReview.SelectedValue = "True";
|
||||
}
|
||||
else
|
||||
{
|
||||
rblIsCompanyReview.SelectedValue = "False";
|
||||
}
|
||||
}
|
||||
var list = ActionPlanListApproveService.getListData(ActionPlanListId);
|
||||
gvApprove.DataSource = list;
|
||||
gvApprove.DataBind();
|
||||
WindowAtt_Close(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string man(Object man)
|
||||
{
|
||||
string appman = string.Empty;
|
||||
if (Person_PersonsService.GetPerson_PersonsById(man.ToString()) != null)
|
||||
{
|
||||
appman = Person_PersonsService.GetPerson_PersonsById(man.ToString()).PersonName;
|
||||
}
|
||||
return appman;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置树的节点选择
|
||||
/// </summary>
|
||||
/// <param name="nodes"></param>
|
||||
/// <param name="role"></param>
|
||||
private void SetCheck(Tree tree, List<string> userIds)
|
||||
{
|
||||
foreach (TreeNode tn in tree.Nodes[0].Nodes)
|
||||
{
|
||||
if (userIds.Contains(tn.NodeID))
|
||||
{
|
||||
tn.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.ActionPlanListId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanListAttachUrl&menuId={1}&type=-1", this.ActionPlanListId, BLL.Const.ProjectActionPlanListMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void gvApprove_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
object[] keys = gvApprove.DataKeys[e.RowIndex];
|
||||
string fileId = string.Empty;
|
||||
if (keys == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
fileId = keys[0].ToString();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
|
||||
String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/ActionPlanListAttachUrl&menuId={2}",
|
||||
-1, fileId, Const.ProjectActionPlanListMenuId)));
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
this.divC.InnerHtml = string.Empty;
|
||||
var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.ActionPlanListId);
|
||||
if (getAtt != null)
|
||||
{
|
||||
this.divC.InnerHtml = UploadAttachmentService.ShowAttachment("../../", getAtt.AttachUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.trAtt.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user