移交,管道和仪表数据导入顺序不变
This commit is contained in:
@@ -51,6 +51,7 @@ namespace FineUIPro.Web.Transfer
|
||||
var model = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
txtSN.Text = model.SN.ToString();
|
||||
txtINSTRUMENTATION.Text = model.INSTRUMENTATION;
|
||||
txtSystemName.Text = model.SystemName;
|
||||
txtSubsystem.Text = model.Subsystem;
|
||||
@@ -64,6 +65,14 @@ namespace FineUIPro.Web.Transfer
|
||||
txtDescriptions.Text = model.Descriptions;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var model = Funs.DB.Transfer_Instrumentation.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (model == null)
|
||||
txtSN.Text = "1001";
|
||||
else
|
||||
txtSN.Text = (model.SN + 1).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +80,7 @@ namespace FineUIPro.Web.Transfer
|
||||
{
|
||||
var model = new Model.Transfer_Instrumentation
|
||||
{
|
||||
SN = Convert.ToInt32(txtSN.Text),
|
||||
ProjectId = ProjectId,
|
||||
INSTRUMENTATION = txtINSTRUMENTATION.Text,
|
||||
SystemName = txtSystemName.Text,
|
||||
@@ -118,6 +128,7 @@ namespace FineUIPro.Web.Transfer
|
||||
var newModel = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.Id == Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.SN = model.SN;
|
||||
newModel.INSTRUMENTATION = txtINSTRUMENTATION.Text;
|
||||
newModel.SystemName = txtSystemName.Text;
|
||||
newModel.Subsystem = txtSubsystem.Text;
|
||||
|
||||
Reference in New Issue
Block a user