From 01a9f8557b59498ac16a3a722a8bbe20047bca5a Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Sat, 20 May 2023 18:22:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/BaseInfo/TrainTypeService.cs | 2 +
SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx | 18 ++++-
SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs | 43 ++++++++++-
.../BaseInfo/TrainType.aspx.designer.cs | 76 ++++++++++++-------
SGGL/FineUIPro.Web/ErrLog.txt | 18 +++++
5 files changed, 127 insertions(+), 30 deletions(-)
diff --git a/SGGL/BLL/BaseInfo/TrainTypeService.cs b/SGGL/BLL/BaseInfo/TrainTypeService.cs
index 565c5267..1d38810a 100644
--- a/SGGL/BLL/BaseInfo/TrainTypeService.cs
+++ b/SGGL/BLL/BaseInfo/TrainTypeService.cs
@@ -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;
diff --git a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx
index 321baddd..8953960b 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx
+++ b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx
@@ -24,6 +24,14 @@
+
+
+
+
+
+
+
@@ -59,6 +67,12 @@
+
+
+
+
+
@@ -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('保存数据(编辑)');
diff --git a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs
index 5800442c..ef439c5f 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs
+++ b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.cs
@@ -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 格式化字符串
+ ///
+ /// 格式化字符串
+ ///
+ ///
+ ///
+ 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
///
/// 设置培训题型设置
///
diff --git a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs
index f483866a..dcfd6454 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/BaseInfo/TrainType.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.BaseInfo {
-
-
- public partial class TrainType {
-
+namespace FineUIPro.Web.BaseInfo
+{
+
+
+ public partial class TrainType
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -47,7 +49,16 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
///
/// ToolbarSeparator1 控件。
///
@@ -56,7 +67,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
-
+
///
/// ToolbarText1 控件。
///
@@ -65,7 +76,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// SimpleForm1 控件。
///
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.SimpleForm SimpleForm1;
-
+
///
/// hfFormID 控件。
///
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hfFormID;
-
+
///
/// txtTrainTypeCode 控件。
///
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtTrainTypeCode;
-
+
///
/// txtTrainTypeName 控件。
///
@@ -110,7 +121,16 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtTrainTypeName;
-
+
+ ///
+ /// drpTrainType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpTrainType;
+
///
/// ckbIsAboutSendCard 控件。
///
@@ -119,7 +139,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.CheckBox ckbIsAboutSendCard;
-
+
///
/// ckbIsRepeat 控件。
///
@@ -128,7 +148,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.CheckBox ckbIsRepeat;
-
+
///
/// txtRemark 控件。
///
@@ -137,7 +157,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtRemark;
-
+
///
/// Toolbar1 控件。
///
@@ -146,7 +166,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// btnNew 控件。
///
@@ -155,7 +175,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnDelete 控件。
///
@@ -164,7 +184,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnDelete;
-
+
///
/// ToolbarFill1 控件。
///
@@ -173,7 +193,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// btnSave 控件。
///
@@ -182,7 +202,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// Window1 控件。
///
@@ -191,7 +211,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Menu1 控件。
///
@@ -200,7 +220,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuEdit 控件。
///
@@ -209,7 +229,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuEdit;
-
+
///
/// btnMenuDelete 控件。
///
@@ -218,7 +238,7 @@ namespace FineUIPro.Web.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuDelete;
-
+
///
/// btnMenuSet 控件。
///
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index 4183116f..812532a3 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -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
+