培训类型
This commit is contained in:
parent
ec4b8265ea
commit
01a9f8557b
|
@ -34,6 +34,7 @@ namespace BLL
|
|||
TrainTypeId = trainType.TrainTypeId,
|
||||
TrainTypeCode = trainType.TrainTypeCode,
|
||||
TrainTypeName = trainType.TrainTypeName,
|
||||
TrainType = trainType.TrainType,
|
||||
Remark = trainType.Remark,
|
||||
IsAboutSendCard = trainType.IsAboutSendCard,
|
||||
IsRepeat = trainType.IsRepeat
|
||||
|
@ -54,6 +55,7 @@ namespace BLL
|
|||
{
|
||||
newTrainType.TrainTypeCode = trainType.TrainTypeCode;
|
||||
newTrainType.TrainTypeName = trainType.TrainTypeName;
|
||||
newTrainType.TrainType = trainType.TrainType;
|
||||
newTrainType.Remark = trainType.Remark;
|
||||
newTrainType.IsAboutSendCard = trainType.IsAboutSendCard;
|
||||
newTrainType.IsRepeat = trainType.IsRepeat;
|
||||
|
|
|
@ -24,6 +24,14 @@
|
|||
<f:RenderField Width="250px" ColumnID="TrainTypeName" DataField="TrainTypeName" FieldType="String"
|
||||
HeaderText="名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="10px" ColumnID="TrainType" DataField="TrainType" FieldType="String"
|
||||
HeaderText="类别" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="120px" HeaderText="类别" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertTrainType(Eval("TrainType")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="80px" ColumnID="IsAboutSendCard" DataField="IsAboutSendCard" FieldType="Boolean"
|
||||
RendererFunction="renderIsOrNo" HeaderText="关联发卡" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
@ -59,6 +67,12 @@
|
|||
<f:TextBox ID="txtTrainTypeName" Label="名称" ShowRedStar="true" Required="true" runat="server"
|
||||
LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpTrainType" runat="server" Label="类别" LabelAlign="Right" Required="true"
|
||||
ShowRedStar="true" LabelWidth="100px">
|
||||
<f:ListItem Value="1" Text="三级安全教育培训" />
|
||||
<f:ListItem Value="2" Text="专项培训" />
|
||||
<f:ListItem Value="3" Text="特种作业培训" />
|
||||
</f:DropDownList>
|
||||
<f:CheckBox ID="ckbIsAboutSendCard" runat="server" Label="关联发卡" LabelAlign="right" LabelWidth="100px">
|
||||
</f:CheckBox>
|
||||
<f:CheckBox ID="ckbIsRepeat" runat="server" Label="多次培训" LabelAlign="right" LabelWidth="100px">
|
||||
|
@ -131,6 +145,7 @@
|
|||
var ckbIsAboutSendCardClientID = '<%= ckbIsAboutSendCard.ClientID %>';
|
||||
var ckbIsRepeatClientID = '<%= ckbIsRepeat.ClientID %>';
|
||||
var txtRemarkClientID = '<%=txtRemark.ClientID %>';
|
||||
var drpTrainTypeClientID = '<%=drpTrainType.ClientID %>';
|
||||
|
||||
function onGridRowSelect(event, rowId) {
|
||||
var grid = F(gridClientID);
|
||||
|
@ -140,7 +155,7 @@
|
|||
|
||||
// 当前行数据
|
||||
var rowValue = grid.getRowValue(rowId);
|
||||
|
||||
debugger
|
||||
// 使用当前行数据填充表单字段
|
||||
F(hfFormIDClientID).setValue(rowId);
|
||||
F(txtCodeClientID).setValue(rowValue['TrainTypeCode']);
|
||||
|
@ -148,6 +163,7 @@
|
|||
F(ckbIsAboutSendCardClientID).setValue(rowValue['IsAboutSendCard']);
|
||||
F(ckbIsRepeatClientID).setValue(rowValue['IsRepeat']);
|
||||
F(txtRemarkClientID).setValue(rowValue['Remark']);
|
||||
F(drpTrainTypeClientID).setValue(rowValue['TrainType']);
|
||||
|
||||
// 更新保存按钮文本
|
||||
// F(btnSaveClientID).setText('保存数据(编辑)');
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace FineUIPro.Web.BaseInfo
|
|||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
Funs.FineUIPleaseSelect(this.drpTrainType);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
@ -159,6 +160,15 @@ namespace FineUIPro.Web.BaseInfo
|
|||
{
|
||||
this.txtTrainTypeCode.Text = trainType.TrainTypeCode;
|
||||
this.txtTrainTypeName.Text = trainType.TrainTypeName;
|
||||
if (!string.IsNullOrEmpty(trainType.TrainType))
|
||||
{
|
||||
this.drpTrainType.SelectedValue = trainType.TrainType;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpTrainType.SelectedIndex = 0;
|
||||
|
||||
}
|
||||
if (trainType.IsAboutSendCard == true)
|
||||
{
|
||||
this.ckbIsAboutSendCard.Checked = true;
|
||||
|
@ -210,6 +220,10 @@ namespace FineUIPro.Web.BaseInfo
|
|||
{
|
||||
newTrainType.IsRepeat = false;
|
||||
}
|
||||
if (this.drpTrainType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newTrainType.TrainType = this.drpTrainType.SelectedValue;
|
||||
}
|
||||
newTrainType.Remark = txtRemark.Text.Trim();
|
||||
if (string.IsNullOrEmpty(strRowID))
|
||||
{
|
||||
|
@ -316,7 +330,34 @@ namespace FineUIPro.Web.BaseInfo
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#region 格式化字符串
|
||||
/// <summary>
|
||||
/// 格式化字符串
|
||||
/// </summary>
|
||||
/// <param name="WorkStage"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertTrainType(object TrainType)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (TrainType != null)
|
||||
{
|
||||
string trainType = TrainType.ToString().Trim();
|
||||
if (trainType == "1")
|
||||
{
|
||||
name = "三级安全教育培训";
|
||||
}
|
||||
else if (trainType == "2")
|
||||
{
|
||||
name = "专项培训";
|
||||
}
|
||||
if (trainType == "3")
|
||||
{
|
||||
name = "特种作业培训";
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 设置培训题型设置
|
||||
/// </summary>
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo {
|
||||
|
||||
|
||||
public partial class TrainType {
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -20,7 +22,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -29,7 +31,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
|
@ -38,7 +40,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -47,7 +49,16 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
@ -56,7 +67,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
@ -65,7 +76,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
|
@ -74,7 +85,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
|
@ -83,7 +94,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hfFormID 控件。
|
||||
/// </summary>
|
||||
|
@ -92,7 +103,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hfFormID;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrainTypeCode 控件。
|
||||
/// </summary>
|
||||
|
@ -101,7 +112,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainTypeCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrainTypeName 控件。
|
||||
/// </summary>
|
||||
|
@ -110,7 +121,16 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrainTypeName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpTrainType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTrainType;
|
||||
|
||||
/// <summary>
|
||||
/// ckbIsAboutSendCard 控件。
|
||||
/// </summary>
|
||||
|
@ -119,7 +139,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckbIsAboutSendCard;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ckbIsRepeat 控件。
|
||||
/// </summary>
|
||||
|
@ -128,7 +148,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckbIsRepeat;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
|
@ -137,7 +157,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
@ -146,7 +166,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
@ -155,7 +175,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
|
@ -164,7 +184,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
@ -173,7 +193,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
@ -182,7 +202,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
@ -191,7 +211,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
@ -200,7 +220,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
|
@ -209,7 +229,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
|
@ -218,7 +238,7 @@ namespace FineUIPro.Web.BaseInfo {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuSet 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1309,3 +1309,21 @@ IP地址:::1
|
|||
|
||||
出错时间:05/06/2023 17:32:50
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:NullReferenceException
|
||||
错误信息:未将对象引用设置到对象的实例。
|
||||
错误堆栈:
|
||||
在 FineUIPro.Web.index.Page_Init(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\index.aspx.cs:行号 58
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnInit(EventArgs e)
|
||||
在 System.Web.UI.Page.OnInit(EventArgs e)
|
||||
在 FineUIPro.Web.PageBase.OnInit(EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\common\PageBase.cs:行号 170
|
||||
在 System.Web.UI.Control.InitRecursive(Control namingContainer)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/19/2023 16:50:20
|
||||
出错文件:http://localhost:1295/index.aspx
|
||||
IP地址:::1
|
||||
|
||||
出错时间:05/19/2023 16:50:21
|
||||
|
||||
|
|
Loading…
Reference in New Issue