2024-11-19 09:45:27 +08:00
|
|
|
|
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)
|
|
|
|
|
{
|
2025-08-04 18:04:41 +08:00
|
|
|
|
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
2024-11-19 09:45:27 +08:00
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|