@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Service_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Travel_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work_apply" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CheckStatus" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Createtime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -246,15 +246,28 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Edu_ApplyEntityTmp = GetPurchase_Edu_ApplyEntity(keyValue); | |||
var Purchase_Edu_ApplydetailsEntityTmp = GetPurchase_Edu_ApplydetailsEntity(Purchase_Edu_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Edu_ApplydetailsEntity>(t=>t.applyid == Purchase_Edu_ApplyEntityTmp.Id); | |||
foreach (Purchase_Edu_ApplydetailsEntity item in Purchase_Edu_ApplydetailsList) | |||
var Purchase_Edu_ApplydetailsEntityTmp = GetPurchase_Edu_ApplydetailsEntity(Purchase_Edu_ApplyEntityTmp.Id); | |||
if (entity.Status==0&&entity.CheckStatus==0&&entity.Approvalamount!=0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Edu_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Edu_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Edu_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Edu_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Edu_ApplydetailsEntity>(t => t.applyid == Purchase_Edu_ApplyEntityTmp.Id); | |||
foreach (Purchase_Edu_ApplydetailsEntity item in Purchase_Edu_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Edu_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Info_ApplyEntityTmp = GetPurchase_Info_ApplyEntity(keyValue); | |||
var Purchase_Info_ApplydetailsEntityTmp = GetPurchase_Info_ApplydetailsEntity(Purchase_Info_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Info_ApplydetailsEntity>(t=>t.applyid == Purchase_Info_ApplyEntityTmp.Id); | |||
foreach (Purchase_Info_ApplydetailsEntity item in Purchase_Info_ApplydetailsList) | |||
var Purchase_Info_ApplydetailsEntityTmp = GetPurchase_Info_ApplydetailsEntity(Purchase_Info_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Info_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Info_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Info_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Info_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Info_ApplydetailsEntity>(t => t.applyid == Purchase_Info_ApplyEntityTmp.Id); | |||
foreach (Purchase_Info_ApplydetailsEntity item in Purchase_Info_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Info_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Logistic_ApplyEntityTmp = GetPurchase_Logistic_ApplyEntity(keyValue); | |||
var Purchase_Logistic_ApplydetailsEntityTmp = GetPurchase_Logistic_ApplydetailsEntity(Purchase_Logistic_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Logistic_ApplydetailsEntity>(t=>t.applyid == Purchase_Logistic_ApplyEntityTmp.Id); | |||
foreach (Purchase_Logistic_ApplydetailsEntity item in Purchase_Logistic_ApplydetailsList) | |||
var Purchase_Logistic_ApplydetailsEntityTmp = GetPurchase_Logistic_ApplydetailsEntity(Purchase_Logistic_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Logistic_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Logistic_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Logistic_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Logistic_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Logistic_ApplydetailsEntity>(t => t.applyid == Purchase_Logistic_ApplyEntityTmp.Id); | |||
foreach (Purchase_Logistic_ApplydetailsEntity item in Purchase_Logistic_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Logistic_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Other_ApplyEntityTmp = GetPurchase_Other_ApplyEntity(keyValue); | |||
var Purchase_Other_ApplydetailsEntityTmp = GetPurchase_Other_ApplydetailsEntity(Purchase_Other_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Other_ApplydetailsEntity>(t=>t.applyid == Purchase_Other_ApplyEntityTmp.Id); | |||
foreach (Purchase_Other_ApplydetailsEntity item in Purchase_Other_ApplydetailsList) | |||
var Purchase_Other_ApplydetailsEntityTmp = GetPurchase_Other_ApplydetailsEntity(Purchase_Other_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Other_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Other_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Other_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Other_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Other_ApplydetailsEntity>(t => t.applyid == Purchase_Other_ApplyEntityTmp.Id); | |||
foreach (Purchase_Other_ApplydetailsEntity item in Purchase_Other_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Other_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Print_ApplyEntityTmp = GetPurchase_Print_ApplyEntity(keyValue); | |||
var Purchase_Print_ApplydetailsEntityTmp = GetPurchase_Print_ApplydetailsEntity(Purchase_Print_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Print_ApplydetailsEntity>(t=>t.applyid == Purchase_Print_ApplyEntityTmp.Id); | |||
foreach (Purchase_Print_ApplydetailsEntity item in Purchase_Print_ApplydetailsList) | |||
var Purchase_Print_ApplydetailsEntityTmp = GetPurchase_Print_ApplydetailsEntity(Purchase_Print_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Print_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Print_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Print_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Print_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Print_ApplydetailsEntity>(t => t.applyid == Purchase_Print_ApplyEntityTmp.Id); | |||
foreach (Purchase_Print_ApplydetailsEntity item in Purchase_Print_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Print_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Service_ApplyEntityTmp = GetPurchase_Service_ApplyEntity(keyValue); | |||
var Purchase_Service_ApplydetailsEntityTmp = GetPurchase_Service_ApplydetailsEntity(Purchase_Service_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Service_ApplydetailsEntity>(t=>t.applyid == Purchase_Service_ApplyEntityTmp.Id); | |||
foreach (Purchase_Service_ApplydetailsEntity item in Purchase_Service_ApplydetailsList) | |||
var Purchase_Service_ApplydetailsEntityTmp = GetPurchase_Service_ApplydetailsEntity(Purchase_Service_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Service_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Service_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Service_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Service_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Service_ApplydetailsEntity>(t => t.applyid == Purchase_Service_ApplyEntityTmp.Id); | |||
foreach (Purchase_Service_ApplydetailsEntity item in Purchase_Service_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Service_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Student_ApplyEntityTmp = GetPurchase_Student_ApplyEntity(keyValue); | |||
var Purchase_Student_ApplydetailsEntityTmp = GetPurchase_Student_ApplydetailsEntity(Purchase_Student_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Student_ApplydetailsEntity>(t=>t.applyid == Purchase_Student_ApplyEntityTmp.Id); | |||
foreach (Purchase_Student_ApplydetailsEntity item in Purchase_Student_ApplydetailsList) | |||
var Purchase_Student_ApplydetailsEntityTmp = GetPurchase_Student_ApplydetailsEntity(Purchase_Student_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Student_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Student_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Student_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Student_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Student_ApplydetailsEntity>(t => t.applyid == Purchase_Student_ApplyEntityTmp.Id); | |||
foreach (Purchase_Student_ApplydetailsEntity item in Purchase_Student_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Student_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Travel_ApplyEntityTmp = GetPurchase_Travel_ApplyEntity(keyValue); | |||
var Purchase_Travel_ApplydetailsEntityTmp = GetPurchase_Travel_ApplydetailsEntity(Purchase_Travel_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Travel_ApplydetailsEntity>(t=>t.applyid == Purchase_Travel_ApplyEntityTmp.Id); | |||
foreach (Purchase_Travel_ApplydetailsEntity item in Purchase_Travel_ApplydetailsList) | |||
var Purchase_Travel_ApplydetailsEntityTmp = GetPurchase_Travel_ApplydetailsEntity(Purchase_Travel_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Travel_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Travel_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Travel_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Travel_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Travel_ApplydetailsEntity>(t => t.applyid == Purchase_Travel_ApplyEntityTmp.Id); | |||
foreach (Purchase_Travel_ApplydetailsEntity item in Purchase_Travel_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Travel_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
@@ -246,17 +246,29 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var Purchase_Work_ApplyEntityTmp = GetPurchase_Work_ApplyEntity(keyValue); | |||
var Purchase_Work_ApplydetailsEntityTmp = GetPurchase_Work_ApplydetailsEntity(Purchase_Work_ApplyEntityTmp.Id); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Work_ApplydetailsEntity>(t=>t.applyid == Purchase_Work_ApplyEntityTmp.Id); | |||
foreach (Purchase_Work_ApplydetailsEntity item in Purchase_Work_ApplydetailsList) | |||
var Purchase_Work_ApplydetailsEntityTmp = GetPurchase_Work_ApplydetailsEntity(Purchase_Work_ApplyEntityTmp.Id); | |||
if (entity.Status == 0 && entity.CheckStatus == 0 && entity.Approvalamount != 0) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Work_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
if (entity.Approvalamount != null) | |||
{ | |||
//只是修改核准金额 | |||
Purchase_Work_ApplyEntityTmp.Approvalamount = entity.Approvalamount; | |||
Purchase_Work_ApplyEntityTmp.Modify(keyValue); | |||
db.Update(Purchase_Work_ApplyEntityTmp); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Work_ApplydetailsEntity>(t => t.applyid == Purchase_Work_ApplyEntityTmp.Id); | |||
foreach (Purchase_Work_ApplydetailsEntity item in Purchase_Work_ApplydetailsList) | |||
{ | |||
item.Create(); | |||
item.applyid = Purchase_Work_ApplyEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||