|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using BWP.B3ClientService.BO; |
|
|
|
using BWP.B3ClientService.RpcBO; |
|
|
|
using BWP.B3Frameworks.Utils; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
|
using Forks.EnterpriseServices.JsonRpc; |
|
|
|
@ -64,7 +65,6 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
|
return serializer.Serialize(list); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static long DeleteDetail(GradeAndWeight_Detail entity) |
|
|
|
{ |
|
|
|
using (var session = Dmo.NewSession()) |
|
|
|
@ -122,7 +122,20 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
|
AddAlready(session, entity.OrderDetail_ID.Value, entity.Technics); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (entity.OrderDetail_ID.HasValue) |
|
|
|
{ |
|
|
|
var old = InnerBLUtil.GetDmoPropertyByID<short>(session, typeof(GradeAndWeight_Detail), "Technics", entity.ID); |
|
|
|
if (old != entity.Technics) |
|
|
|
{ |
|
|
|
AddAlready(session, entity.OrderDetail_ID.Value, entity.Technics); |
|
|
|
SubAlready(session, entity.OrderDetail_ID.Value, old); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
session.Update(entity); |
|
|
|
|
|
|
|
} |
|
|
|
session.Commit(); |
|
|
|
return entity.ID; |
|
|
|
} |
|
|
|
|