移交子表补充排序序号SN

This commit is contained in:
夏菊 2024-12-14 10:27:27 +08:00
parent ea336ebf21
commit 51d20396ea
30 changed files with 381 additions and 26 deletions

View File

@ -1,18 +0,0 @@
--SUBQHSE_V2024-12-10-xiaj
--1SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Piping' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Piping ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--2SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Instrumentation' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Instrumentation ADD SN INT NOT NULL DEFAULT 1000;
END
GO

View File

@ -0,0 +1,61 @@
--SUBQHSE_V2024-12-10-xiaj
--1SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Piping' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Piping ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--2SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Instrumentation' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Instrumentation ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--3SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_StaticEquipment' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_StaticEquipment ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--4SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_RotatingEquipment' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_RotatingEquipment ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--5SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Electrical' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Electrical ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--6SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Civil_Structure' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Civil_Structure ADD SN INT NOT NULL DEFAULT 1000;
END
GO
--7SN序列号
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Transfer_Telecom' AND COLUMN_NAME = 'SN')
BEGIN
ALTER TABLE Transfer_Telecom ADD SN INT NOT NULL DEFAULT 1000;
END
GO

View File

@ -225,7 +225,7 @@
EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true">
<Columns>
<f:BoundField TextAlign="Center" ColumnID="Sub_Sys_No" DataField="Sub_Sys_No" HeaderText="Turnover<br/>System<br/>Code" Width="140px" />
<f:BoundField TextAlign="Center" ColumnID="Sub_Sys_No" DataField="Sub_Sys_No" HeaderText="Turnover<br/>System<br/>Code" Width="180px" />
<f:GroupField HeaderText="总体情况" TextAlign="Center" >
<Columns>

View File

@ -496,7 +496,7 @@ where f.ProjectId = @ProjectId ";
float allcount = (list1.Count + list1.Count + list2.Count + list3.Count + list4.Count +
list5.Count + list6.Count + list8.Count);//list7.Count +
float allScount = (list1.Where(x => x.FINALStatus == "Completed").ToList().Count
float allScount = (list1.Where(x => x.PressureTestCompleted == "Completed").ToList().Count
+ list1.Where(x => x.Reduction == "Completed").ToList().Count
+ list2.Where(x => x.MechanicalFINALStatus == "Completed").ToList().Count
+ list3.Where(x => x.MechanicalFINALStatus == "Completed").ToList().Count

View File

@ -15,7 +15,8 @@
<items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" OnSort="Grid1_Sort"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SN"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true">
<toolbars>

View File

@ -306,6 +306,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_Civil_Structure.Where(x => x.ProjectId == CurrUser.LoginProjectId).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn == 0)
{
Sn = 1000;
}
else
{
Sn = snModel.SN;
}
if (pds != null && ir > 0)
{
List<Model.Transfer_Civil_Structure> list = new List<Model.Transfer_Civil_Structure>();
@ -323,6 +334,10 @@ namespace FineUIPro.Web.Transfer
model.Descriptions= pds.Rows[i][1].ToString().Trim();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.Civil_Structure = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][2].ToString().Trim();
model.Subsystem = pds.Rows[i][3].ToString().Trim();

View File

@ -19,6 +19,8 @@
<f:TextBox ID="txtCivil_Structure" runat="server" Label="Tag.No" LabelAlign="Right"
LabelWidth="180px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:NumberBox ID="txtSN" NoDecimal="true" ShowTrigger="false" runat="server" Label="SN" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>

View File

@ -50,6 +50,7 @@ namespace FineUIPro.Web.Transfer
var model = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Id == Id);
if (model != null)
{
txtSN.Text = model.SN.ToString();
txtCivil_Structure.Text = model.Civil_Structure;
txtSystemName.Text = model.SystemName;
txtSubsystem.Text = model.Subsystem;
@ -66,6 +67,14 @@ namespace FineUIPro.Web.Transfer
txtDescriptions.Text = model.Descriptions;
}
}
else
{
var model = Funs.DB.Transfer_Civil_Structure.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
if (model == null)
txtSN.Text = "1001";
else
txtSN.Text = (model.SN + 1).ToString();
}
}
}
@ -73,6 +82,7 @@ namespace FineUIPro.Web.Transfer
{
var model = new Model.Transfer_Civil_Structure
{
SN = Convert.ToInt32(txtSN.Text),
ProjectId = ProjectId,
Civil_Structure = txtCivil_Structure.Text,
SystemName = txtSystemName.Text,
@ -120,11 +130,13 @@ namespace FineUIPro.Web.Transfer
}
#endregion
if (!string.IsNullOrEmpty(Id))
{
var newModel = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Id == Id);
if (newModel != null)
{
newModel.SN = model.SN;
newModel.Civil_Structure = txtCivil_Structure.Text;
newModel.SystemName = txtSystemName.Text;
newModel.Subsystem = txtSubsystem.Text;

View File

@ -50,6 +50,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtCivil_Structure;
/// <summary>
/// txtSN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSN;
/// <summary>
/// txtSystemName 控件。
/// </summary>

View File

@ -15,7 +15,8 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" OnSort="Grid1_Sort"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SN"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true">
<Toolbars>

View File

@ -305,6 +305,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_Electrical.Where(x => x.ProjectId == CurrUser.LoginProjectId).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn == 0)
{
Sn = 1000;
}
else
{
Sn = snModel.SN;
}
if (pds != null && ir > 0)
{
List<Model.Transfer_Electrical> list = new List<Model.Transfer_Electrical>();
@ -321,6 +332,10 @@ namespace FineUIPro.Web.Transfer
model.Descriptions= pds.Rows[i][1].ToString().Trim();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.ELECTRICAL = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1+1].ToString().Trim();
model.Subsystem = pds.Rows[i][2 + 1].ToString().Trim();

View File

@ -19,6 +19,8 @@
<f:TextBox ID="txtELECTRICAL" runat="server" Label="Tag No" LabelAlign="Right"
LabelWidth="180px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:NumberBox ID="txtSN" NoDecimal="true" ShowTrigger="false" runat="server" Label="SN" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>

View File

@ -51,6 +51,7 @@ namespace FineUIPro.Web.Transfer
var model = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.Id == Id);
if (model != null)
{
txtSN.Text = model.SN.ToString();
txtELECTRICAL.Text = model.ELECTRICAL;
txtSystemName.Text = model.SystemName;
txtSubsystem.Text = model.Subsystem;
@ -62,6 +63,14 @@ namespace FineUIPro.Web.Transfer
txtDescriptions.Text = model.Descriptions;
}
}
else
{
var model = Funs.DB.Transfer_Electrical.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
if (model == null)
txtSN.Text = "1001";
else
txtSN.Text = (model.SN + 1).ToString();
}
}
}
@ -69,6 +78,7 @@ namespace FineUIPro.Web.Transfer
{
var model = new Model.Transfer_Electrical
{
SN = Convert.ToInt32(txtSN.Text),
ProjectId = ProjectId,
ELECTRICAL = txtELECTRICAL.Text,
SystemName = txtSystemName.Text,
@ -107,11 +117,13 @@ namespace FineUIPro.Web.Transfer
}
#endregion
if (!string.IsNullOrEmpty(Id))
{
var newModel = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.Id == Id);
if (newModel != null)
{
newModel.SN = model.SN;
newModel.ELECTRICAL = txtELECTRICAL.Text;
newModel.SystemName = txtSystemName.Text;
newModel.Subsystem = txtSubsystem.Text;

View File

@ -50,6 +50,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtELECTRICAL;
/// <summary>
/// txtSN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSN;
/// <summary>
/// txtSystemName 控件。
/// </summary>

View File

@ -15,7 +15,7 @@
<items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="RotatingEquipment"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SN"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">

View File

@ -302,6 +302,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_RotatingEquipment.Where(x => x.ProjectId == CurrUser.LoginProjectId).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn == 0)
{
Sn = 1000;
}
else
{
Sn = snModel.SN;
}
if (pds != null && ir > 0)
{
List<Model.Transfer_RotatingEquipment> list = new List<Model.Transfer_RotatingEquipment>();
@ -317,6 +328,10 @@ namespace FineUIPro.Web.Transfer
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.RotatingEquipment = pds.Rows[i][0].ToString().Trim();
model.SYSTEM = pds.Rows[i][1+1].ToString().Trim();
model.Subsystem = pds.Rows[i][2 + 1].ToString().Trim();

View File

@ -19,6 +19,8 @@
<f:TextBox ID="txtRotatingEquipment" runat="server" Label="Tag No" LabelAlign="Right"
LabelWidth="180px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:NumberBox ID="txtSN" NoDecimal="true" ShowTrigger="false" runat="server" Label="SN" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>

View File

@ -50,6 +50,7 @@ namespace FineUIPro.Web.Transfer
var model = Funs.DB.Transfer_RotatingEquipment.FirstOrDefault(x => x.Id == Id);
if (model != null)
{
txtSN.Text = model.SN.ToString();
txtRotatingEquipment.Text = model.RotatingEquipment;
txtSYSTEM.Text = model.SYSTEM;
txtSubsystem.Text = model.Subsystem;
@ -61,6 +62,14 @@ namespace FineUIPro.Web.Transfer
txtDescriptions.Text = model.Descriptions;
}
}
else
{
var model = Funs.DB.Transfer_RotatingEquipment.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
if (model == null)
txtSN.Text = "1001";
else
txtSN.Text = (model.SN + 1).ToString();
}
}
}
@ -68,6 +77,7 @@ namespace FineUIPro.Web.Transfer
{
var model = new Model.Transfer_RotatingEquipment
{
SN = Convert.ToInt32(txtSN.Text),
ProjectId = ProjectId,
RotatingEquipment = txtRotatingEquipment.Text,
SYSTEM = txtSYSTEM.Text,
@ -104,11 +114,13 @@ namespace FineUIPro.Web.Transfer
}
#endregion
if (!string.IsNullOrEmpty(Id))
{
var newModel = Funs.DB.Transfer_RotatingEquipment.FirstOrDefault(x => x.Id == Id);
if (newModel != null)
{
newModel.SN = model.SN;
newModel.RotatingEquipment = txtRotatingEquipment.Text;
newModel.SYSTEM = txtSYSTEM.Text;
newModel.Subsystem = txtSubsystem.Text;

View File

@ -50,6 +50,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtRotatingEquipment;
/// <summary>
/// txtSN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSN;
/// <summary>
/// txtSYSTEM 控件。
/// </summary>

View File

@ -15,7 +15,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="StaticEquipment"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SN"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">

View File

@ -302,6 +302,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_StaticEquipment.Where(x => x.ProjectId == CurrUser.LoginProjectId).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn == 0)
{
Sn = 1000;
}
else
{
Sn = snModel.SN;
}
if (pds != null && ir > 0)
{
List<Model.Transfer_StaticEquipment> list = new List<Model.Transfer_StaticEquipment>();
@ -316,6 +327,10 @@ namespace FineUIPro.Web.Transfer
model.Descriptions= pds.Rows[i][1].ToString().Trim();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.StaticEquipment = pds.Rows[i][0].ToString().Trim();
model.SYSTEM = pds.Rows[i][1+1].ToString().Trim();
model.Subsystem = pds.Rows[i][2 + 1].ToString().Trim();

View File

@ -19,6 +19,8 @@
<f:TextBox ID="txtStaticEquipment" runat="server" Label="Tag No" LabelAlign="Right"
LabelWidth="180px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:NumberBox ID="txtSN" NoDecimal="true" ShowTrigger="false" runat="server" Label="SN" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>

View File

@ -51,6 +51,7 @@ namespace FineUIPro.Web.Transfer
var model = Funs.DB.Transfer_StaticEquipment.FirstOrDefault(x => x.Id == Id);
if (model != null)
{
txtSN.Text = model.SN.ToString();
txtStaticEquipment.Text = model.StaticEquipment;
txtSYSTEM.Text = model.SYSTEM;
txtSubsystem.Text = model.Subsystem;
@ -61,6 +62,14 @@ namespace FineUIPro.Web.Transfer
txtDescriptions.Text = model.Descriptions;
}
}
else
{
var model = Funs.DB.Transfer_StaticEquipment.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
if (model == null)
txtSN.Text = "1001";
else
txtSN.Text = (model.SN + 1).ToString();
}
}
}
@ -68,6 +77,7 @@ namespace FineUIPro.Web.Transfer
{
var model = new Model.Transfer_StaticEquipment
{
SN = Convert.ToInt32(txtSN.Text),
ProjectId = ProjectId,
StaticEquipment = txtStaticEquipment.Text,
SYSTEM = txtSYSTEM.Text,
@ -103,12 +113,14 @@ namespace FineUIPro.Web.Transfer
}
#endregion
if (!string.IsNullOrEmpty(Id))
{
var newModel = Funs.DB.Transfer_StaticEquipment.FirstOrDefault(x => x.Id == Id);
if (newModel != null)
{
newModel.StaticEquipment = txtStaticEquipment.Text;
newModel.SN = model.SN;
newModel.SYSTEM = txtSYSTEM.Text;
newModel.Subsystem = txtSubsystem.Text;
newModel.TestPackage = txtTestPackage.Text;

View File

@ -50,6 +50,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtStaticEquipment;
/// <summary>
/// txtSN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSN;
/// <summary>
/// txtSYSTEM 控件。
/// </summary>

View File

@ -15,7 +15,8 @@
<items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" OnSort="Grid1_Sort"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SN"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true">
<toolbars>

View File

@ -306,6 +306,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_Telecom.Where(x => x.ProjectId == CurrUser.LoginProjectId).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn == 0)
{
Sn = 1000;
}
else
{
Sn = snModel.SN;
}
if (pds != null && ir > 0)
{
List<Model.Transfer_Telecom> list = new List<Model.Transfer_Telecom>();
@ -322,6 +333,10 @@ namespace FineUIPro.Web.Transfer
model.Descriptions = pds.Rows[i][1].ToString().Trim();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.Telecom = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1+1].ToString().Trim();
model.Subsystem = pds.Rows[i][2 + 1].ToString().Trim();

View File

@ -19,6 +19,8 @@
<f:TextBox ID="txtTelecom" runat="server" Label="Tag.No" LabelAlign="Right"
LabelWidth="180px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:NumberBox ID="txtSN" NoDecimal="true" ShowTrigger="false" runat="server" Label="SN" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>

View File

@ -50,6 +50,7 @@ namespace FineUIPro.Web.Transfer
var model = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Id == Id);
if (model != null)
{
txtSN.Text = model.SN.ToString();
txtTelecom.Text = model.Telecom;
txtSystemName.Text = model.SystemName;
txtSubsystem.Text = model.Subsystem;
@ -61,6 +62,14 @@ namespace FineUIPro.Web.Transfer
txtDescriptions.Text = model.Descriptions;
}
}
else
{
var model = Funs.DB.Transfer_Telecom.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
if (model == null)
txtSN.Text = "1001";
else
txtSN.Text = (model.SN + 1).ToString();
}
}
}
@ -68,6 +77,7 @@ namespace FineUIPro.Web.Transfer
{
var model = new Model.Transfer_Telecom
{
SN = Convert.ToInt32(txtSN.Text),
ProjectId = ProjectId,
Telecom = txtTelecom.Text,
SystemName = txtSystemName.Text,
@ -78,7 +88,6 @@ namespace FineUIPro.Web.Transfer
CableLaying = ddlCableLaying.SelectedValue,
FunctionTest = ddlFunctionTest.SelectedValue,
Descriptions= txtDescriptions.Text,
};
#region
@ -105,11 +114,13 @@ namespace FineUIPro.Web.Transfer
}
#endregion
if (!string.IsNullOrEmpty(Id))
{
var newModel = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Id == Id);
if (newModel != null)
{
newModel.SN = model.SN;
newModel.Telecom = txtTelecom.Text;
newModel.SystemName = txtSystemName.Text;
newModel.Subsystem = txtSubsystem.Text;

View File

@ -50,6 +50,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtTelecom;
/// <summary>
/// txtSN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSN;
/// <summary>
/// txtSystemName 控件。
/// </summary>

View File

@ -394514,6 +394514,8 @@ namespace Model
private string _Descriptions;
private int _SN;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -394556,6 +394558,8 @@ namespace Model
partial void OnHVACChanged();
partial void OnDescriptionsChanging(string value);
partial void OnDescriptionsChanged();
partial void OnSNChanging(int value);
partial void OnSNChanged();
#endregion
public Transfer_Civil_Structure()
@ -394943,6 +394947,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SN", DbType="Int NOT NULL")]
public int SN
{
get
{
return this._SN;
}
set
{
if ((this._SN != value))
{
this.OnSNChanging(value);
this.SendPropertyChanging();
this._SN = value;
this.SendPropertyChanged("SN");
this.OnSNChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -395000,6 +395024,8 @@ namespace Model
private string _Descriptions;
private int _SN;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -395034,6 +395060,8 @@ namespace Model
partial void OnLoopTestChanged();
partial void OnDescriptionsChanging(string value);
partial void OnDescriptionsChanged();
partial void OnSNChanging(int value);
partial void OnSNChanged();
#endregion
public Transfer_Electrical()
@ -395341,6 +395369,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SN", DbType="Int NOT NULL")]
public int SN
{
get
{
return this._SN;
}
set
{
if ((this._SN != value))
{
this.OnSNChanging(value);
this.SendPropertyChanging();
this._SN = value;
this.SendPropertyChanged("SN");
this.OnSNChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -399470,6 +399518,8 @@ namespace Model
private string _Lubricatefilling;
private int _SN;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -399504,6 +399554,8 @@ namespace Model
partial void OnDescriptionsChanged();
partial void OnLubricatefillingChanging(string value);
partial void OnLubricatefillingChanged();
partial void OnSNChanging(int value);
partial void OnSNChanged();
#endregion
public Transfer_RotatingEquipment()
@ -399811,6 +399863,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SN", DbType="Int NOT NULL")]
public int SN
{
get
{
return this._SN;
}
set
{
if ((this._SN != value))
{
this.OnSNChanging(value);
this.SendPropertyChanging();
this._SN = value;
this.SendPropertyChanged("SN");
this.OnSNChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -399866,6 +399938,8 @@ namespace Model
private string _Descriptions;
private int _SN;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -399898,6 +399972,8 @@ namespace Model
partial void OnBOXupRecordChanged();
partial void OnDescriptionsChanging(string value);
partial void OnDescriptionsChanged();
partial void OnSNChanging(int value);
partial void OnSNChanged();
#endregion
public Transfer_StaticEquipment()
@ -400185,6 +400261,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SN", DbType="Int NOT NULL")]
public int SN
{
get
{
return this._SN;
}
set
{
if ((this._SN != value))
{
this.OnSNChanging(value);
this.SendPropertyChanging();
this._SN = value;
this.SendPropertyChanged("SN");
this.OnSNChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -400846,6 +400942,8 @@ namespace Model
private string _Descriptions;
private int _SN;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -400880,6 +400978,8 @@ namespace Model
partial void OnFunctionTestChanged();
partial void OnDescriptionsChanging(string value);
partial void OnDescriptionsChanged();
partial void OnSNChanging(int value);
partial void OnSNChanged();
#endregion
public Transfer_Telecom()
@ -401187,6 +401287,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SN", DbType="Int NOT NULL")]
public int SN
{
get
{
return this._SN;
}
set
{
if ((this._SN != value))
{
this.OnSNChanging(value);
this.SendPropertyChanging();
this._SN = value;
this.SendPropertyChanged("SN");
this.OnSNChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;