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

76 lines
3.0 KiB
C#

using System;
namespace FineUIPro.Web.TestRun.Meeting
{
public partial class Feedback : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.txtFeedbak.Hidden = true;
//BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.CurrUser.LoginProjectId, true);
string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id))
{
Model.Driver_Meeting data = BLL.MeetingService.GetMeetingById(id);
if (data != null)
{
this.hdId.Text = id;
this.txtMeetingName.Text = data.MeetingName;
this.txtStartTime.Text = data.StartTime.HasValue ? string.Format("{0:yyyy-MM-dd hh:mm:ss}", data.StartTime) : "";
this.txtEndTime.Text = data.EndTime.HasValue ? string.Format("{0:yyyy-MM-dd hh:mm:ss}", data.EndTime) : "";
this.txtMeetingAddress.Text = data.MeetingAddress;
this.txtMeetingUrl.Text = data.MeetingUrl;
this.txtInitiationDate.Text = data.InitiationDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.InitiationDate) : "";
this.txtMeetingContent.Text = data.MeetingContent;
this.rblMeetingType.SelectedValue = data.MeetingType;
}
}
}
}
/// <summary>
/// 是否参会选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void rblIsMeeting_SelectedIndexChanged(object sender, EventArgs e)
{
if (rblIsMeeting.SelectedValue == "0")
{
this.txtFeedbak.Hidden = false;
}
else
{
this.txtFeedbak.Hidden = true;
}
}
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string id = Request.Params["id"];
var meetingItem = BLL.MeetingItemService.GetMeetingItemByMeetingIdAndUserId(id, this.CurrUser.UserId);
if (meetingItem != null)
{
if (rblIsMeeting.SelectedValue == "1")
{
meetingItem.IsMeeting = true;
}
else
{
meetingItem.IsMeeting = false;
}
meetingItem.Feedback = this.txtFeedbak.Text.Trim();
BLL.MeetingItemService.UpdateMeetingItem(meetingItem);
ShowNotify("反馈成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
}
}