xinjiang/SGGL/FineUIPro.Web/HSSE/EduTrain/PlanView.aspx.cs

47 lines
2.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using BLL;
using System;
using System.Linq;
namespace FineUIPro.Web.HSSE.EduTrain
{
public partial class PlanView : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string planId = Request.Params["PlanId"];
var plan = BLL.TrainingPlanService.GetPlanById(planId);
if (plan != null)
{
this.txtPlanCode.Text = plan.PlanCode;
this.txtPlanName.Text = plan.PlanName;
this.txtDesignerName.Text = BLL.UserService.GetUserNameByUserId(plan.DesignerId);
this.txtDesignerDate.Text = string.Format("{0:yyyy-MM-dd}", plan.DesignerDate);
this.txtInstallationNames.Text = WorkPostService.getWorkPostNamesWorkPostIds(plan.WorkPostId);
this.txtUnitName.Text = UnitService.getUnitNamesUnitIds(plan.UnitIds);
var testPlanTraining = from x in db.Training_PlanItem
join y in db.Training_Training on x.TrainingEduId equals y.TrainingId
where x.PlanId == planId
orderby y.TrainingCode
select y.TrainingName;
foreach (var item in testPlanTraining)
{
this.txtTrainingEdu.Text += item + "";
}
}
}
}
}
#endregion
}
}