First create solution
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class CRMEstateStatisticsVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
Imports DevExpress.ExpressApp.PivotGrid.Win
|
||||
Imports DevExpress.XtraPivotGrid
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class CRMEstateStatisticsVC
|
||||
Inherits Nuvolar.Module.CRMEstateStatisticsVC
|
||||
Dim _WaitFormClass as New WaitFormClass
|
||||
Private _PivotGridListEditor As PivotGridListEditor
|
||||
Private _PivotGrdidControl As PivotGridControl
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "CRMEstateStatistics_ListView_Pivot" Then
|
||||
_PivotGridListEditor = TryCast(TryCast(View, ListView).Editor, PivotGridListEditor)
|
||||
|
||||
If _PivotGridListEditor IsNot Nothing Then
|
||||
_PivotGrdidControl = _PivotGridListEditor.PivotGridControl
|
||||
AddHandler _PivotGrdidControl.FieldValueDisplayText, AddressOf PivotGridControl_FieldValueDisplayText
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub PivotGridControl_FieldValueDisplayText(sender As Object, e As PivotFieldDisplayTextEventArgs)
|
||||
If e.Field IsNot Nothing Then
|
||||
If e.Field.Name = "Field_Immovables.ImmovablesTypes" Then
|
||||
e.DisplayText = CaptionHelper.GetLocalizedText("Enums\Nuvolar.Module.eImmovablesTypes", e.DisplayText.ToString)
|
||||
End If
|
||||
If e.Field.Name = "Field_Immovables.ImmovableSoldState" Then
|
||||
e.DisplayText = CaptionHelper.GetLocalizedText("Enums\Nuvolar.Module.eImmovableSoldState", e.DisplayText.ToString)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Generated
+82
@@ -0,0 +1,82 @@
|
||||
Partial Class CRMEstateVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aViewEMail_CRMEstate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSendEMail_CRMEstate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aReplyEmail_CRMEstate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aViewEMail_CRMEstate
|
||||
'
|
||||
Me.aViewEMail_CRMEstate.Caption = "aViewEMail_CRMEstate"
|
||||
Me.aViewEMail_CRMEstate.ConfirmationMessage = Nothing
|
||||
Me.aViewEMail_CRMEstate.Id = "aViewEMail_CRMEstate"
|
||||
Me.aViewEMail_CRMEstate.ImageName = "mail_view"
|
||||
Me.aViewEMail_CRMEstate.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewEMail_CRMEstate.Shortcut = Nothing
|
||||
Me.aViewEMail_CRMEstate.Tag = Nothing
|
||||
Me.aViewEMail_CRMEstate.TargetObjectsCriteria = "EventType=2 OR EventType=3"
|
||||
Me.aViewEMail_CRMEstate.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Leads_Activity)
|
||||
Me.aViewEMail_CRMEstate.TargetViewId = Nothing
|
||||
Me.aViewEMail_CRMEstate.ToolTip = Nothing
|
||||
Me.aViewEMail_CRMEstate.TypeOfView = Nothing
|
||||
'
|
||||
'aSendEMail_CRMEstate
|
||||
'
|
||||
Me.aSendEMail_CRMEstate.Caption = "aSendEMail_CRMEstate"
|
||||
Me.aSendEMail_CRMEstate.ConfirmationMessage = Nothing
|
||||
Me.aSendEMail_CRMEstate.Id = "aSendEMail_CRMEstate"
|
||||
Me.aSendEMail_CRMEstate.ImageName = "mail_new"
|
||||
Me.aSendEMail_CRMEstate.Shortcut = Nothing
|
||||
Me.aSendEMail_CRMEstate.Tag = Nothing
|
||||
Me.aSendEMail_CRMEstate.TargetObjectsCriteria = Nothing
|
||||
Me.aSendEMail_CRMEstate.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Leads_Activity)
|
||||
Me.aSendEMail_CRMEstate.TargetViewId = Nothing
|
||||
Me.aSendEMail_CRMEstate.ToolTip = Nothing
|
||||
Me.aSendEMail_CRMEstate.TypeOfView = Nothing
|
||||
'
|
||||
'aReplyEmail_CRMEstate
|
||||
'
|
||||
Me.aReplyEmail_CRMEstate.Caption = "aReplyEmail_CRMEstate"
|
||||
Me.aReplyEmail_CRMEstate.ConfirmationMessage = Nothing
|
||||
Me.aReplyEmail_CRMEstate.Id = "aReplyEmail_CRMEstate"
|
||||
Me.aReplyEmail_CRMEstate.ImageName = "mail_write"
|
||||
Me.aReplyEmail_CRMEstate.Shortcut = Nothing
|
||||
Me.aReplyEmail_CRMEstate.Tag = Nothing
|
||||
Me.aReplyEmail_CRMEstate.TargetObjectsCriteria = Nothing
|
||||
Me.aReplyEmail_CRMEstate.TargetObjectType = GetType(Nuvolar.[Module].Win.OutlookEMail)
|
||||
Me.aReplyEmail_CRMEstate.TargetViewId = "OutlookEMail_DetailView_View"
|
||||
Me.aReplyEmail_CRMEstate.ToolTip = Nothing
|
||||
Me.aReplyEmail_CRMEstate.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aViewEMail_CRMEstate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSendEMail_CRMEstate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aReplyEmail_CRMEstate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aViewEMail_CRMEstate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>750, 233</value>
|
||||
</metadata>
|
||||
<metadata name="aSendEMail_CRMEstate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>738, 180</value>
|
||||
</metadata>
|
||||
<metadata name="aReplyEmail_CRMEstate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>845, 336</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
Public Class CRMEstateVC
|
||||
Inherits Nuvolar.Module.CRMEstateVC
|
||||
Private _GridListEditor As GridListEditor
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler CreateReservationReminder, AddressOf _CreateReservationReminder
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Immovables_ListView" Or View.Id = "CRMEstate_Opportunity_CRMEstate_Opportunity_Immovables_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.AutoCommit
|
||||
End If
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Activity_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_DetailView_View" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CRMEstate_Leads_DetailView" Then
|
||||
For Each editor As PropertyEditor In (CType(View, DetailView)).GetItems(Of PropertyEditor)()
|
||||
|
||||
If editor.PropertyName = "FirstName" Then
|
||||
AddHandler editor.ControlCreated, AddressOf editor_FirstName
|
||||
End If
|
||||
If editor.PropertyName = "LastName" Then
|
||||
AddHandler editor.ControlCreated, AddressOf editor_LastName
|
||||
End If
|
||||
Next editor
|
||||
End If
|
||||
'If View.Id = "CRMEstate_Opportunity_Payment_Forecast_DetailView" Then
|
||||
' Dim _CRMEstate_Opportunity_Payment_Forecast As CRMEstate_Opportunity_Payment_Forecast = TryCast(View.SelectedObjects(0), CRMEstate_Opportunity_Payment_Forecast)
|
||||
' If _CRMEstate_Opportunity_Payment_Forecast.CurrencyName.ShortName = "HUF" Then
|
||||
' Dim _SumPriceNettoHUF_ViewItem As DevExpress.ExpressApp.Editors.ViewItem = TryCast(View, DetailView).FindItem("SumPriceNettoHUF")
|
||||
' Dim _DoublePropertyEditor_HUF As DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor = TryCast(_SumPriceNettoHUF_ViewItem, DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor)
|
||||
' AddHandler _DoublePropertyEditor_HUF.ControlValueChanged, AddressOf DoublePropertyEditor_HUF_ControlValueChanged
|
||||
' End If
|
||||
|
||||
'End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Immovables_ListView" Or View.Id = "CRMEstate_Opportunity_CRMEstate_Opportunity_Immovables_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.Confirmation
|
||||
End If
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Activity_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_DetailView_View" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Sub _CreateReservationReminder(ByVal _CRMEstate_Leads_Immovables_Reservation As CRMEstate_Leads_Immovables_Reservation)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
Dim _NewTask As Outlook.TaskItem = _OutlookApp.CreateItem(Outlook.OlItemType.olTaskItem)
|
||||
Dim _Date As New DateTime(_CRMEstate_Leads_Immovables_Reservation.DateTo.Year, _CRMEstate_Leads_Immovables_Reservation.DateTo.Month, _CRMEstate_Leads_Immovables_Reservation.DateTo.Day, 9, 0, 0)
|
||||
Dim _DueDate As New DateTime(_CRMEstate_Leads_Immovables_Reservation.DateTo.Year, _CRMEstate_Leads_Immovables_Reservation.DateTo.Month, _CRMEstate_Leads_Immovables_Reservation.DateTo.Day, 12, 0, 0)
|
||||
|
||||
_OutlookNameSpace.Logon(, , True, True)
|
||||
_NewTask.ReminderSet = True
|
||||
_NewTask.Body = "Lejáró opcionális foglalás!"
|
||||
_NewTask.DueDate = _DueDate
|
||||
_NewTask.ReminderTime = _Date
|
||||
_NewTask.Subject = _CRMEstate_Leads_Immovables_Reservation.CRMEstate_Leads_Immovables.Immovables.DisplayName
|
||||
_NewTask.UnRead = True
|
||||
_NewTask.Save()
|
||||
|
||||
End Sub
|
||||
Private Sub aViewEMail_CRMEstate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewEMail_CRMEstate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CRMEstate_Leads_Activity As CRMEstate_Leads_Activity = TryCast(View.SelectedObjects(0), CRMEstate_Leads_Activity)
|
||||
If _CRMEstate_Leads_Activity Is Nothing Then Throw New Exception("*Nincs kijelölve egyetlen sor sem!")
|
||||
|
||||
Dim _OutlookEMail As OutlookEMail = _onew.FindObject(Of OutlookEMail)(DevExpress.Data.Filtering.CriteriaOperator.Parse("Oid=?", _CRMEstate_Leads_Activity.Email_Oid))
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = _onew.FindObject(Of OutlookEMailIn)(DevExpress.Data.Filtering.CriteriaOperator.Parse("Oid=?", _CRMEstate_Leads_Activity.Email_Oid))
|
||||
|
||||
If _OutlookEMail Is Nothing And _OutlookEMailIn Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
If _OutlookEMail Is Nothing Then
|
||||
_OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.HTMLBody = _OutlookEMailIn.EmailBody
|
||||
_OutlookEMail.Subject = _OutlookEMailIn.EmailSubject
|
||||
|
||||
For Each _OutlookEMailAttachments As OutlookEMailAttachments In _OutlookEMailIn.OutlookEMailAttachments
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
Next
|
||||
_OutlookEMail.Recipients = _OutlookEMailIn.ReceiverEmailAdress
|
||||
_OutlookEMail.OutlookEMailIn_Oid = _OutlookEMailIn.Oid.ToString
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
|
||||
If TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRMEstate_Leads) IsNot Nothing Then
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRMEstate_Leads).Oid)
|
||||
Else
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRMEstate_Opportunity).CRMEstate_Leads.Oid)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView_View", False, _OutlookEMail)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aSendEMail_CRMEstate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendEMail_CRMEstate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource)
|
||||
If _PropertyCollectionSource Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _OutlookEMail As OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
|
||||
If TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Leads) IsNot Nothing Then
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Leads)
|
||||
|
||||
_OutlookEMail.Subject = "< Nincs beállítva >"
|
||||
If _CRMEstate_Leads.EMail = "" Or _CRMEstate_Leads.EMail Is Nothing Then
|
||||
_OutlookEMail.Recipients = "< Nincs beállítva >"
|
||||
Else
|
||||
_OutlookEMail.Recipients = _CRMEstate_Leads.EMail
|
||||
End If
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.HTMLBody = "Tisztelt " + _CRMEstate_Leads.LastName + " " + _CRMEstate_Leads.FirstName + _
|
||||
"!<P> </P><P> </P><P> </P>Üdvözlettel: " + _CRMEstate_Leads.HRPerson.FullName
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_CRMEstate_Leads.Oid)
|
||||
End If
|
||||
|
||||
If TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Opportunity) IsNot Nothing Then
|
||||
Dim _CRMEstate_Opportunity As CRMEstate_Opportunity = TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Opportunity)
|
||||
|
||||
_OutlookEMail.Subject = "< Nincs beállítva >"
|
||||
If _CRMEstate_Opportunity.CRMEstate_Leads.EMail = "" Or _CRMEstate_Opportunity.CRMEstate_Leads.EMail Is Nothing Then
|
||||
_OutlookEMail.Recipients = "< Nincs beállítva >"
|
||||
Else
|
||||
_OutlookEMail.Recipients = _CRMEstate_Opportunity.CRMEstate_Leads.EMail
|
||||
End If
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.HTMLBody = "Tisztelt " + _CRMEstate_Opportunity.CRMEstate_Leads.LastName + " " + _CRMEstate_Opportunity.CRMEstate_Leads.FirstName + _
|
||||
"!<P> </P><P> </P><P> </P>Üdvözlettel: " + _CRMEstate_Opportunity.CRMEstate_Leads.HRPerson.FullName
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_CRMEstate_Opportunity.CRMEstate_Leads.Oid)
|
||||
End If
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aReplyEmail_CRMEstate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aReplyEmail_CRMEstate.Execute
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _OutlookEMail As OutlookEMail = TryCast(View.SelectedObjects(0), OutlookEMail)
|
||||
If _OutlookEMail Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _OutlookEMailIn_old As OutlookEMailIn = _onew.FindObject(Of OutlookEMailIn)(DevExpress.Data.Filtering.CriteriaOperator.Parse("Oid=?", _OutlookEMail.OutlookEMailIn_Oid))
|
||||
If _OutlookEMailIn_old Is Nothing Then Throw New Exception("*Kimenõ e-mail-re nem lehet válaszolni!")
|
||||
|
||||
Dim _OutlookEMail_new As OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
|
||||
_OutlookEMail_new.Recipients = _OutlookEMailIn_old.SenderEmailAddress
|
||||
_OutlookEMail_new.Subject = "RE: " + _OutlookEMailIn_old.EmailSubject
|
||||
Dim _HTML_Body As String = "<br><br><p class=""MsoNormal""><span style=""COLOR: #1f497d""><o:p> </o:p></span></p><div><div style=""BORDER-BOTTOM: medium none; BORDER-LEFT:" + _
|
||||
"medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt""><p class=""MsoNormal"" > " + _
|
||||
"<br><b><span style=""FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"" lang=""HU"">From:</span></b>" + _OutlookEMailIn_old.SenderName + _
|
||||
"<span style=""FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"" lang=""HU""> " + _OutlookEMailIn_old.SenderEmailAddress + "<br>" + _
|
||||
"<b>Sent:</b>" + _OutlookEMailIn_old.ReceivedTime.ToString + "<br><b>To:</b>" + _OutlookEMailIn_old.ReceiverEmailAdress + "<br><b>Subject:</b>" + _OutlookEMailIn_old.EmailSubject + "<br><br>"
|
||||
_HTML_Body = _HTML_Body + _OutlookEMailIn_old.EmailBody
|
||||
|
||||
_OutlookEMail_new.HTMLBody = _HTML_Body
|
||||
_OutlookEMail_new.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_OutlookEMail.CRMEstate_Leads.Oid)
|
||||
_OutlookEMail_new.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", True, _OutlookEMail_new)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub DoublePropertyEditor_HUF_ControlValueChanged(sender As Object, e As EventArgs)
|
||||
Throw New NotImplementedException
|
||||
End Sub
|
||||
|
||||
Private Sub editor_LastName(sender As Object, e As EventArgs)
|
||||
Dim _LastNameStringPropertyEditor As StringPropertyEditor = TryCast(sender, StringPropertyEditor)
|
||||
AddHandler _LastNameStringPropertyEditor.Control.Click, AddressOf StringPropertyEditor_Click
|
||||
End Sub
|
||||
Private Sub editor_FirstName(sender As Object, e As EventArgs)
|
||||
Dim _FirstNameStringPropertyEditor As StringPropertyEditor = TryCast(sender, StringPropertyEditor)
|
||||
AddHandler _FirstNameStringPropertyEditor.Control.Click, AddressOf StringPropertyEditor_Click
|
||||
End Sub
|
||||
Private Sub StringPropertyEditor_Click(sender As Object, e As EventArgs)
|
||||
sender.SelectAll()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
Partial Class InsertGridToRTF_VC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aInsertGridToRTF = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aInsertGridToRTFCurrentPos = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRestoreDocumentTemplate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aInsertGridToRTF
|
||||
'
|
||||
Me.aInsertGridToRTF.Caption = "Insert grid"
|
||||
Me.aInsertGridToRTF.Category = "aInsertGridToRTF"
|
||||
Me.aInsertGridToRTF.ConfirmationMessage = Nothing
|
||||
Me.aInsertGridToRTF.Id = "aInsertGridToRTF"
|
||||
Me.aInsertGridToRTF.ImageName = "paste"
|
||||
Me.aInsertGridToRTF.Shortcut = Nothing
|
||||
Me.aInsertGridToRTF.Tag = Nothing
|
||||
Me.aInsertGridToRTF.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertGridToRTF.TargetViewId = "CRMEstate_Leads_DetailView"
|
||||
Me.aInsertGridToRTF.ToolTip = Nothing
|
||||
Me.aInsertGridToRTF.TypeOfView = Nothing
|
||||
'
|
||||
'aInsertGridToRTFCurrentPos
|
||||
'
|
||||
Me.aInsertGridToRTFCurrentPos.Caption = "Insert grid Current position"
|
||||
Me.aInsertGridToRTFCurrentPos.Category = "aInsertGridToRTFCurrentPos"
|
||||
Me.aInsertGridToRTFCurrentPos.ConfirmationMessage = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.Id = "aInsertGridToRTFCurrentPos"
|
||||
Me.aInsertGridToRTFCurrentPos.ImageName = "paste"
|
||||
Me.aInsertGridToRTFCurrentPos.Shortcut = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.Tag = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.TargetViewId = "CRMEstate_Leads_DetailView"
|
||||
Me.aInsertGridToRTFCurrentPos.ToolTip = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.TypeOfView = Nothing
|
||||
'
|
||||
'aRestoreDocumentTemplate
|
||||
'
|
||||
Me.aRestoreDocumentTemplate.Caption = "aRestore Document Template"
|
||||
Me.aRestoreDocumentTemplate.Category = "aRestoreDocumentTemplate"
|
||||
Me.aRestoreDocumentTemplate.ConfirmationMessage = Nothing
|
||||
Me.aRestoreDocumentTemplate.Id = "aRestoreDocumentTemplate"
|
||||
Me.aRestoreDocumentTemplate.ImageName = Nothing
|
||||
Me.aRestoreDocumentTemplate.Shortcut = Nothing
|
||||
Me.aRestoreDocumentTemplate.Tag = Nothing
|
||||
Me.aRestoreDocumentTemplate.TargetObjectsCriteria = Nothing
|
||||
Me.aRestoreDocumentTemplate.TargetViewId = Nothing
|
||||
Me.aRestoreDocumentTemplate.ToolTip = Nothing
|
||||
Me.aRestoreDocumentTemplate.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertGridToRTF As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aInsertGridToRTFCurrentPos As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRestoreDocumentTemplate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aInsertGridToRTF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aInsertGridToRTFCurrentPos.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aRestoreDocumentTemplate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>343, 89</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+447
@@ -0,0 +1,447 @@
|
||||
Imports System
|
||||
Imports System.IO
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
|
||||
Public Class InsertGridToRTF_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Dim _RichEditControl As RichEditControl
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "CRMEstate_Leads_DetailView" Then
|
||||
'_RichEditControl = TryCast(View, DetailView).GetItems(Of RichEditPropertyEditor)(0).RichEditUserControl.RichEditControl
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aInsertGridToRTF_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertGridToRTF.Execute
|
||||
Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(e.CurrentObject, CRMEstate_Leads)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _ocur.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups=?", _CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups))
|
||||
|
||||
If _CRMEstate_Leads.DocumentBody Is Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = _ImmovablesGroupsParameters.DocumentBody
|
||||
If _CRMEstate_Leads.DocumentBody Is Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}}" & _
|
||||
"{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}" & _
|
||||
"{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain" & _
|
||||
"\ql\f1\par\pard\plain\ql\f1\par\pard\plain\ql\f1\par\pard\plain\ql{\f2\fs18\cf0 imapartmentsim}\f2\fs18\cf2\par" & _
|
||||
"\pard\plain\ql\f2\fs18\cf0\par\pard\plain\ql{\f2\fs18\cf0 imgaragesim}\f2\fs18\cf0\par\pard\plain\ql\f2\fs18\cf0\par" & _
|
||||
"\pard\plain\ql{\f2\fs18\cf0 imofficesim}\f2\fs18\cf0\par\pard\plain\ql\f2\fs18\cf0\par\pard\plain\ql{\f2\fs18\cf0 imcontainerim}" & _
|
||||
"\f2\fs18\cf0\par\pard\plain\ql\f1\par}"
|
||||
End If
|
||||
End If
|
||||
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 apartments}{\cf0 im}", "{\cf0 imapartmentsim}")
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 garages}{\cf0 im}", "{\cf0 imgaragesim}")
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 offices}{\cf0 im}", "{\cf0 imofficesim}")
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 container}{\cf0 im}", "{\cf0 imcontainerim}")
|
||||
|
||||
'=========================== ColorTable =======================================
|
||||
Dim _actColorNum As Int32 = 0
|
||||
Dim _OrigColorTable As String
|
||||
Dim _ColorTable As String = (_CRMEstate_Leads.DocumentBody.Remove(0, (InStr(_CRMEstate_Leads.DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red240\green240\blue240 ;}")
|
||||
_OrigColorTable = "{\colortbl" & _ColorTable & "}"
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("improjectim", _CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups.ShortName)
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("imlastnameim", _CRMEstate_Leads.LastName)
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("imfirstnameim", _CRMEstate_Leads.FirstName)
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Apartments =======================================
|
||||
Dim _CRMEstate_Leads_Immovables_Apartments As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Apartments = TryCast(View, DetailView).FindItem("Selected_Apartments")
|
||||
|
||||
If _CRMEstate_Leads_Immovables_Apartments.ListView IsNot Nothing Then
|
||||
Dim _ListView_Apartments As ListView = CType(_CRMEstate_Leads_Immovables_Apartments.ListView, ListView)
|
||||
Dim _GridListEditor_Apartments As GridListEditor = TryCast(_ListView_Apartments.Editor, GridListEditor)
|
||||
Dim _Grid_Apartments As GridView = TryCast(_GridListEditor_Apartments.GridView, GridView)
|
||||
|
||||
If _Grid_Apartments IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Apartments, "imapartmentsim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Offices ==========================================
|
||||
Dim _CRMEstate_Leads_Immovables_Offices As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Offices = TryCast(View, DetailView).FindItem("Selected_Offices")
|
||||
|
||||
If _CRMEstate_Leads_Immovables_Offices.ListView IsNot Nothing Then
|
||||
Dim _ListView_Offices As ListView = CType(_CRMEstate_Leads_Immovables_Offices.ListView, ListView)
|
||||
Dim _GridListEditor_Offices As GridListEditor = TryCast(_ListView_Offices.Editor, GridListEditor)
|
||||
Dim _Grid_Offices As GridView = TryCast(_GridListEditor_Offices.GridView, GridView)
|
||||
|
||||
If _Grid_Offices IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Offices, "imofficesim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Garages ==========================================
|
||||
Dim _CRMEstate_Leads_Immovables_Garages As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Garages = TryCast(View, DetailView).FindItem("Selected_Garages")
|
||||
If _CRMEstate_Leads_Immovables_Garages.ListView IsNot Nothing Then
|
||||
Dim _ListView_Garages As ListView = CType(_CRMEstate_Leads_Immovables_Garages.ListView, ListView)
|
||||
Dim _GridListEditor_Garages As GridListEditor = TryCast(_ListView_Garages.Editor, GridListEditor)
|
||||
Dim _Grid_Garages As GridView = TryCast(_GridListEditor_Garages.GridView, GridView)
|
||||
|
||||
If _Grid_Garages IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Garages, "imgaragesim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Container ==========================================
|
||||
Dim _CRMEstate_Leads_Immovables_Container As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Container = TryCast(View, DetailView).FindItem("Selected_Container")
|
||||
If _CRMEstate_Leads_Immovables_Container.ListView IsNot Nothing Then
|
||||
Dim _ListView_Container As ListView = CType(_CRMEstate_Leads_Immovables_Container.ListView, ListView)
|
||||
Dim _GridListEditor_Container As GridListEditor = TryCast(_ListView_Container.Editor, GridListEditor)
|
||||
Dim _Grid_Container As GridView = TryCast(_GridListEditor_Container.GridView, GridView)
|
||||
|
||||
If _Grid_Container IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Container, "imcontainerim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
End Sub
|
||||
Private Sub aInsertGridToRTFCurrentPos_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertGridToRTFCurrentPos.Execute
|
||||
'Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(e.CurrentObject, CRMEstate_Leads)
|
||||
|
||||
Dim _CRMEstate_Leads_Immovables As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables = TryCast(View, DetailView).FindItem("CRMEstate_Leads_Immovables")
|
||||
|
||||
Dim _ListView As ListView = CType(_CRMEstate_Leads_Immovables.ListView, ListView)
|
||||
Dim _GridListEditor As GridListEditor = TryCast(_ListView.Editor, GridListEditor)
|
||||
Dim _Grid As GridView = TryCast(_GridListEditor.GridView, GridView)
|
||||
|
||||
|
||||
_RichEditControl.Document.InsertText(_RichEditControl.Document.CaretPosition, "LilaLiba")
|
||||
|
||||
|
||||
Dim _RTFTable As String = RTFTableCreatorCurrentPos(_Grid)
|
||||
|
||||
Dim _DocumentBody_NEW As String = _CRMEstate_Leads.DocumentBody
|
||||
_DocumentBody_NEW = _CRMEstate_Leads.DocumentBody.Replace("LilaLiba", _RTFTable)
|
||||
_CRMEstate_Leads.DocumentBody = ""
|
||||
_CRMEstate_Leads.DocumentBody = _DocumentBody_NEW
|
||||
|
||||
' _RichEditControl.Document.InsertRtfText(_DocumentPosition, RTFTableCreatorCurrentPos(_Grid))
|
||||
'_RichEditControl.Document.CaretPosition = _RichEditControl.Document.Range.End
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function RTFTableCreatorCurrentPos(_Grid As GridView) ', _DocumentBody As String) As String
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNum As Integer = _Grid.RowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Integer = 0
|
||||
'--Fejléc kiírása RTFként--
|
||||
|
||||
_RTFtext.Append("\par\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\cf0" & _Grid.Columns(_ik).Caption & "}\b\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
|
||||
'' --Adatsorok kiírása RTFként--
|
||||
For _ik As Integer = 0 To _RowNum - 2
|
||||
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_ik, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
Next
|
||||
|
||||
''--Utolsó sor --
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_RowNum - 1, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
_RTFtext.Append("\row\pard\plain\ql\par")
|
||||
|
||||
'_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
'_DocumentBody_NEW = _DocumentBody_NEW.Replace("{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}", "{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red192\green192\blue192 ;}")
|
||||
|
||||
Return _RTFtext.ToString()
|
||||
End Function
|
||||
Private Sub aRestoreDocumentTemplate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRestoreDocumentTemplate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(View.SelectedObjects(0), CRMEstate_Leads)
|
||||
If _CRMEstate_Leads Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _ocur.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups=?", _
|
||||
_CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups))
|
||||
|
||||
If _ImmovablesGroupsParameters Is Nothing Then Throw New Exception("*Nincs beállítva ingatlancsoport paraméter!")
|
||||
|
||||
_CRMEstate_Leads.DocumentBody = _ImmovablesGroupsParameters.DocumentBody
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
'-------------------Functions----------------------
|
||||
Function RTFTableCreator(_Grid As GridView, _Tag As String, _DocumentBody As String, Optional _FontSize As String = "8", _
|
||||
Optional _FontType As String = "Tahoma", Optional _RGB As String = "240,240,240") As String
|
||||
|
||||
|
||||
Dim _DocumentBody_NEW As String
|
||||
Dim _HeaderFillColor As Int32 ' -- Current table header fill color index in colot table
|
||||
|
||||
If _RGB <> "240,240,240" Then
|
||||
Dim _Parameters As String() = ColorTablereplacement(_DocumentBody, _RGB)
|
||||
_HeaderFillColor = Convert.ToInt32(_Parameters(0))
|
||||
_DocumentBody = _Parameters(1)
|
||||
Else
|
||||
'Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
'_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
'Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
'For _ik = 0 To _ColorArray.Length - 1
|
||||
' If _ColorArray(_ik) = "\red240\green240\blue240 " Then
|
||||
' _HeaderFillColor = _ik
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
_HeaderFillColor = 2
|
||||
End If
|
||||
|
||||
If _Grid.DataRowCount > 0 Then
|
||||
Dim _FontSizeNUM As Int32 = (Convert.ToInt32(_FontSize) * 2) ' -- Font size in half-points (the default is 16). => Size 8!!!
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNumFull As Integer = _Grid.RowCount
|
||||
Dim _RowNum As Integer = _Grid.DataRowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Int32 = 0
|
||||
Dim _LastCellIndex As Int32 = 0
|
||||
|
||||
'--Header to RTF format--
|
||||
'=================================================================================
|
||||
_RTFtext.Append("\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
If _LastCellIndex < _ik Then
|
||||
_LastCellIndex = _ik
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\fs" & _FontSizeNUM & "\cf0 " & _Grid.Columns.View.VisibleColumns(_ik).Caption & "}\b\cell")
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat" & _HeaderFillColor & "\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
Next
|
||||
irowIndex += 1
|
||||
'' --Data to RTF format--
|
||||
'=================================================================================
|
||||
For _ik As Int16 = 0 To _RowNumFull - 2
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_ik)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik)).ToString) & "}\cell")
|
||||
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
|
||||
irowIndex += 1
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetRowCellDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)) = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
irowIndex += 1
|
||||
End If
|
||||
Next
|
||||
'--Last row --
|
||||
'=================================================================================
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)).ToString) & "}\cell")
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.Columns.View.GetRowCellDisplayText(_RowNum - 1, _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)) = True Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
''---
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
End If
|
||||
|
||||
_RTFtext.Append("\row\pard\plain\ql")
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
If _DocumentBody_NEW.Contains("\fonttbl{\f0 Times New Roman;") Then
|
||||
_DocumentBody_NEW = _DocumentBody_NEW.Replace("\fonttbl{\f0 Times New Roman;", "\fonttbl{\f0 " & _FontType & ";") 'Font table remake
|
||||
End If
|
||||
Else
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, " ")
|
||||
End If
|
||||
|
||||
Return _DocumentBody_NEW
|
||||
End Function
|
||||
Function ColorTablereplacement(_DocumentBody As String, _RGB As String) As String()
|
||||
Dim _Parameters(1) As String
|
||||
Dim _RGBArray As String() = _RGB.Split(New [Char]() {","c})
|
||||
|
||||
Dim _actColorNum As Int32 = -1
|
||||
Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 1
|
||||
If _ColorArray(_ik) = "\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " " Then
|
||||
_actColorNum = _ik
|
||||
End If
|
||||
Next
|
||||
If _actColorNum = -1 Then
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " ;}")
|
||||
Dim _OrigColorTable As String = "{\colortbl" & _ColorTable & "}"
|
||||
_DocumentBody = _DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_Parameters(0) = _ColorArray.Length - 1
|
||||
_Parameters(1) = _DocumentBody
|
||||
Else
|
||||
_Parameters(0) = _actColorNum
|
||||
_Parameters(1) = _DocumentBody
|
||||
End If
|
||||
Return _Parameters
|
||||
End Function
|
||||
End Class
|
||||
Generated
+69
@@ -0,0 +1,69 @@
|
||||
Partial Class SendMailVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aSendMailCRMEstate_Leads = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSendEMailLawyerDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aSendMailCRMEstate_Leads
|
||||
'
|
||||
Me.aSendMailCRMEstate_Leads.Caption = "Send mail"
|
||||
Me.aSendMailCRMEstate_Leads.Category = "aSendMailCRMEstate_Leads"
|
||||
Me.aSendMailCRMEstate_Leads.ConfirmationMessage = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.Id = "aSendMailCRMEstate_Leads"
|
||||
Me.aSendMailCRMEstate_Leads.ImageName = "mail2"
|
||||
Me.aSendMailCRMEstate_Leads.Shortcut = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.Tag = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.TargetObjectsCriteria = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Leads)
|
||||
Me.aSendMailCRMEstate_Leads.TargetViewId = ""
|
||||
Me.aSendMailCRMEstate_Leads.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSendMailCRMEstate_Leads.ToolTip = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSendEMailLawyerDocument
|
||||
'
|
||||
Me.aSendEMailLawyerDocument.Caption = "Send EMail Lawyer Document"
|
||||
Me.aSendEMailLawyerDocument.Category = ""
|
||||
Me.aSendEMailLawyerDocument.ConfirmationMessage = Nothing
|
||||
Me.aSendEMailLawyerDocument.Id = "aSendEMailLawyerDocument"
|
||||
Me.aSendEMailLawyerDocument.ImageName = Nothing
|
||||
Me.aSendEMailLawyerDocument.Shortcut = Nothing
|
||||
Me.aSendEMailLawyerDocument.Tag = Nothing
|
||||
Me.aSendEMailLawyerDocument.TargetObjectsCriteria = Nothing
|
||||
Me.aSendEMailLawyerDocument.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Opportunity)
|
||||
Me.aSendEMailLawyerDocument.TargetViewId = Nothing
|
||||
Me.aSendEMailLawyerDocument.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSendEMailLawyerDocument.ToolTip = Nothing
|
||||
Me.aSendEMailLawyerDocument.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSendMailCRMEstate_Leads As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSendEMailLawyerDocument As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aSendMailCRMEstate_Leads.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aSendEMailLawyerDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Reports.Win
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Xpo
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports DevExpress.ExpressApp.Win.SystemModule
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class SendMailVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private reportService As WinReportServiceController
|
||||
Private printingService As PrintingController
|
||||
Private _MemoryStream As New MemoryStream
|
||||
Private _StreamReader As New StreamReader(_MemoryStream)
|
||||
Private _RichEditControl As RichEditControl
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "CRMEstate_Leads_DetailView" Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _RichEditContolViewItem As ViewItem = _DetailView.FindItem("DocumentBody")
|
||||
If _RichEditContolViewItem IsNot Nothing Then
|
||||
AddHandler _RichEditContolViewItem.ControlCreated, AddressOf RichEditContolViewItem_ControlCreated
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
reportService = Frame.GetController(Of WinReportServiceController)()
|
||||
printingService = Frame.GetController(Of PrintingController)()
|
||||
End Sub
|
||||
|
||||
Private Sub aSendMailReportCRMEstate_Leads_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs)
|
||||
|
||||
End Sub
|
||||
Private Sub reportService_CustomShowPreview(ByVal sender As Object, ByVal e As CustomShowPreviewEventArgs)
|
||||
e.Report.CreateDocument()
|
||||
e.Report.ExportToHtml(_MemoryStream)
|
||||
e.Handled = True
|
||||
End Sub
|
||||
Private Sub aSendMailCRMEstate_Leads_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendMailCRMEstate_Leads.Execute
|
||||
Try
|
||||
Dim _OutlookEMail As OutlookEMail
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(View.SelectedObjects(0), CRMEstate_Leads)
|
||||
|
||||
Dim _FileName As String = Path.GetTempPath & "Ajánlat.pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_RichEditControl.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
_StreamFile = New FileStream(_FileName, FileMode.Open, FileAccess.Read)
|
||||
Dim _StreamReader As New StreamReader(_StreamFile)
|
||||
_StreamFile.Seek(0, SeekOrigin.Begin)
|
||||
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments = _onew.CreateObject(Of OutlookEMailAttachments)()
|
||||
Dim _DocumentFileData As DocumentFileData = _onew.CreateObject(Of DocumentFileData)()
|
||||
_DocumentFileData.File = New FileData(_onew.Session)
|
||||
_DocumentFileData.File.LoadFromStream("Ajánlat.pdf", _StreamFile) '_FileData
|
||||
_DocumentFileData.File.FileName = "Ajánlat.pdf"
|
||||
_OutlookEMailAttachments.DocumentFileData = _onew.GetObject(_DocumentFileData)
|
||||
|
||||
_StreamReader.Close()
|
||||
_StreamFile.Close()
|
||||
|
||||
'-- Most jön az új outlook !
|
||||
_MemoryStream.Position = 0
|
||||
_OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
_OutlookEMail.HTMLBody = ""
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_CRMEstate_Leads.Oid)
|
||||
If _CRMEstate_Leads.EMail = "" Or _CRMEstate_Leads.EMail Is Nothing Then
|
||||
_OutlookEMail.Recipients = "< = Nincs beállítva e-mail cím az ügyfélhez! = >"
|
||||
Else
|
||||
_OutlookEMail.Recipients = _CRMEstate_Leads.EMail
|
||||
End If
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", True, _OutlookEMail)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RichEditContolViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
_RichEditControl = TryCast(_ItemControl, RichEditUserControl).RichEditControl
|
||||
End Sub
|
||||
Private Sub aSendEMailLawyerDocument_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendEMailLawyerDocument.Execute
|
||||
Try
|
||||
Dim _OutlookEMail As OutlookEMail
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _CRMEstate_Opportunity As CRMEstate_Opportunity = TryCast(View.SelectedObjects(0), CRMEstate_Opportunity)
|
||||
If _CRMEstate_Opportunity Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _onew.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups.Oid=?", _
|
||||
_CRMEstate_Opportunity.CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups.Oid))
|
||||
|
||||
If _ImmovablesGroupsParameters Is Nothing Then Throw New Exception("*Nincsenek beállítva a(z) " + _
|
||||
_CRMEstate_Opportunity.CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups.ShortName + " paraméterei!")
|
||||
Dim _ReportData As ReportData = _ImmovablesGroupsParameters.ReportData_Contract_Temp
|
||||
If _ReportData Is Nothing Then Throw New Exception("*Nincs beállítva az ügyvédi segédanyag nyomtatvány!" + vbNewLine + "Kérem, ellenõrizze!")
|
||||
|
||||
Dim _XafReport As Reports.XafReport = _ReportData.LoadReport(_onew)
|
||||
Dim _FilterString As String = "[CRMEstate_Opportunity.Oid]='" & _CRMEstate_Opportunity.Oid.ToString & "'"
|
||||
_XafReport.FilterString = _FilterString
|
||||
Dim _FileName As String = Path.GetTempPath & "Ügyvédi segédlet.pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
_StreamFile = New FileStream(_FileName, FileMode.Open, FileAccess.Read)
|
||||
Dim _StreamReader As New StreamReader(_StreamFile)
|
||||
_StreamFile.Seek(0, SeekOrigin.Begin)
|
||||
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments = _onew.CreateObject(Of OutlookEMailAttachments)()
|
||||
Dim _DocumentFileData As DocumentFileData = _onew.CreateObject(Of DocumentFileData)()
|
||||
_DocumentFileData.File = New FileData(_ocur.Session)
|
||||
_DocumentFileData.File.LoadFromStream("Ügyvédi segédlet.pdf", _StreamFile) '_FileData
|
||||
_DocumentFileData.File.FileName = "Ügyvédi segédlet.pdf"
|
||||
_OutlookEMailAttachments.DocumentFileData = _DocumentFileData
|
||||
|
||||
_StreamReader.Close()
|
||||
_StreamFile.Close()
|
||||
|
||||
'-- Most jön az új outlook !
|
||||
_MemoryStream.Position = 0
|
||||
_OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
_OutlookEMail.Subject = _CRMEstate_Opportunity.CRMEstate_Leads.DisplayName + " - Ügyvédi segédlet"
|
||||
_OutlookEMail.HTMLBody = "Tisztelt Németh és Herrmann Ügyvédi Iroda!"
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.Recipients = "< = Nincs beállítva e-mail = >"
|
||||
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", True, _OutlookEMail)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
Partial Class ImmovablesPriceListVCWIN
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aInsertAPriceListToDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRestorePriceListTemplate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aInsertAPriceListToDocument
|
||||
'
|
||||
Me.aInsertAPriceListToDocument.Caption = "Insert to document"
|
||||
Me.aInsertAPriceListToDocument.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aInsertAPriceListToDocument.Id = "aInsertAPriceListToDocument"
|
||||
Me.aInsertAPriceListToDocument.ImageName = "BO_Person"
|
||||
Me.aInsertAPriceListToDocument.Shortcut = Nothing
|
||||
Me.aInsertAPriceListToDocument.Tag = Nothing
|
||||
Me.aInsertAPriceListToDocument.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertAPriceListToDocument.TargetViewId = "ImmovablesPriceListHeader_DetailView"
|
||||
Me.aInsertAPriceListToDocument.ToolTip = Nothing
|
||||
Me.aInsertAPriceListToDocument.TypeOfView = Nothing
|
||||
'
|
||||
'aRestorePriceListTemplate
|
||||
'
|
||||
Me.aRestorePriceListTemplate.Caption = "aRestore Price List Template"
|
||||
Me.aRestorePriceListTemplate.ConfirmationMessage = Nothing
|
||||
Me.aRestorePriceListTemplate.Id = "aRestorePriceListTemplate"
|
||||
Me.aRestorePriceListTemplate.ImageName = Nothing
|
||||
Me.aRestorePriceListTemplate.Shortcut = Nothing
|
||||
Me.aRestorePriceListTemplate.Tag = Nothing
|
||||
Me.aRestorePriceListTemplate.TargetObjectsCriteria = Nothing
|
||||
Me.aRestorePriceListTemplate.TargetViewId = "ImmovablesPriceListHeader_DetailView"
|
||||
Me.aRestorePriceListTemplate.ToolTip = Nothing
|
||||
Me.aRestorePriceListTemplate.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertAPriceListToDocument As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRestorePriceListTemplate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aInsertAPriceListToDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aRestorePriceListTemplate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>228, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraRichEdit.Commands
|
||||
Imports DevExpress.XtraRichEdit.API.Native
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
|
||||
Public Class ImmovablesPriceListVCWIN
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _RichEditControl As RichEditControl
|
||||
Private _GridListEditor As GridListEditor
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "ImmovablesPriceListHeader_DetailView" Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _RichEditControlViewItem As ViewItem
|
||||
|
||||
If _DetailView IsNot Nothing Then
|
||||
_RichEditControlViewItem = _DetailView.GetItems(Of RichEditPropertyEditor)(0)
|
||||
If _RichEditControlViewItem IsNot Nothing Then
|
||||
AddHandler _RichEditControlViewItem.ControlCreated, AddressOf RichEditControlViewItem_ControlCreated
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'_RichEditControl.Document.Variables.Add("DOCUMENTVARIABLE Created", "nnnnna")
|
||||
'AddHandler _RichEditControl.CalculateDocumentVariable, AddressOf _CalculateDocumentVariable
|
||||
End If
|
||||
End If
|
||||
|
||||
'If View.Id = "CRMEstate_Offer_Template_DetailView" Then
|
||||
' _RichEditControl = TryCast(View, DetailView).GetItems(Of RichEditPropertyEditor)(0).RichEditUserControl.RichEditControl
|
||||
' _RichEditControl.Document.Fields.Add(_RichEditControl.Document.Range.End, "DOCVARIABLE Count")
|
||||
'End If
|
||||
|
||||
'If View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsA_ListView" Or _
|
||||
' View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsO_ListView" Or _
|
||||
' View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsG_ListView" Or _
|
||||
' View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsC_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' _GridListEditor = TryCast(_ListView.Editor, GridListEditor)
|
||||
' If _GridListEditor IsNot Nothing Then
|
||||
' _GridListEditor.AllowEdit = True
|
||||
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoDEV" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoHUF" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoDEVRent" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoHUFRent" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "NoteRow" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
|
||||
' '_GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoHUF" Then _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoHUF" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoHUF" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoHUFRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoDEVRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoHUFRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoHUF" _
|
||||
' 'Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoDEVRent" _
|
||||
' 'Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoHUFRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoDEVRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoDEVRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoHUFRent" Then
|
||||
' End If
|
||||
' Next i
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsA_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsO_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsG_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsC_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.AutoCommit
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsA_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsO_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsG_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsC_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.Confirmation
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aInsertAPriceListToDocument_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertAPriceListToDocument.Execute
|
||||
Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _ImmovablesPriceListHeader As ImmovablesPriceListHeader = TryCast(e.CurrentObject, ImmovablesPriceListHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
'Ha sablon alapján akarod készíteni akkor kell egy paraméter és a sablon amit be akarsz tölteni
|
||||
'_ImmovablesPriceListHeader.DocumentBody = _ImmovablesPriceListHeader.DocumentBody
|
||||
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 apartments}{\cf0 im}", "{\cf0 imapartmentsim}")
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 garages}{\cf0 im}", "{\cf0 imgaragesim}")
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 offices}{\cf0 im}", "{\cf0 imofficesim}")
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 container}{\cf0 im}", "{\cf0 imcontainerim}")
|
||||
|
||||
'=========================== ColorTable =======================================
|
||||
Dim _actColorNum As Int32 = 0
|
||||
Dim _OrigColorTable As String
|
||||
If _ImmovablesPriceListHeader.DocumentBody Is Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}}" & _
|
||||
"{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}" & _
|
||||
"{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql{\cf0 }\par\pard\plain\ql\par\pard\plain\ql\par}"
|
||||
End If
|
||||
Dim _ColorTable As String = (_ImmovablesPriceListHeader.DocumentBody.Remove(0, (InStr(_ImmovablesPriceListHeader.DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red240\green240\blue240 ;}")
|
||||
_OrigColorTable = "{\colortbl" & _ColorTable & "}"
|
||||
_ImmovablesPriceListHeader.DocumentBody = _ImmovablesPriceListHeader.DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
|
||||
_ImmovablesPriceListHeader.DocumentBody = _ImmovablesPriceListHeader.DocumentBody.Replace("improjectim", _ImmovablesPriceListHeader.ImmovablesGroups.ShortName)
|
||||
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Apartments =======================================
|
||||
Dim ImmovablesPriceListRowsA As ListPropertyEditor
|
||||
ImmovablesPriceListRowsA = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsA")
|
||||
If CType(ImmovablesPriceListRowsA.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Apartments As ListView = CType(ImmovablesPriceListRowsA.ListView, ListView)
|
||||
Dim _GridListEditor_Apartments As GridListEditor = TryCast(_ListView_Apartments.Editor, GridListEditor)
|
||||
Dim _Grid_Apartments As GridView = TryCast(_GridListEditor_Apartments.GridView, GridView)
|
||||
|
||||
If _Grid_Apartments IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Apartments, "imapartmentsim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Offices ==========================================
|
||||
Dim ImmovablesPriceListRowsO As ListPropertyEditor
|
||||
ImmovablesPriceListRowsO = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsO")
|
||||
If CType(ImmovablesPriceListRowsO.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Offices As ListView = CType(ImmovablesPriceListRowsO.ListView, ListView)
|
||||
Dim _GridListEditor_Offices As GridListEditor = TryCast(_ListView_Offices.Editor, GridListEditor)
|
||||
Dim _Grid_Offices As GridView = TryCast(_GridListEditor_Offices.GridView, GridView)
|
||||
|
||||
If _Grid_Offices IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Offices, "imofficesim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Garages ==========================================
|
||||
Dim ImmovablesPriceListRowsG As ListPropertyEditor
|
||||
ImmovablesPriceListRowsG = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsG")
|
||||
If CType(ImmovablesPriceListRowsG.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Garages As ListView = CType(ImmovablesPriceListRowsG.ListView, ListView)
|
||||
Dim _GridListEditor_Garages As GridListEditor = TryCast(_ListView_Garages.Editor, GridListEditor)
|
||||
Dim _Grid_Garages As GridView = TryCast(_GridListEditor_Garages.GridView, GridView)
|
||||
|
||||
If _Grid_Garages IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Garages, "imgaragesim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Container ==========================================
|
||||
Dim ImmovablesPriceListRowsC As ListPropertyEditor
|
||||
ImmovablesPriceListRowsC = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsC")
|
||||
|
||||
If CType(ImmovablesPriceListRowsC.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Container As ListView = CType(ImmovablesPriceListRowsC.ListView, ListView)
|
||||
Dim _GridListEditor_Container As GridListEditor = TryCast(_ListView_Container.Editor, GridListEditor)
|
||||
Dim _Grid_Container As GridView = TryCast(_GridListEditor_Container.GridView, GridView)
|
||||
|
||||
If _Grid_Container IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Container, "imcontainerim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
|
||||
'=================================================================================
|
||||
End Sub
|
||||
Function RTFTableCreator(_Grid As GridView, _Tag As String, _DocumentBody As String, Optional _FontSize As String = "8", _
|
||||
Optional _FontType As String = "Tahoma", Optional _RGB As String = "240,240,240") As String
|
||||
Dim _DocumentBody_NEW As String
|
||||
Dim _HeaderFillColor As Int32 ' -- Current table header fill color index in colot table
|
||||
|
||||
If _RGB <> "240,240,240" Then
|
||||
Dim _Parameters As String() = ColorTablereplacement(_DocumentBody, _RGB)
|
||||
_HeaderFillColor = Convert.ToInt32(_Parameters(0))
|
||||
_DocumentBody = _Parameters(1)
|
||||
Else
|
||||
_HeaderFillColor = 2
|
||||
End If
|
||||
|
||||
If _Grid.DataRowCount > 0 Then
|
||||
Dim _FontSizeNUM As Int32 = (Convert.ToInt32(_FontSize) * 2) ' -- Font size in half-points (the default is 16). => Size 8!!!
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNumFull As Integer = _Grid.RowCount
|
||||
Dim _RowNum As Integer = _Grid.DataRowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Int32 = 0
|
||||
Dim _LastCellIndex As Int32 = 0
|
||||
|
||||
'--Header to RTF format--
|
||||
'=================================================================================
|
||||
_RTFtext.Append("\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
If _LastCellIndex < _ik Then
|
||||
_LastCellIndex = _ik
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\fs" & _FontSizeNUM & "\cf0 " & _Grid.Columns.View.VisibleColumns(_ik).Caption & "}\b\cell")
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat" & _HeaderFillColor & "\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
Next
|
||||
irowIndex += 1
|
||||
'' --Data to RTF format--
|
||||
'=================================================================================
|
||||
For _ik As Int16 = 0 To _RowNumFull - 2
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_ik)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik)).ToString) & "}\cell")
|
||||
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
|
||||
irowIndex += 1
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetRowCellDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)) = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
irowIndex += 1
|
||||
End If
|
||||
Next
|
||||
'--Last row --
|
||||
'=================================================================================
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)).ToString) & "}\cell")
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.Columns.View.GetRowCellDisplayText(_RowNum - 1, _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)) = True Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
''---
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
End If
|
||||
|
||||
_RTFtext.Append("\row\pard\plain\ql")
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
If _DocumentBody_NEW.Contains("\fonttbl{\f0 Times New Roman;") Then
|
||||
_DocumentBody_NEW = _DocumentBody_NEW.Replace("\fonttbl{\f0 Times New Roman;", "\fonttbl{\f0 " & _FontType & ";") 'Font table remake
|
||||
End If
|
||||
Else
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, " ")
|
||||
End If
|
||||
|
||||
Return _DocumentBody_NEW
|
||||
End Function
|
||||
Function ColorTablereplacement(_DocumentBody As String, _RGB As String) As String()
|
||||
Dim _Parameters(1) As String
|
||||
Dim _RGBArray As String() = _RGB.Split(New [Char]() {","c})
|
||||
|
||||
Dim _actColorNum As Int32 = -1
|
||||
Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 1
|
||||
If _ColorArray(_ik) = "\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " " Then
|
||||
_actColorNum = _ik
|
||||
End If
|
||||
Next
|
||||
If _actColorNum = -1 Then
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " ;}")
|
||||
Dim _OrigColorTable As String = "{\colortbl" & _ColorTable & "}"
|
||||
_DocumentBody = _DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_Parameters(0) = _ColorArray.Length - 1
|
||||
_Parameters(1) = _DocumentBody
|
||||
Else
|
||||
_Parameters(0) = _actColorNum
|
||||
_Parameters(1) = _DocumentBody
|
||||
End If
|
||||
Return _Parameters
|
||||
End Function
|
||||
Private Function RTFTableCreatorCurrentPos(_Grid As GridView) ', _DocumentBody As String) As String
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNum As Integer = _Grid.RowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Integer = 0
|
||||
'--Fejléc kiírása RTFként--
|
||||
|
||||
_RTFtext.Append("\par\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\cf0" & _Grid.Columns(_ik).Caption & "}\b\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
|
||||
'' --Adatsorok kiírása RTFként--
|
||||
For _ik As Integer = 0 To _RowNum - 2
|
||||
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_ik, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
Next
|
||||
|
||||
''--Utolsó sor --
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_RowNum - 1, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
_RTFtext.Append("\row\pard\plain\ql\par")
|
||||
|
||||
'_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
'_DocumentBody_NEW = _DocumentBody_NEW.Replace("{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}", "{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red192\green192\blue192 ;}")
|
||||
|
||||
Return _RTFtext.ToString()
|
||||
End Function
|
||||
Private Sub aRestorePriceListTemplate_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRestorePriceListTemplate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ImmovablesPriceListHeader As ImmovablesPriceListHeader = TryCast(e.SelectedObjects(0), ImmovablesPriceListHeader)
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _ocur.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups=?", _ImmovablesPriceListHeader.ImmovablesGroups))
|
||||
|
||||
If _ImmovablesGroupsParameters Is Nothing Then Throw New Exception("*Nincsen beállítva az adott ingatlancsoporthoz a paraméterek!")
|
||||
_ImmovablesPriceListHeader.DocumentBody = _ImmovablesGroupsParameters.DocumentBodyPriceList
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RichEditControlViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim itemControl As Object = (CType(sender, ViewItem)).Control
|
||||
_RichEditControl = TryCast(itemControl, RichEditUserControl).RichEditControl
|
||||
End Sub
|
||||
End Class
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
Partial Class ImmovablesCostRecordExcelVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aInsertCostRecords = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aFinalizeCostRecords = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aImportCostRecords = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aTempLikor = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSetUnitPrice = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aInsertCostRecords
|
||||
'
|
||||
Me.aInsertCostRecords.Caption = "aInsert Cost Records"
|
||||
Me.aInsertCostRecords.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aInsertCostRecords.Id = "aInsertCostRecords"
|
||||
Me.aInsertCostRecords.ImageName = Nothing
|
||||
Me.aInsertCostRecords.Shortcut = Nothing
|
||||
Me.aInsertCostRecords.Tag = Nothing
|
||||
Me.aInsertCostRecords.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertCostRecords.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aInsertCostRecords.ToolTip = Nothing
|
||||
Me.aInsertCostRecords.TypeOfView = Nothing
|
||||
'
|
||||
'aFinalizeCostRecords
|
||||
'
|
||||
Me.aFinalizeCostRecords.Caption = "aFinalize Cost Records"
|
||||
Me.aFinalizeCostRecords.Category = "Save"
|
||||
Me.aFinalizeCostRecords.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aFinalizeCostRecords.Id = "aFinalizeCostRecords"
|
||||
Me.aFinalizeCostRecords.ImageName = "disk_red"
|
||||
Me.aFinalizeCostRecords.Shortcut = Nothing
|
||||
Me.aFinalizeCostRecords.Tag = Nothing
|
||||
Me.aFinalizeCostRecords.TargetObjectsCriteria = Nothing
|
||||
Me.aFinalizeCostRecords.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aFinalizeCostRecords.ToolTip = Nothing
|
||||
Me.aFinalizeCostRecords.TypeOfView = Nothing
|
||||
'
|
||||
'aImportCostRecords
|
||||
'
|
||||
Me.aImportCostRecords.Caption = "aImport Cost Records"
|
||||
Me.aImportCostRecords.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aImportCostRecords.Id = "aImportCostRecords"
|
||||
Me.aImportCostRecords.ImageName = Nothing
|
||||
Me.aImportCostRecords.Shortcut = Nothing
|
||||
Me.aImportCostRecords.Tag = Nothing
|
||||
Me.aImportCostRecords.TargetObjectsCriteria = Nothing
|
||||
Me.aImportCostRecords.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aImportCostRecords.ToolTip = Nothing
|
||||
Me.aImportCostRecords.TypeOfView = Nothing
|
||||
'
|
||||
'aTempLikor
|
||||
'
|
||||
Me.aTempLikor.Caption = "TEMP Import"
|
||||
Me.aTempLikor.ConfirmationMessage = Nothing
|
||||
Me.aTempLikor.Id = "aTempLikor"
|
||||
Me.aTempLikor.ImageName = Nothing
|
||||
Me.aTempLikor.Shortcut = Nothing
|
||||
Me.aTempLikor.Tag = Nothing
|
||||
Me.aTempLikor.TargetObjectsCriteria = Nothing
|
||||
Me.aTempLikor.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aTempLikor.ToolTip = Nothing
|
||||
Me.aTempLikor.TypeOfView = Nothing
|
||||
'
|
||||
'aSetUnitPrice
|
||||
'
|
||||
Me.aSetUnitPrice.AcceptButtonCaption = Nothing
|
||||
Me.aSetUnitPrice.CancelButtonCaption = Nothing
|
||||
Me.aSetUnitPrice.Caption = "aSet Unit Price"
|
||||
Me.aSetUnitPrice.Category = "View"
|
||||
Me.aSetUnitPrice.ConfirmationMessage = Nothing
|
||||
Me.aSetUnitPrice.Id = "aSetUnitPrice"
|
||||
Me.aSetUnitPrice.ImageName = Nothing
|
||||
Me.aSetUnitPrice.Shortcut = Nothing
|
||||
Me.aSetUnitPrice.Tag = Nothing
|
||||
Me.aSetUnitPrice.TargetObjectsCriteria = Nothing
|
||||
Me.aSetUnitPrice.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aSetUnitPrice.ToolTip = Nothing
|
||||
Me.aSetUnitPrice.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertCostRecords As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aFinalizeCostRecords As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aImportCostRecords As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aTempLikor As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSetUnitPrice As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aInsertCostRecords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aFinalizeCostRecords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aImportCostRecords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aTempLikor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aSetUnitPrice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+648
@@ -0,0 +1,648 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports FarPoint.Win.Spread
|
||||
Imports System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Xpo
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Data.OleDb
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports System.Drawing
|
||||
Imports System.Globalization
|
||||
|
||||
Public Class ImmovablesCostRecordExcelVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Private _FpSpread As FpSpread
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
If View.Id = "ImmovablesCostRecordExcel_ListView" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = _ocur.FindObject(Of ImmovablesCostRecordExcel)(CriteriaOperator.Parse("IsEditable=?", True))
|
||||
|
||||
'If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
' Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
'End If
|
||||
End If
|
||||
|
||||
If View.Id = "ImmovablesCostRecordExcel_DetailView" Then
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
Frame.GetController(Of ImmovablesCostRecordExcelVC)().aTempLikor.Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = _ocur.FindObject(Of ImmovablesCostRecordExcel)(CriteriaOperator.Parse("IsEditable=?", True))
|
||||
|
||||
If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "ImmovablesCostRecordExcel_DetailView" Then
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "ImmovablesCostRecordExcel_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "ImmovablesCostRecordExcel_DetailView" Then
|
||||
|
||||
Dim _ExcelControlViewItem As ViewItem
|
||||
_ExcelControlViewItem = TryCast(View, DetailView).GetItems(Of ExcelPropertyEditor)(0)
|
||||
If _ExcelControlViewItem IsNot Nothing Then
|
||||
AddHandler _ExcelControlViewItem.ControlCreated, AddressOf ExcelControlViewItem_ControlCreated
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ExcelControlViewItem_ControlCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim itemControl As Object = (CType(sender, ViewItem)).Control
|
||||
|
||||
_FpSpread = TryCast(itemControl, ExcelUserControl).FpSpreadControl
|
||||
|
||||
If _FpSpread IsNot Nothing Then
|
||||
_FpSpread.EditModeReplace = True
|
||||
Dim _FileName As String = Path.GetTempPath & "OutSpread.xml"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _ocur.Session.IsNewObject(_ImmovablesCostRecordExcel) = False Then
|
||||
If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
If _ImmovablesCostRecordExcel.ExcelFile IsNot Nothing Then
|
||||
_ImmovablesCostRecordExcel.ExcelFile.SaveToStream(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
_FpSpread.Open(_FileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Sub SaveAction_Executing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
Dim _FileName As String = Path.GetTempPath & "InSpread.xml"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
If _FpSpread IsNot Nothing Then
|
||||
_FpSpread.Save(_StreamFile, False)
|
||||
_StreamFile.Close()
|
||||
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
|
||||
_ImmovablesCostRecordExcel.ExcelFile = New FileData(_ocur.Session)
|
||||
_ImmovablesCostRecordExcel.ExcelFile.LoadFromStream("Excel worksheet", _StreamFile2)
|
||||
_ImmovablesCostRecordExcel.Save()
|
||||
_StreamFile2.Close()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aInsertCostRecords_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertCostRecords.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Sort As New SortProperty("Immovables.UniqueObjects.Name", DB.SortingDirection.Ascending)
|
||||
Dim _SortRecordGroup As New SortProperty("ShortName", DB.SortingDirection.Ascending)
|
||||
Dim _SortRecordMainGroup As New SortProperty("ImmovablesCostRecordMainGroup.GroupName", DB.SortingDirection.Ascending)
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
_ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Sorting.Add(_Sort)
|
||||
_ImmovablesCostRecordExcel.ImmovablesCostRecordExcelMainGroup.Sorting.Add(_SortRecordMainGroup)
|
||||
Dim _ImmovablesCostRecordGroup As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), CriteriaOperator.Parse("1=2"))
|
||||
Dim _ImmovablesCostRecordMainGroup_Collection As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordMainGroup), CriteriaOperator.Parse("1=2"))
|
||||
|
||||
For Each _ImmovablesCostRecordExcelMainGroup As ImmovablesCostRecordExcelMainGroup In _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelMainGroup
|
||||
If _ImmovablesCostRecordExcelMainGroup.IsUseInExcel = True Then
|
||||
If _ImmovablesCostRecordExcelMainGroup.ImmovablesCostRecordMainGroup.ImmovablesCostRecordGroup.Count > 0 Then
|
||||
_ImmovablesCostRecordMainGroup_Collection.Add(_ImmovablesCostRecordExcelMainGroup.ImmovablesCostRecordMainGroup)
|
||||
|
||||
For Each _ImmovablesCostRecordGroup_Act As ImmovablesCostRecordGroup In _ImmovablesCostRecordExcelMainGroup.ImmovablesCostRecordMainGroup.ImmovablesCostRecordGroup
|
||||
_ImmovablesCostRecordGroup.Add(_ImmovablesCostRecordGroup_Act)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_ImmovablesCostRecordGroup.Sorting.Add(_SortRecordGroup)
|
||||
Dim _ik As Int16 = 0
|
||||
Dim _ColumnHeaderName As New ArrayList
|
||||
Dim _BackColor As Drawing.Color = Drawing.ColorTranslator.FromHtml("&Hfff0f0f0")
|
||||
Dim _Average As Double = 0
|
||||
|
||||
_FpSpread.Save(Path.GetTempPath + "SaveSp.xml", False)
|
||||
Dim _FpSpread_Orig As FpSpread = New FpSpread()
|
||||
_FpSpread_Orig.Open(Path.GetTempPath + "SaveSp.xml")
|
||||
|
||||
|
||||
_FpSpread.Reset()
|
||||
|
||||
_FpSpread.EditModeReplace = True
|
||||
|
||||
_FpSpread.ActiveSheet.ColumnHeader.RowCount = 5
|
||||
_FpSpread.ActiveSheet.RowHeader.ColumnCount = 3
|
||||
_FpSpread.ActiveSheet.ColumnCount = 5 * _ImmovablesCostRecordGroup.Count
|
||||
_FpSpread.ActiveSheet.RowCount = _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Count
|
||||
|
||||
'Oszlop fejléc
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, (5 * _ImmovablesCostRecordGroup.Count))
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(0, 0).Text = "Leolvasások"
|
||||
|
||||
'---------------------------Oszlofejléc felépítése----------------------------
|
||||
Dim _MainGroupIndex As Int16 = 0
|
||||
Dim _RecordGroupIndex As Int16 = 0
|
||||
For Each _ImmovablesCostRecordMainGroup As ImmovablesCostRecordMainGroup In _ImmovablesCostRecordMainGroup_Collection
|
||||
Dim _ImmovablesCostRecordGroup_Collection As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), _
|
||||
CriteriaOperator.Parse("ImmovablesCostRecordMainGroup.Oid=?", _ImmovablesCostRecordMainGroup.Oid))
|
||||
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(1, _MainGroupIndex, 1, _ImmovablesCostRecordGroup_Collection.Count * 5)
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(1, _MainGroupIndex).Text = _ImmovablesCostRecordMainGroup.GroupName
|
||||
|
||||
_ImmovablesCostRecordGroup_Collection.Sorting.Add(_SortRecordGroup)
|
||||
For Each _ImmovablesCostRecordGroup_ACT As ImmovablesCostRecordGroup In _ImmovablesCostRecordGroup_Collection
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(2, _MainGroupIndex + _RecordGroupIndex, 1, 5)
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(2, _MainGroupIndex + _RecordGroupIndex).Text = _ImmovablesCostRecordGroup_ACT.Oid.ToString
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Rows(2).Visible = False
|
||||
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(3, _MainGroupIndex + _RecordGroupIndex, 1, 5)
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(3, _MainGroupIndex + _RecordGroupIndex).Text = _ImmovablesCostRecordGroup_ACT.ShortName
|
||||
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex).Text = "Elõzõ" 'Fix érték 1
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 1).Text = "Aktuális" 'Fix érték 2
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 2).Text = "Különbség" 'Fix érték 3
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 3).Text = "Egységár" 'Fix érték 4
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 4).Text = "Érték" 'Fix érték 5
|
||||
|
||||
If _ImmovablesCostRecordGroup_ACT.CostRecordBaseMode = eCostRecordBaseMode.eFix Then
|
||||
_FpSpread.ActiveSheet.Columns(_MainGroupIndex + _RecordGroupIndex).Visible = False
|
||||
_FpSpread.ActiveSheet.Columns(_MainGroupIndex + _RecordGroupIndex + 1).Visible = False
|
||||
_FpSpread.ActiveSheet.Columns(_MainGroupIndex + _RecordGroupIndex + 2).Visible = False
|
||||
End If
|
||||
|
||||
_RecordGroupIndex += 5
|
||||
Next
|
||||
_RecordGroupIndex = 0
|
||||
_MainGroupIndex += _ImmovablesCostRecordGroup_Collection.Count * 5
|
||||
Next
|
||||
|
||||
|
||||
'---------------------------Sor fejléc------------------------------------
|
||||
_FpSpread.ActiveSheet.AddRowHeaderSpanCell(0, 0, _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Count, 1)
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(0, 0).Column.Width = 60
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(0, 0).Text = "Ingatlanok"
|
||||
|
||||
'----------------------------Sorfejléc felépítése--------------------------------
|
||||
For Each _ImmovablesCostRecordExcelImmovables As ImmovablesCostRecordExcelImmovables In _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables
|
||||
Dim _Immovables As Immovables = TryCast(_ImmovablesCostRecordExcelImmovables.Immovables, Immovables)
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Column.Width = 100
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Row.Height = 30
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 1).Text = _Immovables.Oid.ToString
|
||||
_FpSpread.ActiveSheet.RowHeader.Columns(1).Visible = False 'Oid elrejtése
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Text = _Immovables.UniqueObjects.Name
|
||||
_ik += 1
|
||||
Next
|
||||
|
||||
For _ik = 0 To _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Count - 1
|
||||
Dim _Immovables As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects.Name=?", _FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Text))
|
||||
If _Immovables IsNot Nothing Then
|
||||
For _jk = 0 To _FpSpread.ActiveSheet.ColumnCount - 1 Step 5
|
||||
Dim _ImmovablesCostRecordGroupOID As String = _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _jk).Text
|
||||
If _ImmovablesCostRecordGroupOID <> "" Then
|
||||
Dim _ActImmovablesCostRecordGroup As ImmovablesCostRecordGroup = _ocur.FindObject(Of ImmovablesCostRecordGroup) _
|
||||
(CriteriaOperator.Parse("Oid=?", _ImmovablesCostRecordGroupOID))
|
||||
Dim _NumCellsType As New CellType.NumberCellType
|
||||
Dim nfi As NumberFormatInfo = New CultureInfo("hu-HU", False).NumberFormat
|
||||
_NumCellsType.DecimalSeparator = nfi.NumberDecimalSeparator
|
||||
_NumCellsType.Separator = nfi.NumberGroupSeparator
|
||||
_NumCellsType.DecimalPlaces = _ActImmovablesCostRecordGroup.DecimalPlace
|
||||
_NumCellsType.NegativeRed = True
|
||||
|
||||
Select Case _ActImmovablesCostRecordGroup.CostRecordBaseMode
|
||||
Case eCostRecordBaseMode.eFix
|
||||
Select Case _ActImmovablesCostRecordGroup.eCostRecordMode
|
||||
Case eCostRecordMode.eNormal
|
||||
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value = _FpSpread_Orig.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).BackColor = _BackColor
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).ToString)
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).TabStop = False
|
||||
|
||||
|
||||
Case eCostRecordMode.eQuarter
|
||||
Dim _ImmovablesQuater As Double = 0
|
||||
Select Case _Immovables.ImmovablesTypes
|
||||
Case eImmovablesTypes.eApartment
|
||||
_ImmovablesQuater = TryCast(_Immovables, Apartments).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eContainer
|
||||
_ImmovablesQuater = TryCast(_Immovables, Container).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eGarage
|
||||
_ImmovablesQuater = TryCast(_Immovables, Garages).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eOffice
|
||||
_ImmovablesQuater = TryCast(_Immovables, Offices).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eStudentHostel
|
||||
_ImmovablesQuater = 1 'TryCast(_ImmovablesCR.Immovables, StudentHostel).????
|
||||
End Select
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value = _ImmovablesQuater
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value = _FpSpread_Orig.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).BackColor = _BackColor
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).ToString) & _
|
||||
"*" & (_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).ToString)
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).TabStop = False
|
||||
|
||||
End Select
|
||||
Case eCostRecordBaseMode.eCosuption
|
||||
Select Case _ActImmovablesCostRecordGroup.eCostRecordMode
|
||||
Case eCostRecordMode.eNormal
|
||||
Dim _ActImmovablesCostRecord As ImmovablesCostRecord = _ocur.FindObject(Of ImmovablesCostRecord) _
|
||||
(CriteriaOperator.Parse("ImmovablesCostRecordGroup=? AND Immovables=?", _ActImmovablesCostRecordGroup, _Immovables))
|
||||
|
||||
If _ActImmovablesCostRecord IsNot Nothing Then
|
||||
Dim _PrevEvents As ImmovablesCostRecordEvents
|
||||
If _ActImmovablesCostRecord.ImmovablesCostRecordEvents.Count > 0 Then
|
||||
Dim _SortEvents As New SortProperty("ReadDate", DB.SortingDirection.Descending)
|
||||
_ActImmovablesCostRecord.ImmovablesCostRecordEvents.Sorting.Add(_SortEvents)
|
||||
_PrevEvents = _ActImmovablesCostRecord.ImmovablesCostRecordEvents(0)
|
||||
|
||||
If _PrevEvents.IsReader = True Then
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Value = 0
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Tag = _PrevEvents.ImmovablesCostRecord.Oid.ToString
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value = _PrevEvents.ReadedValue
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Tag = _PrevEvents.Oid.ToString
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
Else
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Value = _PrevEvents.ReadedValue
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Tag = _PrevEvents.ImmovablesCostRecord.Oid.ToString
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value = 0
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).BackColor = _BackColor
|
||||
End If
|
||||
|
||||
Else
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Value = 0
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Tag = _ActImmovablesCostRecord.Oid.ToString
|
||||
|
||||
End If
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).TabStop = False
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).CellType = _NumCellsType
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).ToString) & _
|
||||
"-" & (_FpSpread.ActiveSheet.Cells(_ik, _jk).ToString)
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).TabStop = False
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value = _FpSpread_Orig.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).ToString) & _
|
||||
"*" & (_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).ToString)
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).TabStop = False
|
||||
|
||||
End If
|
||||
Case eCostRecordMode.eQuarter
|
||||
'Beep()
|
||||
MsgBox("---===>>> W T F <<<===---")
|
||||
End Select
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
If File.Exists(Path.GetTempPath + "SaveSp.xml") Then
|
||||
File.Delete(Path.GetTempPath + "SaveSp.xml")
|
||||
End If
|
||||
_FpSpread.Refresh()
|
||||
End Sub
|
||||
Private Sub aFinalizeCostRecords_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalizeCostRecords.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ColumnCount As Int16 = _FpSpread.ActiveSheet.ColumnCount
|
||||
Dim _RowCount As Int16 = _FpSpread.ActiveSheet.RowCount
|
||||
Dim _DelImmovablesCostRecordEvents_Collection As New ArrayList
|
||||
_WaitFormClass.Initwork(1, 1, _RowCount)
|
||||
For _ik = 0 To _RowCount - 1
|
||||
Dim _Immovables As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects.Name=?", _FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Text))
|
||||
For _jk = 0 To _ColumnCount - 1 Step 5
|
||||
Dim _ImmovablesCostRecordGroupOID As String = _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _jk).Text
|
||||
If _ImmovablesCostRecordGroupOID <> "" Then
|
||||
Dim _ActImmovablesCostRecordGroup As ImmovablesCostRecordGroup = _ocur.FindObject(Of ImmovablesCostRecordGroup) _
|
||||
(CriteriaOperator.Parse("Oid=?", _ImmovablesCostRecordGroupOID))
|
||||
Dim _ActImmovablesCostRecord As ImmovablesCostRecord = _ocur.FindObject(Of ImmovablesCostRecord) _
|
||||
(CriteriaOperator.Parse("ImmovablesCostRecordGroup=? AND Immovables=?", _ActImmovablesCostRecordGroup, _Immovables))
|
||||
If _ActImmovablesCostRecord IsNot Nothing Then
|
||||
Dim _NewImmovablesCostRecordEvents As ImmovablesCostRecordEvents = _ocur.CreateObject(Of ImmovablesCostRecordEvents)()
|
||||
_NewImmovablesCostRecordEvents.ReadedValue = _FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value
|
||||
If _FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Tag IsNot Nothing Then
|
||||
Dim _DelImmovablesCostRecordEvents As ImmovablesCostRecordEvents = _ocur.FindObject(Of ImmovablesCostRecordEvents)(CriteriaOperator.Parse("Oid=?", _FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Tag.ToString))
|
||||
|
||||
_NewImmovablesCostRecordEvents.ReadDate = _ImmovablesCostRecordExcel.DateExecution '_DelImmovablesCostRecordEvents.ReadDate
|
||||
|
||||
_DelImmovablesCostRecordEvents_Collection.Add(_DelImmovablesCostRecordEvents)
|
||||
Else
|
||||
_NewImmovablesCostRecordEvents.ReadDate = _ImmovablesCostRecordExcel.DateExecution 'GetSQLTime(_ocur.Session)
|
||||
End If
|
||||
|
||||
_NewImmovablesCostRecordEvents.ImmovablesCostRecordExcel = _ImmovablesCostRecordExcel
|
||||
_NewImmovablesCostRecordEvents.ImmovablesCostRecord = _ActImmovablesCostRecord
|
||||
_NewImmovablesCostRecordEvents.ReadedValuePrev = _FpSpread.ActiveSheet.Cells(_ik, _jk).Value
|
||||
_NewImmovablesCostRecordEvents.ReadedValueDiff = _FpSpread.ActiveSheet.Cells(_ik, _jk + 2).Value
|
||||
_NewImmovablesCostRecordEvents.ReadedValuePrice = _FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_NewImmovablesCostRecordEvents.ReadedValueSumPrice = _FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Value
|
||||
_NewImmovablesCostRecordEvents.ReadIndex += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_WaitFormClass.DoWork()
|
||||
System.Windows.Forms.Application.DoEvents()
|
||||
Next
|
||||
_ocur.Delete(_DelImmovablesCostRecordEvents_Collection)
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_Waitformclass.FinalWork()
|
||||
_FpSpread.Refresh()
|
||||
_FpSpread.Enabled = False
|
||||
End Sub
|
||||
Private Sub aImportCostRecords_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aImportCostRecords.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As UnitOfWork = New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _cs As String
|
||||
Dim _ik As Int16 = 0
|
||||
Dim _Count As Long = 0
|
||||
Dim _Rtime As New ArrayList
|
||||
Dim _SID As New ArrayList
|
||||
Dim _WH As New ArrayList
|
||||
Dim _QM1 As New ArrayList
|
||||
Dim _QM2 As New ArrayList
|
||||
Dim _ARAM As New ArrayList
|
||||
Dim _ColumnHeaderName As New ArrayList
|
||||
Dim _BackColor As Drawing.Color = Drawing.ColorTranslator.FromHtml("&Hfff0f0f0")
|
||||
'Dim _NumCellsType As New CellType.NumberCellType
|
||||
|
||||
'Dim nfi As NumberFormatInfo = New CultureInfo("hu-HU", False).NumberFormat
|
||||
'_NumCellsType.DecimalSeparator = nfi.NumberDecimalSeparator
|
||||
'_NumCellsType.Separator = nfi.NumberGroupSeparator
|
||||
'_NumCellsType.DecimalPlaces = 2
|
||||
'_NumCellsType.NegativeRed = True
|
||||
|
||||
Dim _ActImmovables As XPCollection = _ocur.CreateCollection(GetType(Immovables), CriteriaOperator.Parse("1=2"))
|
||||
Dim _ImmovablesCostRecordGroup As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), CriteriaOperator.Parse("1=1"))
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
_cs = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_cs += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_cs += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim conn As New OleDbConnection(_cs)
|
||||
Dim cmd As New OleDbCommand
|
||||
Dim dr As OleDbDataReader
|
||||
Dim dr1 As OleDbDataReader
|
||||
Dim mSQL As String
|
||||
Dim _UpdatedCount As Long = 0
|
||||
|
||||
|
||||
Try
|
||||
|
||||
mSQL = "select * from [Munka1$]"
|
||||
cmd.CommandTimeout = 60
|
||||
cmd.Connection = conn
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = mSQL
|
||||
conn.Open()
|
||||
|
||||
If conn.State = ConnectionState.Open Then
|
||||
dr1 = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
|
||||
While dr1.Read
|
||||
If dr1(0).ToString <> "" And dr1(0).ToString <> "RTIME" Then
|
||||
_Count += 1
|
||||
End If
|
||||
End While
|
||||
dr1.Close()
|
||||
|
||||
dr = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
_WaitFormClass.Initwork(1, 1, _Count)
|
||||
While dr.Read
|
||||
If dr(0).ToString <> "" And dr(0).ToString <> "RTIME" Then
|
||||
|
||||
_Rtime.Add(dr(0).ToString) '"RTIME"
|
||||
_SID.Add(dr(1).ToString) '"SID"
|
||||
_WH.Add(dr(4).ToString) '"WH"
|
||||
_QM1.Add(dr(2).ToString) '"QH[1]"
|
||||
_QM2.Add(dr(3).ToString) '"QH[2]"
|
||||
_ARAM.Add(dr(5).ToString) '"ARAM"
|
||||
_WaitFormClass.DoWork()
|
||||
System.Windows.Forms.Application.DoEvents()
|
||||
End If
|
||||
End While
|
||||
|
||||
dr.Close()
|
||||
End If
|
||||
conn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
conn.Close()
|
||||
Finally
|
||||
_Waitformclass.FinalWork()
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
Try
|
||||
|
||||
If _FpSpread.ActiveSheet.RowCount = 1 And _FpSpread.ActiveSheet.ColumnCount = 1 Then Throw New Exception("*Üres az Excel file, nem lehet adatokat importálni!")
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ImmovablesCostRecordExcelImmovables As ImmovablesCostRecordExcelImmovables
|
||||
For _ik = 0 To _SID.Count - 1
|
||||
Dim _ImmovablesCostRecord_Collection As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecord), _
|
||||
CriteriaOperator.Parse("SID=?", _SID(_ik)))
|
||||
_WaitFormClass.Initwork(1, 1, _ImmovablesCostRecord_Collection.Count)
|
||||
For Each _ImmovablesCostRecord As ImmovablesCostRecord In _ImmovablesCostRecord_Collection
|
||||
|
||||
_ImmovablesCostRecordExcelImmovables = _ocur.FindObject(Of ImmovablesCostRecordExcelImmovables)(CriteriaOperator.Parse("Immovables=? AND ImmovablesCostRecordExcel=?", _
|
||||
_ImmovablesCostRecord.Immovables, _ImmovablesCostRecordExcel))
|
||||
If _ImmovablesCostRecordExcelImmovables IsNot Nothing Then
|
||||
For _jk = 0 To _FpSpread.ActiveSheet.RowCount - 1
|
||||
If _FpSpread.ActiveSheet.RowHeader.Cells(_jk, 1).Text = _ImmovablesCostRecordExcelImmovables.Immovables.Oid.ToString Then
|
||||
|
||||
For _lk = 0 To _FpSpread.ActiveSheet.ColumnCount - 1 Step 5
|
||||
If _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _lk).Text = _ImmovablesCostRecord.ImmovablesCostRecordGroup.Oid.ToString Then
|
||||
Dim _NumCellsType As New CellType.NumberCellType
|
||||
Dim nfi As NumberFormatInfo = New CultureInfo("hu-HU", False).NumberFormat
|
||||
_NumCellsType.DecimalSeparator = nfi.NumberDecimalSeparator
|
||||
_NumCellsType.Separator = nfi.NumberGroupSeparator
|
||||
_NumCellsType.DecimalPlaces = _ImmovablesCostRecord.ImmovablesCostRecordGroup.DecimalPlace
|
||||
_NumCellsType.NegativeRed = True
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 2).CellType = _NumCellsType
|
||||
Select Case _ImmovablesCostRecord.SIDChild
|
||||
Case eSIDChild.SID_QM1
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_QM1(_ik))
|
||||
Case eSIDChild.SID_QM2
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_QM2(_ik))
|
||||
Case eSIDChild.SID_WH
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_WH(_ik))
|
||||
Case eSIDChild.SID_ARAM
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_ARAM(_ik))
|
||||
Case eSIDChild.SID_NONE
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
_WaitFormClass.DoWork()
|
||||
System.Windows.Forms.Application.DoEvents()
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
Finally
|
||||
_Waitformclass.FinalWork()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aTempLikor_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aTempLikor.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As UnitOfWork = New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _cs As String
|
||||
Dim _ImmovablesName As New ArrayList
|
||||
Dim _SID As New ArrayList
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
|
||||
_cs = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_cs += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_cs += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim conn As New OleDbConnection(_cs)
|
||||
Dim cmd As New OleDbCommand
|
||||
Dim dr As OleDbDataReader
|
||||
Dim mSQL As String
|
||||
Dim _Count As Long = 0
|
||||
Dim _UpdatedCount As Long = 0
|
||||
Try
|
||||
|
||||
mSQL = "select * from [Sheet$]"
|
||||
cmd.CommandTimeout = 60
|
||||
cmd.Connection = conn
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = mSQL
|
||||
conn.Open()
|
||||
|
||||
If conn.State = ConnectionState.Open Then
|
||||
|
||||
dr = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
|
||||
While dr.Read
|
||||
If dr(0).ToString <> "" Or dr(0).ToString <> "RTIME" Then
|
||||
'_form.ProgressBarControl1.Properties.Maximum = _Count
|
||||
|
||||
_ImmovablesName.Add(dr(0).ToString)
|
||||
_SID.Add(dr(1).ToString)
|
||||
|
||||
'_WaitFormClass.DoWork
|
||||
'System.Windows.Forms.Application.DoEvents()
|
||||
End If
|
||||
End While
|
||||
dr.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
|
||||
Dim _ImmovablesCostRecordGroup As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), CriteriaOperator.Parse("1=1"))
|
||||
Dim _ik As Int16 = 0
|
||||
For Each _ActImmo In _ImmovablesName
|
||||
Dim _Immo As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects.Name=?", _ActImmo))
|
||||
If _Immo IsNot Nothing Then
|
||||
For Each _ActImmovablesCostRecordGroup In _ImmovablesCostRecordGroup
|
||||
Dim _ImmovablesCostRecord As ImmovablesCostRecord = _ocur.CreateObject(Of ImmovablesCostRecord)()
|
||||
_ImmovablesCostRecord.Immovables = _ocur.GetObjectByKey(Of Immovables)(_Immo.Oid)
|
||||
_ImmovablesCostRecord.SID = _SID(_ik)
|
||||
_ImmovablesCostRecord.ImmovablesCostRecordGroup = _ActImmovablesCostRecordGroup
|
||||
_ImmovablesCostRecord.ShortName = TryCast(_ActImmovablesCostRecordGroup, ImmovablesCostRecordGroup).ShortName
|
||||
|
||||
_ImmovablesCostRecord.Save()
|
||||
Next
|
||||
End If
|
||||
_ik += 1
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
End Sub
|
||||
Private Sub aSetUnitPrice_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSetUnitPrice.CustomizePopupWindowParams
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _SetUnitPrice_PopUp As SetUnitPrice_PopUp = _onew.CreateObject(Of SetUnitPrice_PopUp)()
|
||||
_SetUnitPrice_PopUp.UnitPrice = 1
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "SetUnitPrice_PopUp_DetailView", False, _SetUnitPrice_PopUp)
|
||||
End Sub
|
||||
Private Sub aSetUnitPrice_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSetUnitPrice.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SetUnitPrice_PopUp As SetUnitPrice_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), SetUnitPrice_PopUp)
|
||||
Dim _Unitprice As Double = _SetUnitPrice_PopUp.UnitPrice
|
||||
Dim _ImmovablesCostRecordGroup As ImmovablesCostRecordGroup = _ocur.GetObjectByKey(Of ImmovablesCostRecordGroup)(_SetUnitPrice_PopUp.ImmovablesCostRecordGroup.Oid)
|
||||
Dim _ColumnIndex As Int16 = 0
|
||||
For _ik As Int16 = 0 To _FpSpread.ActiveSheet.ColumnHeader.Columns.Count / 5 - 1
|
||||
If _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _ik * 5).Text = _ImmovablesCostRecordGroup.Oid.ToString Then
|
||||
_ColumnIndex = _ik * 5 + 3
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If _ColumnIndex <> 0 Then
|
||||
For _ik As Int16 = 0 To _FpSpread.ActiveSheet.RowCount - 1
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _ColumnIndex).Value = _Unitprice
|
||||
Next
|
||||
|
||||
Else
|
||||
Throw New Exception("*Nem lehet beazonosítani a mérőórát!")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
Partial Class ImmovablesVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aImmovables_ImportLotNumber = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aImmovables_ImportLotNumber
|
||||
'
|
||||
Me.aImmovables_ImportLotNumber.Caption = "aImmovables_ImportLotNumber"
|
||||
Me.aImmovables_ImportLotNumber.ConfirmationMessage = Nothing
|
||||
Me.aImmovables_ImportLotNumber.Id = "aImmovables_ImportLotNumber"
|
||||
Me.aImmovables_ImportLotNumber.ImageName = Nothing
|
||||
Me.aImmovables_ImportLotNumber.Shortcut = Nothing
|
||||
Me.aImmovables_ImportLotNumber.Tag = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TargetObjectsCriteria = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TargetObjectType = GetType(Nuvolar.[Module].Immovables)
|
||||
Me.aImmovables_ImportLotNumber.TargetViewId = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aImmovables_ImportLotNumber.ToolTip = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aImmovables_ImportLotNumber As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aImmovables_ImportLotNumber.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>224, 135</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Data.OleDb
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class ImmovablesVC
|
||||
Inherits Nuvolar.Module.ImmovablesVC
|
||||
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.FinalWork
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.FinalWork
|
||||
End Sub
|
||||
Private Sub aImmovables_ImportLotNumber_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aImmovables_ImportLotNumber.Execute
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _Array_UniqueObjects As New ArrayList
|
||||
Dim _Array_ImmovablesGroups As New ArrayList
|
||||
Dim _Array_ImmovablesType As New ArrayList
|
||||
Dim _Array_LotNumber As New ArrayList
|
||||
Dim _Array_ZIP As New ArrayList
|
||||
Dim _Array_City As New ArrayList
|
||||
Dim _Array_Street As New ArrayList
|
||||
Dim _MissingImmovable As Long = 0
|
||||
Dim _MissingImmovablesUO As New ArrayList
|
||||
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
_OpenFileDialog.Filter = "Xls Files (.xls)|*.xls|Xlsx Files (.xlsx)|*.xlsx|All Files (*.*)|*.*"
|
||||
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
If Not String.IsNullOrEmpty(_OpenFileDialog.FileName) Then
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
|
||||
Dim _ConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_ConnectionString += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_ConnectionString += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim _OleDbConnection As New OleDbConnection(_ConnectionString)
|
||||
Dim _OleDbCommand As New OleDbCommand
|
||||
Dim _OleDbDataReader As OleDbDataReader
|
||||
Dim _mSQL As String
|
||||
Dim _UpdatedCount As Long = 0
|
||||
|
||||
'_WaitFormClass.InitWork
|
||||
Try
|
||||
|
||||
_mSQL = "select * from [Sheet$]"
|
||||
_OleDbCommand.CommandTimeout = 60
|
||||
_OleDbCommand.Connection = _OleDbConnection
|
||||
_OleDbCommand.CommandType = CommandType.Text
|
||||
_OleDbCommand.CommandText = _mSQL
|
||||
_OleDbConnection.Open()
|
||||
|
||||
If _OleDbConnection.State = ConnectionState.Open Then
|
||||
_OleDbDataReader = _OleDbCommand.ExecuteReader(CommandBehavior.SingleResult)
|
||||
While _OleDbDataReader.Read
|
||||
If Not String.IsNullOrEmpty(_OleDbDataReader(0).ToString) Then
|
||||
_Array_UniqueObjects.Add(_OleDbDataReader(0).ToString)
|
||||
_Array_ImmovablesGroups.Add(_OleDbDataReader(1).ToString)
|
||||
_Array_ImmovablesType.Add(_OleDbDataReader(2).ToString)
|
||||
_Array_LotNumber.Add(_OleDbDataReader(3).ToString)
|
||||
_Array_ZIP.Add(_OleDbDataReader(4).ToString)
|
||||
_Array_City.Add(_OleDbDataReader(5).ToString)
|
||||
_Array_Street.Add(_OleDbDataReader(6).ToString)
|
||||
End If
|
||||
End While
|
||||
|
||||
_OleDbDataReader.Close()
|
||||
End If
|
||||
_OleDbConnection.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
_OleDbConnection.Close()
|
||||
End Try
|
||||
|
||||
|
||||
_WaitFormClass.InitWork(0, 1, _Array_UniqueObjects.Count)
|
||||
For ik = 0 To _Array_UniqueObjects.Count - 1 Step 1
|
||||
Dim _UniqueObjects As UniqueObjects = _ocur.FindObject(Of UniqueObjects)(CriteriaOperator.Parse("Name=?", _Array_UniqueObjects(ik)))
|
||||
If _UniqueObjects IsNot Nothing Then
|
||||
Dim _Immovables As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects=?", _UniqueObjects))
|
||||
If _Immovables IsNot Nothing Then
|
||||
_Immovables.LotNumber = _Array_LotNumber(ik)
|
||||
|
||||
If _Immovables.Address Is Nothing Then
|
||||
Dim _Address As New DevExpress.Persistent.BaseImpl.Address(_ocur.Session)
|
||||
_Address.ZipPostal = _Array_ZIP(ik)
|
||||
_Address.City = _Array_City(ik)
|
||||
_Address.Street = _Array_Street(ik)
|
||||
|
||||
_Immovables.Address = _Address
|
||||
End If
|
||||
Else
|
||||
_MissingImmovable += 1
|
||||
_MissingImmovablesUO.Add(_Array_UniqueObjects(ik))
|
||||
End If
|
||||
End If
|
||||
_WaitFormClass.DoWork()
|
||||
Next
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
_Waitformclass.FinalWork()
|
||||
If _MissingImmovable > 0 Then
|
||||
Dim _UOList As String = ""
|
||||
For Each _UO As String In _MissingImmovablesUO
|
||||
_UOList += _UO + vbNewLine + vbNewLine
|
||||
Next
|
||||
_UOList += vbNewLine
|
||||
MsgBox(String.Format("{0} db ingatlant nem lehet beazonosítani az egyedi azonosító alapján! {1}", _MissingImmovable, _UOList))
|
||||
End If
|
||||
End If
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
|
||||
End Sub
|
||||
End Class
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class SetUnitPrice_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
Private _ImmovablesCostRecordMainGroup As ImmovablesCostRecordMainGroup
|
||||
Private _ImmovablesCostRecordGroup As ImmovablesCostRecordGroup
|
||||
Private _UnitPrice As Double
|
||||
|
||||
Property ImmovablesCostRecordExcelMainGroup As ImmovablesCostRecordMainGroup
|
||||
Get
|
||||
Return _ImmovablesCostRecordMainGroup
|
||||
End Get
|
||||
Set(value As ImmovablesCostRecordMainGroup)
|
||||
SetPropertyValue("ImmovablesCostRecordMainGroup", _ImmovablesCostRecordMainGroup, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("ImmovablesCostRecordMainGroup='@This.ImmovablesCostRecordExcelMainGroup'")>
|
||||
Property ImmovablesCostRecordGroup As ImmovablesCostRecordGroup
|
||||
Get
|
||||
Return _ImmovablesCostRecordGroup
|
||||
End Get
|
||||
Set(value As ImmovablesCostRecordGroup)
|
||||
SetPropertyValue("ImmovablesCostRecordGroup", _ImmovablesCostRecordGroup, value)
|
||||
End Set
|
||||
End Property
|
||||
Property UnitPrice As Double
|
||||
Get
|
||||
Return _UnitPrice
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("UnitPrice", _UnitPrice, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Reference in New Issue
Block a user