99 lines
2.8 KiB
C#
99 lines
2.8 KiB
C#
using BLL;
|
|
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web.UI.WebControls;
|
|
using AspNet = System.Web.UI.WebControls;
|
|
|
|
namespace FineUIPro.Web.CQMS.Train
|
|
{
|
|
public partial class TrainPlanView : PageBase
|
|
{
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
public string TrainPlanId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["TrainPlanId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["TrainPlanId"] = value;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 办理类型
|
|
/// </summary>
|
|
public string State
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["State"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["State"] = value;
|
|
}
|
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
TrainPlanId = Request.Params["TrainPlanId"];
|
|
BLL.CQMSTrainObjectService.InitTrainObjectDropDownList(this.drpPlanTrainPersons, true);
|
|
BLL.CQMSTrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
|
|
if (!string.IsNullOrEmpty(TrainPlanId))
|
|
{
|
|
Model.Train_TrainPlan TrainPlan = BLL.CQMS_TrainPlanService.GetTrainPlanByTrainPlanId(TrainPlanId);
|
|
if (!string.IsNullOrEmpty(TrainPlan.PlanTrainPersons))
|
|
{
|
|
this.drpPlanTrainPersons.SelectedValueArray = TrainPlan.PlanTrainPersons.Split(',');
|
|
}
|
|
if (!string.IsNullOrEmpty(TrainPlan.TrainTypeId))
|
|
{
|
|
this.drpTrainType.SelectedValue = TrainPlan.TrainTypeId;
|
|
}
|
|
if (TrainPlan.PlanTrainDate != null)
|
|
{
|
|
txtPlanTrainDate.Text = string.Format("{0:yyyy-MM-dd}", TrainPlan.PlanTrainDate);
|
|
}
|
|
this.txtTrainContent.Text = TrainPlan.TrainContent;
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 时间转换
|
|
/// </summary>
|
|
/// <param name="date"></param>
|
|
/// <returns></returns>
|
|
public string ConvertDate(object date)
|
|
{
|
|
if (date != null)
|
|
{
|
|
return string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(date));
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
} |