移交,管道和仪表数据导入顺序不变
This commit is contained in:
@@ -50,6 +50,7 @@ namespace FineUIPro.Web.Transfer
|
||||
var model = Funs.DB.Transfer_Piping.FirstOrDefault(x => x.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
txtSN.Text = model.SN.ToString();
|
||||
txtPIPINGLINENUMBER.Text = model.PIPINGLINENUMBER;
|
||||
txtSYSTEM.Text = model.SYSTEM;
|
||||
txtSubsystem.Text = model.Subsystem;
|
||||
@@ -76,6 +77,14 @@ namespace FineUIPro.Web.Transfer
|
||||
ddlInsulation.SelectedValue = model.Insulation;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var model = Funs.DB.Transfer_Piping.OrderByDescending(x => x.SN).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (model == null)
|
||||
txtSN.Text = "1001";
|
||||
else
|
||||
txtSN.Text = (model.SN + 1).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +92,7 @@ namespace FineUIPro.Web.Transfer
|
||||
{
|
||||
var model = new Model.Transfer_Piping()
|
||||
{
|
||||
SN = Convert.ToInt32(txtSN.Text),
|
||||
ProjectId = ProjectId,
|
||||
PIPINGLINENUMBER = txtPIPINGLINENUMBER.Text,
|
||||
SYSTEM = txtSYSTEM.Text,
|
||||
@@ -154,6 +164,7 @@ namespace FineUIPro.Web.Transfer
|
||||
if (!string.IsNullOrEmpty(Id))
|
||||
{
|
||||
var newModel = Funs.DB.Transfer_Piping.FirstOrDefault(x => x.Id == Id);
|
||||
newModel.SN = model.SN;
|
||||
newModel.PIPINGLINENUMBER = model.PIPINGLINENUMBER;
|
||||
newModel.SYSTEM = model.SYSTEM;
|
||||
newModel.Subsystem = newModel.Subsystem;
|
||||
|
||||
Reference in New Issue
Block a user