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 加载 /// /// 页面加载 /// /// /// 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 附件上传 /// /// 会议纪要 /// /// /// 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))); } /// /// 签到表 /// /// /// 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 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 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 } }