void UpdateDeal()
 {
     using (IObjectSpace os = ObjectSpace.FindObjectSpaceByObject(this).CreateNestedObjectSpace()) {
         TrwSubjectDealSale subj_deal = os.GetObject <TrwSubjectDealSale>(this);
         TrwSubjectDealLogic.RefreshDeal(os, subj_deal);
         os.CommitChanges();
     }
 }
 public override void DealUpdated()
 {
     using (IObjectSpace os = ObjectSpace.FindObjectSpaceByObject(this).CreateNestedObjectSpace()) {
         TrwSubjectDealSale subj_deal = os.GetObject <TrwSubjectDealSale>(this);
         subj_deal.CrmContractDeals.Clear();
         subj_deal.CrmContractDeals.Add(subj_deal.Deal);
         os.Delete(subj_deal.DealSaleOrders);
         TrwSubjectDealLogic.RefreshDeal(os, subj_deal);
         os.CommitChanges();
     }
 }
Example #3
0
 public static void RefreshSubjectDeals(IObjectSpace os, TrwSubject trw_subj)
 {
     foreach (TrwSubjectDealSale trw_deal in trw_subj.DealsSale)
     {
         TrwSubjectDealLogic.RefreshDeal(os, trw_deal);
     }
     foreach (TrwSubjectDealBay trw_deal in trw_subj.DealsBay)
     {
         TrwSubjectDealLogic.RefreshDeal(os, trw_deal);
     }
 }