Na MOST JÓ !!!

This commit is contained in:
2018-04-22 23:46:07 +02:00
parent 714241c3a0
commit c4223f324d
7 changed files with 85 additions and 14 deletions
@@ -28,14 +28,44 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.aPrintLastInvoice = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
this.aPrintLastDeliveryNoteOut = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
// //
// aOrderInStorageOutDeliveryNoteOutInvoice // aPrintLastInvoice
// //
this.aOrderInStorageOutDeliveryNoteOutInvoice.CustomizePopupWindowParams += new DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventHandler(this.InvoiceCustomization); this.aPrintLastInvoice.Caption = "aPrint Last Invoice";
this.aOrderInStorageOutDeliveryNoteOutInvoice.Execute += new DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventHandler(this.aOrderInStorageOutDeliveryNoteOutInvoice_Execute); this.aPrintLastInvoice.ConfirmationMessage = null;
this.aPrintLastInvoice.Id = "aPrintLastInvoice";
this.aPrintLastInvoice.TargetObjectType = typeof(Nuvolar.Module.OrderInHeader);
this.aPrintLastInvoice.TargetViewNesting = DevExpress.ExpressApp.Nesting.Root;
this.aPrintLastInvoice.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView;
this.aPrintLastInvoice.ToolTip = null;
this.aPrintLastInvoice.TypeOfView = typeof(DevExpress.ExpressApp.DetailView);
this.aPrintLastInvoice.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(this.aPrintLastInvoice_Execute);
//
// aPrintLastDeliveryNoteOut
//
this.aPrintLastDeliveryNoteOut.Caption = "aPrint Last Delivery Note Out";
this.aPrintLastDeliveryNoteOut.ConfirmationMessage = null;
this.aPrintLastDeliveryNoteOut.Id = "aPrintLastDeliveryNoteOut";
this.aPrintLastDeliveryNoteOut.TargetObjectType = typeof(Nuvolar.Module.OrderInHeader);
this.aPrintLastDeliveryNoteOut.TargetViewNesting = DevExpress.ExpressApp.Nesting.Root;
this.aPrintLastDeliveryNoteOut.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView;
this.aPrintLastDeliveryNoteOut.ToolTip = null;
this.aPrintLastDeliveryNoteOut.TypeOfView = typeof(DevExpress.ExpressApp.DetailView);
this.aPrintLastDeliveryNoteOut.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(this.aPrintLastDeliveryNoteOut_Execute);
//
// OrderIn_VC
//
this.Actions.Add(this.aPrintLastInvoice);
this.Actions.Add(this.aPrintLastDeliveryNoteOut);
} }
#endregion #endregion
private DevExpress.ExpressApp.Actions.SimpleAction aPrintLastInvoice;
private DevExpress.ExpressApp.Actions.SimpleAction aPrintLastDeliveryNoteOut;
} }
} }
@@ -11,8 +11,10 @@ using DevExpress.ExpressApp.Model.NodeGenerators;
using DevExpress.ExpressApp.SystemModule; using DevExpress.ExpressApp.SystemModule;
using DevExpress.ExpressApp.Templates; using DevExpress.ExpressApp.Templates;
using DevExpress.ExpressApp.Utils; using DevExpress.ExpressApp.Utils;
using DevExpress.ExpressApp.Xpo;
using DevExpress.Persistent.Base; using DevExpress.Persistent.Base;
using DevExpress.Persistent.Validation; using DevExpress.Persistent.Validation;
using DevExpress.Xpo;
namespace Nuvolar.Module.CSharp namespace Nuvolar.Module.CSharp
{ {
@@ -39,17 +41,44 @@ namespace Nuvolar.Module.CSharp
// Unsubscribe from previously subscribed events and release other references and resources. // Unsubscribe from previously subscribed events and release other references and resources.
base.OnDeactivated(); base.OnDeactivated();
} }
public override void aOrderInStorageOutDeliveryNoteOutInvoice_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
{
base.aOrderInStorageOutDeliveryNoteOutInvoice_Execute(sender, e);
private void aPrintLastInvoice_Execute(object sender, SimpleActionExecuteEventArgs e)
{
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
OrderInHeader _OrderInHeader = View.SelectedObjects[0] as OrderInHeader;
XPCollection<InvoiceRows> _InvoiceRows_Collection = new XPCollection<InvoiceRows>(_ocur.Session,
CriteriaOperator.Parse("(OrderInRows.OrderInHeader = ? or OrderInRowsOther.OrderInHeader = ?) and IsNull(InvoiceHeader.GCRecord)=True and IsNull(InvoiceHeader)=False",
_OrderInHeader.Oid, _OrderInHeader.Oid));
if (_InvoiceRows_Collection.Count > 0)
{
_InvoiceRows_Collection.Sorting.Add(new SortProperty("InvoiceHeader.DateCreated", DevExpress.Xpo.DB.SortingDirection.Descending));
_InvoiceRows_Collection.Sorting.Add(new SortProperty("InvoiceHeader.DocumentNumber", DevExpress.Xpo.DB.SortingDirection.Ascending));
InvoiceHeader _InvoiceHeader = _InvoiceRows_Collection[0].InvoiceHeader;
XAFPrintHelper _XAFPrintHelper = new XAFPrintHelper(_ocur, Frame, _InvoiceHeader.InvoiceType.ReportDataV2, CriteriaOperator.Parse("InvoiceHeader.Oid = ?", _InvoiceHeader.Oid));
_XAFPrintHelper.ShowPreviewV2();
}
} }
private void aPrintLastDeliveryNoteOut_Execute(object sender, SimpleActionExecuteEventArgs e)
public override void InvoiceCustomization(object sender, CustomizePopupWindowParamsEventArgs e)
{ {
base.InvoiceCustomization(sender, e); XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
} OrderInHeader _OrderInHeader = View.SelectedObjects[0] as OrderInHeader;
XPCollection<DeliveryNoteOutRows> _DeliveryNoteOutRows_Collection = new XPCollection<DeliveryNoteOutRows>(_ocur.Session,
CriteriaOperator.Parse("StorageOutRowsInRows.StorageOutRows.OrderInRows.OrderInHeader.Oid = ?",_OrderInHeader.Oid));
if (_DeliveryNoteOutRows_Collection.Count>0)
{
_DeliveryNoteOutRows_Collection.Sorting.Add(new SortProperty("DeliveryNoteOutHeader.DateCreated", DevExpress.Xpo.DB.SortingDirection.Descending));
_DeliveryNoteOutRows_Collection.Sorting.Add(new SortProperty("DeliveryNoteOutHeader.DocumentNumber", DevExpress.Xpo.DB.SortingDirection.Ascending));
DeliveryNoteOutHeader _DeliveryNoteOutHeader = _DeliveryNoteOutRows_Collection[0].DeliveryNoteOutHeader;
XAFPrintHelper _XAFPrintHelper = new XAFPrintHelper(_ocur, Frame, _DeliveryNoteOutHeader.DeliveryNoteOutType.ReportDataV2, CriteriaOperator.Parse("DeliveryNoteOutHeader.Oid = ?", _DeliveryNoteOutHeader.Oid));
_XAFPrintHelper.ShowPreviewV2();
}
}
} }
} }
@@ -120,6 +120,12 @@
<metadata name="aOrderInStorageOutDeliveryNoteOutInvoice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="aOrderInStorageOutDeliveryNoteOutInvoice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="aPrintLastInvoice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>310, 17</value>
</metadata>
<metadata name="aPrintLastDeliveryNoteOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>453, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
@@ -8,6 +8,8 @@
<Action Id="aOpenWindowsExplorer" Caption="Windows Intéző megnyitása" /> <Action Id="aOpenWindowsExplorer" Caption="Windows Intéző megnyitása" />
<Action Id="aOrderInStorageOut" Caption="Kitárolás" /> <Action Id="aOrderInStorageOut" Caption="Kitárolás" />
<Action Id="aPrint_DeliveryNoteOutHeader" Caption="Szállítólevél nyomtatása" /> <Action Id="aPrint_DeliveryNoteOutHeader" Caption="Szállítólevél nyomtatása" />
<Action Id="aPrintLastDeliveryNoteOut" Caption="Utolsó száll.lev" />
<Action Id="aPrintLastInvoice" Caption="Utolsó számla" />
<Action Id="aRecreateCustomersOrderDocuments" Caption="Beszállítói dokumentum paraméter generálása" /> <Action Id="aRecreateCustomersOrderDocuments" Caption="Beszállítói dokumentum paraméter generálása" />
<Action Id="aStornoDeliveryNoteOutfromStorageOut" Caption="Szállítólevél stornírozása" /> <Action Id="aStornoDeliveryNoteOutfromStorageOut" Caption="Szállítólevél stornírozása" />
</Actions> </Actions>
@@ -10,6 +10,8 @@
<Action Id="aOpenWindowsExplorer" ImageName="console" /> <Action Id="aOpenWindowsExplorer" ImageName="console" />
<Action Id="aOrderInStorageOut" ImageName="document_out" /> <Action Id="aOrderInStorageOut" ImageName="document_out" />
<Action Id="aPrint_DeliveryNoteOutHeader" ImageName="Action_Printing_Print" TargetObjectsCriteria="[DeliveryNoteOutHeader] Is Not Null" /> <Action Id="aPrint_DeliveryNoteOutHeader" ImageName="Action_Printing_Print" TargetObjectsCriteria="[DeliveryNoteOutHeader] Is Not Null" />
<Action Id="aPrintLastDeliveryNoteOut" ImageName="printer_information" />
<Action Id="aPrintLastInvoice" ImageName="printer_information" />
<Action Id="aStornoDeliveryNoteOutfromStorageOut" ImageName="document_delete" TargetObjectsCriteria="[DeliveryNoteOutHeader] Is Not Null And [DeliveryNoteOutHeader.IsStorno] = False And [StorageMoveType.MoveType] In (##Enum#Nuvolar.Module.eMoveType,InventoryTransfer#, ##Enum#Nuvolar.Module.eMoveType,ReturnBack#) And [StorageMoveType.MoveDirection] = ##Enum#Nuvolar.Module.eMoveDirection,eOutput#" /> <Action Id="aStornoDeliveryNoteOutfromStorageOut" ImageName="document_delete" TargetObjectsCriteria="[DeliveryNoteOutHeader] Is Not Null And [DeliveryNoteOutHeader.IsStorno] = False And [StorageMoveType.MoveType] In (##Enum#Nuvolar.Module.eMoveType,InventoryTransfer#, ##Enum#Nuvolar.Module.eMoveType,ReturnBack#) And [StorageMoveType.MoveDirection] = ##Enum#Nuvolar.Module.eMoveDirection,eOutput#" />
<Action Id="aViewPriceFixCustomers" Caption="Ármátrix áttekintése" ImageName="money2" /> <Action Id="aViewPriceFixCustomers" Caption="Ármátrix áttekintése" ImageName="money2" />
</Actions> </Actions>
@@ -79,10 +81,10 @@
</NavigationItems> </NavigationItems>
<Options EnableHtmlFormatting="True" /> <Options EnableHtmlFormatting="True" />
<SchemaModules> <SchemaModules>
<SchemaModule Name="CloneObjectModule" Version="16.2.3.0" IsNewNode="True" /> <SchemaModule Name="CloneObjectModule" Version="17.2.3.0" IsNewNode="True" />
<SchemaModule Name="SchedulerModuleBase" Version="15.2.5.0" IsNewNode="True" /> <SchemaModule Name="SchedulerModuleBase" Version="15.2.5.0" IsNewNode="True" />
<SchemaModule Name="SchedulerWindowsFormsModule" Version="15.2.5.0" IsNewNode="True" /> <SchemaModule Name="SchedulerWindowsFormsModule" Version="15.2.5.0" IsNewNode="True" />
<SchemaModule Name="SystemModule" Version="16.2.3.0" IsNewNode="True" /> <SchemaModule Name="SystemModule" Version="17.2.3.0" IsNewNode="True" />
<SchemaModule Name="SystemWindowsFormsModule" Version="15.2.5.0" IsNewNode="True" /> <SchemaModule Name="SystemWindowsFormsModule" Version="15.2.5.0" IsNewNode="True" />
</SchemaModules> </SchemaModules>
<Views> <Views>
@@ -1 +1,3 @@
DevExpress.ExpressApp.ViewController, DevExpress.ExpressApp.v17.2, Version=17.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.ExpressApp.ViewController, DevExpress.ExpressApp.v17.2, Version=17.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.ExpressApp.SystemModule.SystemModule, DevExpress.ExpressApp.v17.2, Version=17.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
@@ -1928,7 +1928,7 @@ CheckError:
#End Region #End Region
#Region "Transactions" #Region "Transactions"
'// Invoice customization '// Invoice customization
Public Overridable Sub InvoiceCustomization(sender As Object, e As CustomizePopupWindowParamsEventArgs) _ Private Sub InvoiceCustomization(sender As Object, e As CustomizePopupWindowParamsEventArgs) _
Handles aORI_Create_DeliveryInvoice.CustomizePopupWindowParams, Handles aORI_Create_DeliveryInvoice.CustomizePopupWindowParams,
aOrderInStorageOutDeliveryNoteOutInvoice.CustomizePopupWindowParams, aOrderInStorageOutDeliveryNoteOutInvoice.CustomizePopupWindowParams,
aORI_Create_Invoice.CustomizePopupWindowParams, aORI_Create_Invoice.CustomizePopupWindowParams,
@@ -2370,7 +2370,7 @@ CheckError:
End Try End Try
End Sub End Sub
Public Overridable Sub aOrderInStorageOutDeliveryNoteOutInvoice_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aOrderInStorageOutDeliveryNoteOutInvoice.Execute Private Sub aOrderInStorageOutDeliveryNoteOutInvoice_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aOrderInStorageOutDeliveryNoteOutInvoice.Execute
'// Kitárolás + kiszállítás + számla egyben '// Kitárolás + kiszállítás + számla egyben
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _uow_lock As New UnitOfWork(_onew.Session.DataLayer) Dim _uow_lock As New UnitOfWork(_onew.Session.DataLayer)