Hello,
I am creating an application base that will be used for all of our WinForm executables. Attached is the project that illustrates the following three issues:
1. When applying themes to the application, the User Panel's label controls do not update with the chosen "theme" until I run the mouse cursor over the control. Is there a way to force a refresh? Should I have to?
2. Create a new security user and save the new record. Next Edit the same record and try to change the Permissions: Default Action and Restrictions. Notice there should not be any permission records available. The framework throws a Null Reference Exception:
NullReferenceException
Object reference not set to an instance of an object.
Source : MicroFour StrataFrame Security
Stack Trace:
at MicroFour.StrataFrame.Security.UserEditor.SaveData(TreeNode Node, SetDataPiece SetPiece)
at MicroFour.StrataFrame.Security.UserEditor.cboAction_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Should these controls be available if there are no Permission records? Is there a way to more gracefully trap this error?
3. Restart the application. Use the new user created in step 2 to sign on. A SQL exception will occur:
System.Data.SqlClient.SqlException was unhandled by user code
Class=16
ErrorCode=-2146232060
LineNumber=1
Message="Invalid object name 'dbo.SFSUserRolePermissionInfo'."
Number=208
Procedure=""
Server="DEVSVR2"
Source=".Net SqlClient Data Provider"
State=1
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
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(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(DbCommand Command, Boolean RegisterNotification)
at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)
at MicroFour.StrataFrame.Security.BusinessObjects.SFSUserRolePermissionInfoBO.FillByUser(Int32 UserPK)
at MicroFour.StrataFrame.Security.LoggedInUser.CreatePermissionsListRolesOnly(Int32 UserPK)
at MicroFour.StrataFrame.Security.LoggedInUser.CreateNew(SFSUsersBO UserInfo)
at MicroFour.StrataFrame.Security.Login.AttemptLogin(Object sender, EventArgs e)
at ApplicationBase.ETILogin.OnAttemptLogin() in C:\ETIDev\ApplicationBase\ETILogin.vb:line 30
at ApplicationBase.ETILogin.cmdOk_Click(Object sender, EventArgs e) in C:\ETIDev\ApplicationBase\ETILogin.vb:line 282
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
I am unsure about this issue. I do not see any tables, even in your samples that have this name. Could this be caused by the fact I do not have any securable forms created as of yet in this project?
Any ideas would be greatly appreciated!
Ben Kim