First create solution
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
||||
Partial Class HRPersonEventVC
|
||||
|
||||
<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.aSelectHRPersonToScheduler = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aSelectHRPersonToScheduler
|
||||
'
|
||||
Me.aSelectHRPersonToScheduler.AcceptButtonCaption = Nothing
|
||||
Me.aSelectHRPersonToScheduler.CancelButtonCaption = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Caption = "aSelect HRPerson To Scheduler"
|
||||
Me.aSelectHRPersonToScheduler.ConfirmationMessage = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Id = "aSelectHRPersonToScheduler"
|
||||
Me.aSelectHRPersonToScheduler.ImageName = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Shortcut = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Tag = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TargetObjectsCriteria = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TargetObjectType = GetType(Nuvolar.[Module].HRPersonEvent)
|
||||
Me.aSelectHRPersonToScheduler.TargetViewId = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aSelectHRPersonToScheduler.ToolTip = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSelectHRPersonToScheduler As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
@@ -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="aSelectHRPersonToScheduler.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>
|
||||
@@ -0,0 +1,123 @@
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports System.Collections.Generic
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.ExpressApp.Scheduler
|
||||
Imports DevExpress.ExpressApp.Scheduler.Win
|
||||
Imports DevExpress.Data.Helpers
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.XtraScheduler
|
||||
|
||||
|
||||
Public Class HRPersonEventVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _SchedulerListEditor As SchedulerListEditor
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overloads Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
End Sub
|
||||
Protected Overloads Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "HRPersonEvent_ListView_CurrentUser" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
InitSchedulerControl(_SchedulerListEditor.SchedulerControl)
|
||||
Dim _Resources_Collection As XPCollection = TryCast(_SchedulerListEditor.ResourcesDataSource, XPCollection)
|
||||
Dim _HRPerson As HRPerson = _ocur.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _ocur.GetObject(SecuritySystem.CurrentUser)))
|
||||
If _HRPerson Is Nothing Then
|
||||
_Resources_Collection.Criteria = CriteriaOperator.Parse("1=2")
|
||||
Else
|
||||
_Resources_Collection.Criteria = New BinaryOperator("Oid", _HRPerson.Oid)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id Like "HRPersonEvent_ListView*" Then
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
AddHandler _SchedulerListEditor.SchedulerControl.AppointmentViewInfoCustomizing, AddressOf SchedulerListEditor_SchedulerControl_AppointmentViewInfoCustomizing
|
||||
End If
|
||||
End If
|
||||
If View.Id = "HRPersonEvent_ListView_All" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
InitSchedulerControl(_SchedulerListEditor.SchedulerControl)
|
||||
Dim _Resources_Collection As XPCollection = TryCast(_SchedulerListEditor.ResourcesDataSource, XPCollection)
|
||||
Dim _HRPersonEventCriteria As HRPersonEventCriteria = _ocur.FindObject(Of HRPersonEventCriteria)(CriteriaOperator.Parse("ViewID=? and User.Oid=?", View.Id, SecuritySystem.CurrentUser.oid))
|
||||
If _HRPersonEventCriteria IsNot Nothing Then
|
||||
_Resources_Collection.CriteriaString = _HRPersonEventCriteria.Criteria
|
||||
_SchedulerListEditor.SchedulerControl.ActiveViewType = _HRPersonEventCriteria.ActiveViewType
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "HRPersonEvent_ListView_All" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
Dim _HRPersonEventCriteria As HRPersonEventCriteria = _ocur.FindObject(Of HRPersonEventCriteria)(CriteriaOperator.Parse("ViewID=? and User.Oid=?", View.Id, SecuritySystem.CurrentUser.oid))
|
||||
If _HRPersonEventCriteria IsNot Nothing Then
|
||||
_HRPersonEventCriteria.ActiveViewType = _SchedulerListEditor.SchedulerControl.ActiveViewType
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InitSchedulerControl(_SchedulerControl As DevExpress.XtraScheduler.SchedulerControl)
|
||||
_SchedulerControl.Views.DayView.VisibleTime = New TimeOfDayInterval(New TimeSpan(7, 0, 0), New TimeSpan(19, 0, 0))
|
||||
_SchedulerControl.Views.WorkWeekView.VisibleTime = New TimeOfDayInterval(New TimeSpan(7, 0, 0), New TimeSpan(19, 0, 0))
|
||||
_SchedulerControl.OptionsCustomization.AllowAppointmentDragBetweenResources = UsedAppointmentType.None
|
||||
End Sub
|
||||
Private Sub aSelectHRPersonToScheduler_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSelectHRPersonToScheduler.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CS As CollectionSource = New CollectionSource(_onew, GetType(HRPerson))
|
||||
|
||||
e.View = Application.CreateListView("HRPerson_ListView_Select", _CS, False)
|
||||
|
||||
End Sub
|
||||
Private Sub aSelectHRPersonToScheduler_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSelectHRPersonToScheduler.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SchedulerListEditor As SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
Dim _HRPerson As HRPerson
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
Dim _Resources_Collection As XPCollection = TryCast(_SchedulerListEditor.ResourcesDataSource, XPCollection)
|
||||
If _Resources_Collection IsNot Nothing Then
|
||||
Dim Keys As New Collection
|
||||
Keys.Clear()
|
||||
For Each _HRPerson In e.PopupWindow.View.SelectedObjects
|
||||
Keys.Add(_HRPerson.Oid)
|
||||
Next
|
||||
If Keys.Count <= 0 Then
|
||||
_Resources_Collection.Criteria = Nothing
|
||||
Else
|
||||
_Resources_Collection.Criteria = New InOperator("Oid", Keys)
|
||||
End If
|
||||
|
||||
Dim _HRPersonEventCriteria As HRPersonEventCriteria = _ocur.FindObject(Of HRPersonEventCriteria)(CriteriaOperator.Parse("ViewID=? and User.Oid=?", View.Id, SecuritySystem.CurrentUser.oid))
|
||||
If _HRPersonEventCriteria Is Nothing Then
|
||||
_HRPersonEventCriteria = _ocur.CreateObject(Of HRPersonEventCriteria)()
|
||||
End If
|
||||
_HRPersonEventCriteria.User = _ocur.FindObject(Of User)(CriteriaOperator.Parse("Oid=?", SecuritySystem.CurrentUser.oid))
|
||||
_HRPersonEventCriteria.ViewID = View.Id
|
||||
_HRPersonEventCriteria.Criteria = _Resources_Collection.CriteriaString
|
||||
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SchedulerListEditor_SchedulerControl_AppointmentViewInfoCustomizing(sender As Object, e As DevExpress.XtraScheduler.AppointmentViewInfoCustomizingEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class HRPerson_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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,32 @@
|
||||
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
|
||||
|
||||
Public Class HRPerson_VC
|
||||
Inherits Nuvolar.Module.HRPerson_VC
|
||||
|
||||
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
|
||||
End Class
|
||||
Reference in New Issue
Block a user