移交子表补充排序序号SN
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user