20260331 修改班组信息

This commit is contained in:
毕文静 2026-03-31 09:04:00 +08:00
parent 9af6e00b4a
commit f824035883
4 changed files with 25 additions and 25 deletions

View File

@ -47,7 +47,7 @@ namespace BLL
Model.Base_TeamGroup newTeamGroup = db.Base_TeamGroup.FirstOrDefault(e => e.TeamGroupId == teamGroup.TeamGroupId); Model.Base_TeamGroup newTeamGroup = db.Base_TeamGroup.FirstOrDefault(e => e.TeamGroupId == teamGroup.TeamGroupId);
if (newTeamGroup != null) if (newTeamGroup != null)
{ {
newTeamGroup.TeamGroupCode = teamGroup.TeamGroupCode; //newTeamGroup.TeamGroupCode = teamGroup.TeamGroupCode;
newTeamGroup.TeamGroupName = teamGroup.TeamGroupName; newTeamGroup.TeamGroupName = teamGroup.TeamGroupName;
newTeamGroup.IsUsed = teamGroup.IsUsed; newTeamGroup.IsUsed = teamGroup.IsUsed;
db.SubmitChanges(); db.SubmitChanges();

View File

@ -30,10 +30,10 @@
<Columns> <Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" <f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
TextAlign="Center" /> TextAlign="Center" />
<f:RenderField Width="150px" ColumnID="TeamGroupCode" DataField="TeamGroupCode" <%--<f:RenderField Width="150px" ColumnID="TeamGroupCode" DataField="TeamGroupCode"
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left" FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="TeamGroupCode"> SortField="TeamGroupCode">
</f:RenderField> </f:RenderField>--%>
<f:RenderField Width="300px" ColumnID="TeamGroupName" DataField="TeamGroupName" <f:RenderField Width="300px" ColumnID="TeamGroupName" DataField="TeamGroupName"
FieldType="String" HeaderText="班组名称" HeaderTextAlign="Center" TextAlign="Left" FieldType="String" HeaderText="班组名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="TeamGroupName" ExpandUnusedSpace="true"> SortField="TeamGroupName" ExpandUnusedSpace="true">
@ -62,9 +62,9 @@
<Items> <Items>
<f:HiddenField ID="hfFormID" runat="server"> <f:HiddenField ID="hfFormID" runat="server">
</f:HiddenField> </f:HiddenField>
<f:TextBox ID="txtTeamGroupCode" Label="编号" ShowRedStar="true" Required="true" runat="server" <%--<f:TextBox ID="txtTeamGroupCode" Label="编号" ShowRedStar="true" Required="true" runat="server"
LabelAlign="right" MaxLength="50"> LabelAlign="right" MaxLength="50">
</f:TextBox> </f:TextBox>--%>
<f:TextBox ID="txtTeamGroupName" Label="班组名称" ShowRedStar="true" Required="true" runat="server" <f:TextBox ID="txtTeamGroupName" Label="班组名称" ShowRedStar="true" Required="true" runat="server"
LabelAlign="right" MaxLength="50"> LabelAlign="right" MaxLength="50">
</f:TextBox> </f:TextBox>
@ -119,7 +119,7 @@
var formClientID = '<%= SimpleForm1.ClientID %>'; var formClientID = '<%= SimpleForm1.ClientID %>';
var hfFormIDClientID = '<%= hfFormID.ClientID %>'; var hfFormIDClientID = '<%= hfFormID.ClientID %>';
var txtTeamGroupCodeClientID = '<%= txtTeamGroupCode.ClientID %>'; <%--var txtTeamGroupCodeClientID = '<%= txtTeamGroupCode.ClientID %>';--%>
var txtTeamGroupNameClientID = '<%= txtTeamGroupName.ClientID %>'; var txtTeamGroupNameClientID = '<%= txtTeamGroupName.ClientID %>';
var cbIsUsedClientID = '<%= cbIsUsed.ClientID %>'; var cbIsUsedClientID = '<%= cbIsUsed.ClientID %>';
@ -134,7 +134,7 @@
// 使用当前行数据填充表单字段 // 使用当前行数据填充表单字段
F(hfFormIDClientID).setValue(rowId); F(hfFormIDClientID).setValue(rowId);
F(txtTeamGroupCodeClientID).setValue(rowValue['TeamGroupCode']); /*F(txtTeamGroupCodeClientID).setValue(rowValue['TeamGroupCode']);*/
F(txtTeamGroupNameClientID).setValue(rowValue['TeamGroupName']); F(txtTeamGroupNameClientID).setValue(rowValue['TeamGroupName']);
F(cbIsUsedClientID).setValue(rowValue['IsUsed']); F(cbIsUsedClientID).setValue(rowValue['IsUsed']);

View File

@ -1,4 +1,6 @@
using BLL; using BLL;
using FineUIPro.Web.common.BaseInfo;
using Org.BouncyCastle.Asn1.Pkcs;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@ -203,7 +205,7 @@ namespace FineUIPro.Web.WeldMat.BaseInfo
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return; return;
} }
this.txtTeamGroupCode.Text = string.Empty; //this.txtTeamGroupCode.Text = string.Empty;
this.txtTeamGroupName.Text = string.Empty; this.txtTeamGroupName.Text = string.Empty;
this.cbIsUsed.Checked = false; this.cbIsUsed.Checked = false;
@ -211,7 +213,7 @@ namespace FineUIPro.Web.WeldMat.BaseInfo
var teamGroup = BLL.Base_TeamGroupService.GetTeamGroupByTeamGroupId(Id); var teamGroup = BLL.Base_TeamGroupService.GetTeamGroupByTeamGroupId(Id);
if (teamGroup != null) if (teamGroup != null)
{ {
this.txtTeamGroupCode.Text = teamGroup.TeamGroupCode; //this.txtTeamGroupCode.Text = teamGroup.TeamGroupCode;
this.txtTeamGroupName.Text = teamGroup.TeamGroupName; this.txtTeamGroupName.Text = teamGroup.TeamGroupName;
if (teamGroup.IsUsed == true) if (teamGroup.IsUsed == true)
{ {
@ -240,17 +242,24 @@ namespace FineUIPro.Web.WeldMat.BaseInfo
return; return;
} }
Model.Base_TeamGroup teamGroup = new Model.Base_TeamGroup(); Model.Base_TeamGroup teamGroup = new Model.Base_TeamGroup();
teamGroup.TeamGroupCode = this.txtTeamGroupCode.Text.Trim();
teamGroup.TeamGroupName = this.txtTeamGroupName.Text.Trim(); teamGroup.TeamGroupName = this.txtTeamGroupName.Text.Trim();
teamGroup.IsUsed = this.cbIsUsed.Checked; teamGroup.IsUsed = this.cbIsUsed.Checked;
if (string.IsNullOrEmpty(strRowID)) if (string.IsNullOrEmpty(strRowID))
{ {
strRowID = SQLHelper.GetNewID(typeof(Model.Base_TeamGroup)); try
teamGroup.TeamGroupId = strRowID; {
BLL.Base_TeamGroupService.AddTeamGroup(teamGroup); teamGroup.TeamGroupCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Base_TeamGroup", "TeamGroupCode", "");
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加班组"); }
} catch (Exception)
{
teamGroup.TeamGroupCode = "";
}
strRowID = SQLHelper.GetNewID(typeof(Model.Base_TeamGroup));
teamGroup.TeamGroupId = strRowID;
BLL.Base_TeamGroupService.AddTeamGroup(teamGroup);
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加班组");
}
else else
{ {
teamGroup.TeamGroupId = strRowID; teamGroup.TeamGroupId = strRowID;

View File

@ -113,15 +113,6 @@ namespace FineUIPro.Web.WeldMat.BaseInfo
/// </remarks> /// </remarks>
protected global::FineUIPro.HiddenField hfFormID; protected global::FineUIPro.HiddenField hfFormID;
/// <summary>
/// txtTeamGroupCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamGroupCode;
/// <summary> /// <summary>
/// txtTeamGroupName 控件。 /// txtTeamGroupName 控件。
/// </summary> /// </summary>