Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mmpicker control and MM.NET WCF
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01312538
Message ID:
01312841
Views:
21
Hi Kevin,

Thanks for the info.

I have a class called MymmPickListBusinessObject which inherits from mmPickListBusinessObject in my business object project. I have a factory method in my Windows application that overrides CreatePickListBusinessObject.


I just want to call MymmPickListBusinessObject when users click on certain mmpicker controls. Someone how the click event of mmpicker control doesn't that triggered when the user clicks on the control. I am having trouble to know which class to return from the factory i.e Return MyBase.CreatePickListBusinessObject() or
Return New MymmPickListBusinessObject


I am basically looking for an event or method or property that I can call so I can flag which class to call from the factory.
Public Overrides Function CreatePickListBusinessObject() As  OakLeaf.MM.Main.Business.mmPickListBusinessObject
                if Flag = "local" then
                  Return MyBase.CreatePickListBusinessObject()
                else
                      Return New MymmPickListBusinessObject
                end if
    End Function

Question 2: I have different Windows application that calls the same WCF Service and have followed the instructions in the dev guide. I have the following key in the app.config file
     <add key="DefaultDataAccessMode" value="wcf" />
and have a factory method in my windows application
                Public Class Factory
    Inherits OakLeaf.MM.Main.Windows.Forms.mmFactoryDesktop

    Public Overrides Function CreateDataAccessObject(ByVal dataAccessClassName As String) As OakLeaf.MM.Main.Data.mmDataAccessBase

        If mmAppBase.DefaultDataAccessMode = mmDataAccessMode.Local Then
            Return MyBase.CreateDataAccessObject(dataAccessClassName)
        Else
            Dim binding As New WSHttpBinding()
            binding.MaxReceivedMessageSize = 147483647
            Dim address As New EndpointAddress("http://ykhanlt/OSPService/Service.svc/mex")
            Return New mmDataAccessWCFSql(binding, address)
        End If

    End Function
End Class
I get the following message "The ConnectionString property has not been initialized"
below is the stack when I try to access data remotely.
                 at System.Data.SqlClient.SqlConnection.PermissionDemand()
   at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbDataAdapter dbAdapter, String tableName, Boolean clearOnFill)
   at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill)
   at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill)
   at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataTable(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] cmdParams)
   at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntityList(String command, String databaseKey, CommandType cmdType, IDbDataParameter[] cmdParams)
   at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntityList(String command, String databaseKey, IDbDataParameter[] cmdParams)
   at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntityList(String command, IDbDataParameter[] cmdParams)
   at ACELO.OSP.BUSINESS.OSPSCHOOLIDENTIFIER.GetActiveSchoolInfo(Boolean Active) in C:\OSMS\Acelo.OSP.Business\Acelo.OSP.Business\OSPSCHOOLIDENTIFIER.vb:line 109
   at ACELO.OSP.WINDOW.ACHProcessForm..ctor() in C:\OSMS\Acelo.OSP.Window\Acelo.OSP.Window\ACHProcessForm.vb:line 70
   at ACELO.OSP.WINDOW.ACHProcessForm.get_FormInstance() in C:\OSMS\Acelo.OSP.Window\Acelo.OSP.Window\ACHProcessForm.vb:line 80
   at ACELO.OSP.WINDOW.MainForm.TestToolStripMenuItem_Click(Object sender, EventArgs e) in C:\OSMS\Acelo.OSP.Window\Acelo.OSP.Window\MainForm.vb:line 66
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at ACELO.OSP.WINDOW.AppMainEntry.Main() in C:\OSMS\Acelo.OSP.Window\Acelo.OSP.Window\Main.vb:line 53   
Thanks
Yassin
Previous
Reply
Map
View

Click here to load this message in the networking platform