Hehehehe
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DevExpress.Data.Filtering;
|
||||
using System;
|
||||
using DevExpress.Data.Filtering;
|
||||
using DevExpress.ExpressApp;
|
||||
using DevExpress.ExpressApp.Actions;
|
||||
using DevExpress.ExpressApp.Xpo;
|
||||
@@ -17,8 +18,16 @@ namespace Nuvolar.Module.Controllers
|
||||
protected override void OnActivated()
|
||||
{
|
||||
base.OnActivated();
|
||||
// Perform various tasks depending on the target View.
|
||||
Frame.GetController<InvoiceVC>().FireNAVmanageInvoiceFinalWork += FireNAVmanageInvoiceFinalWork;
|
||||
Frame.GetController<OrderInVC>().FireNAVmanageInvoiceFinalWork += FireNAVmanageInvoiceFinalWork;
|
||||
}
|
||||
|
||||
private void FireNAVmanageInvoiceFinalWork(InvoiceHeader _InvoiceHeader)
|
||||
{
|
||||
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
|
||||
this.NAV_manageInvoice(_InvoiceHeader, _ocur);
|
||||
}
|
||||
|
||||
protected override void OnViewControlsCreated()
|
||||
{
|
||||
base.OnViewControlsCreated();
|
||||
@@ -26,7 +35,7 @@ namespace Nuvolar.Module.Controllers
|
||||
}
|
||||
protected override void OnDeactivated()
|
||||
{
|
||||
// Unsubscribe from previously subscribed events and release other references and resources.
|
||||
Frame.GetController<InvoiceVC>().FireNAVmanageInvoiceFinalWork -= FireNAVmanageInvoiceFinalWork;
|
||||
base.OnDeactivated();
|
||||
}
|
||||
/// <summary>
|
||||
@@ -96,6 +105,11 @@ namespace Nuvolar.Module.Controllers
|
||||
{
|
||||
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
|
||||
InvoiceHeader _InvoiceHeader = View.SelectedObjects[0] as InvoiceHeader;
|
||||
this.NAV_manageInvoice(_InvoiceHeader,_ocur);
|
||||
(View as ListView).CollectionSource.Reload();
|
||||
}
|
||||
private void NAV_manageInvoice(InvoiceHeader _InvoiceHeader,XPObjectSpace _ocur)
|
||||
{
|
||||
string _operation = "CREATE";
|
||||
|
||||
if (_InvoiceHeader.IsStorno)
|
||||
@@ -147,7 +161,7 @@ namespace Nuvolar.Module.Controllers
|
||||
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
|
||||
}
|
||||
|
||||
(View as ListView).CollectionSource.Reload();
|
||||
|
||||
}
|
||||
|
||||
private void aNAV_queryInvoiceStatus_Execute(object sender, SimpleActionExecuteEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user