CNCEC_SUBQHSE_WUHUAN/SGGL/FineUIPro.Web/TestRun/Meeting/MeetingSummaryView.aspx.cs

133 lines
5.0 KiB
C#

using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.TestRun.Meeting
{
public partial class MeetingSummaryView : PageBase
{
#region
/// <summary>
/// 页面加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id))
{
Model.Driver_MeetingMinutes data = BLL.MeetingMinutesService.GetMinutesById(id);
if (data != null)
{
this.hdId.Text = id;
this.txtMinutesCode.Text = data.MinutesCode;
if (data.MeetingType == "1")
{
this.rblMeetingType.SelectedValue = "1";
}
else if (data.MeetingType == "2")
{
this.rblMeetingType.SelectedValue = "2";
}
else if (data.MeetingType == "3")
{
this.rblMeetingType.SelectedValue = "3";
}
WindowAtt_Close(null, null);
WindowAtt2_Close(null, null);
}
}
///初始化审核菜单
this.ctlAuditFlow.MenuId = BLL.Const.WeekMeetingMenuId;
this.ctlAuditFlow.DataId = id;
this.ctlAuditFlow.ProjectId = this.CurrUser.LoginProjectId;
this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
//InitMenuTree();
}
}
#endregion
#region
/// <summary>
/// 会议纪要
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttach_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.Driver_MeetingMinutes));
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/Meeting/MeetingMinutes&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.WeekMeetingMenuId)));
}
/// <summary>
/// 签到表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSign_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.Driver_MeetingMinutes));
}
PageContext.RegisterStartupScript(WindowAtt2.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/Meeting/MeetingMinutes&menuId={1}&strParam=2", this.hdId.Text, BLL.Const.WeekMeetingMenuId)));
}
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
{
string url = string.Empty;
this.lblMinutesAttach.Text = string.Empty;
var attLists = BLL.AttachFileService.Getfiles(this.hdId.Text + "#1", BLL.Const.WeekMeetingMenuId);
if (attLists != null)
{
List<string> lists = Funs.GetStrListByStr(attLists.AttachUrl, ',');
if (lists.Count > 0)
{
foreach (var item in lists)
{
url += item.Substring(item.IndexOf('_') + 1) + "\r\n";
}
}
if (!string.IsNullOrEmpty(url))
{
this.lblMinutesAttach.Text = url;
}
}
}
protected void WindowAtt2_Close(object sender, WindowCloseEventArgs e)
{
string url = string.Empty;
this.lblSignAttach.Text = string.Empty;
var attLists = BLL.AttachFileService.Getfiles(this.hdId.Text + "#2", BLL.Const.WeekMeetingMenuId);
if (attLists != null)
{
List<string> lists = Funs.GetStrListByStr(attLists.AttachUrl, ',');
if (lists.Count > 0)
{
foreach (var item in lists)
{
url += item.Substring(item.IndexOf('_') + 1) + "\r\n";
}
}
if (!string.IsNullOrEmpty(url))
{
this.lblSignAttach.Text = url;
}
}
}
#endregion
}
}