Design - Pass User Details Between Objects?

Aug 16, 2010

I'm redesigning an old VB6 application into VB.net and there is one thing I'm not sure on the best way to do. In the VB6 application whenever we created a new instance of a component, we would pass in the user details (user name and the like) so we new who was performing the tasks. However, no that I'm redesigning I've created some nice class designs, but I'm having to add in user details into every class and it just looks wrong.

Is there a VB.net way of doing this so my classes can just have class specific details? Some way so that if my classes need to know who is performing a task, they can get the information themselves, rather than having it passed in whenever the objects are created?

View 2 Replies


ADVERTISEMENT

Get A Details View In ASP.NET To Display The Details Of The Logged-in User Only?

Dec 9, 2011

I'm trying to get a details view in ASP.NET to display the details of the logged-in user only. I have been told to use:

select * from STAFF where USERNAME = user.identity.name

I thought this was too simple to be true and I was correct as it shows no data when I attempt to run.

View 1 Replies

Random Objects - Let The User Input Objects To A Richtextbox 1 Object On Each Line?

Jan 6, 2011

I want to let the user input objects to a richtextbox 1 object on each line, and somehow use Random.Next to select pseudorandomly a few objects, the number 'few' inputted in a textbox.

View 9 Replies

Cannot Move The Buttons And The Other Objects In The Design

Apr 13, 2010

i can not move the buttons and the other objects in the design, now what can i do to move buttons and other objects in the design.

View 3 Replies

Handle Events For Objects NOT Created In The Design Tab?

Jan 10, 2012

I have created a PictureBox array to hold 104 playing cards that are all visible at the same time.I did this with this line in the declarations:Shared Card(104) As PictureBox

And with these lines in the Form_Load module:

For I% = 1 To 104
Card(I%) = New PictureBox
Card(I%).Name = String.Format("Card{0}", I%.ToString)
Card(I%).Size = New Size(71, 96)

[Code]...

I have been successful in creating the array, positioning each and entering the images for all 104 PictureBoxes, but now I want to add code for the event "MouseDown.I copied the code for this event from my VB3 program and VB10 automatically updated the list of parameters, but nothing has linked the objects (Card) to the code.

I have tried to append "Handles Card.MouseDown" as well as several variations with brackets to indicate that it is an array.Auto-complete doesn't include "Card" as an option, and of course, since the array was never an object added to the form design, I can't create the empty module from there.

View 7 Replies

Design - Company --> Customer --> Orders (ignore The Details Of How The Orders Have Products Etc)

Mar 9, 2009

I have a scenario at hand which has some design discussion going on. To break it down in simple words, think about a hierarchy as such Company -----> Customer ------> Orders (ignore the details of how the orders have products etc) if I was to expose an API to work with this, what would be a better design.

a)
Dim comp As New Company
comp.GetInfo(123)
Dim cust As New Customer
cust.Name= "CustomerName"
comp.Add( cust)


b)
Dim custhand As Customerhandler
Dim cust As New Customer
cust.Name= "CustomerName"
custhand.AddCustomer(cust,123) ''123 is CompanyID

View 5 Replies

Pass A List Of Objects To WCF Service?

Apr 26, 2011

I'm trying to pass a list of objects to my WCF service, but it doesn't seem I can pass an object list from my console test application. I have an error that states:

Value of type
'System.Collections.Generic.List(Of
ConsoleTestingApp.ServiceReference1.LetterVariables)'

[code]....

View 1 Replies

Pass Collection Of Objects To BackgroundWorker?

Nov 19, 2010

I have an object of type Dictionary(Of Int16, Polygon) and which contains sometimes up to 15 or so Polygons that i am creating bitmap files with the Polygon. This can take like 20 seconds sometimes so i was trying to pass the full Dictionary to background worker as an argument but i get an issue when trying to access each individual Polygon inside of the Dictionary because the Polygons still belong to the UI thread. How can I access the Polygons inside the Dictionary with the backgroundworker?

Dim worker As New BackgroundWorker
AddHandler worker.DoWork, AddressOf MeasurePolygons
AddHandler worker.RunWorkerCompleted, AddressOf WorkerCompleted
worker.RunWorkerAsync(PolygonCollection)

that is how im calling the thread. PolygonCollection is the Dictionary(Of Int16, Polygon) that contains all the polygons that i will be creating a bitmap file out of.

View 9 Replies

Pass Derived Objects In A Constructure?

May 20, 2010

I am finding that this may not be possible, but am trying to see if anybody has a solution.

I have four classes, two are core classes and two are those core classes extended[code]...

This fails because es is of type, extSecurity and the base class expects a type of coreSecurity. I've not found anyway to cast this to allow for me to override this base class in C#. In VB it works just fine.

View 3 Replies

Asp.net - Getting Error When Editing The User Details?

Feb 20, 2011

I am trying to edit and update a selected users details, following the tutorial

[Code]...

View 1 Replies

Get User Active Directory Details?

Feb 15, 2011

I am building a simple intranet site and I want to get the user's Active Directory.What steps do I need to take on the IIS side for this to work?Are any changes required to my web config? detailed explanation, as this is giving me a hard time.I have tryed things like this

Request.LogonUserIdentity.Name.ToString
also
HttpContext.Current.User.Identity.Name

View 1 Replies

Get User Details In A Sub-domain Through A Script?

Sep 8, 2010

we have a script which we use here to output a list of all the groups a user belongs to (for records before deletion) and it works fine for the first domain, but any sub domain are not searched. (due to "LDAP://rootDSE" I think)here is our current script

On Error Resume Next
Const ForWriting = 2
UserName = InputBox("Enter Username","Enter Username")

[code]....

I want the script to search through all domains and sub-domains it can find until it finds the user, or runs out of domains to search. Once found, it then dumps the groups to a file (like it does now)

View 1 Replies

Pass An Array Of Objects As A Result But Excel Is Complaining?

May 6, 2012

I have created a COM Object via VB .NET and exposed some functions that I wish to call in Excel using VBA. I am currently trying to pass an array of objects as a result to VBA but Excel is complaining the following:

'Function or interface marked as restricted, or the function uses an automation type not supported in Visual Basic.'

I have looked around on the internet and have seen similar issues but not to one I am trying to do.My VB .NET function, which I wish to call in Excel is declared as follows:

Public Function CallArray(ByVal serviceName As String, _
ByVal effectiveDate As String,
ByVal serviceParams() As System.Object,
ByRef ArrayRes() As System.Object) As System.Boolean

VBA is complaining about the System.Objects my question is how the heck are you supposed to pass and return arrays from .NET to VBA. Also the data that will be in the ArrayRes() is mixed type, its not just strings etc, its an array of arrays that can contain strings, integers doubles etc.I chose VB .NET because I assumed it would be possible to map to VBA easier.if System. Object and Arrays in VB .NET is not the way, ie maybe theres another way via collections or lists, then Im open to that. I just need to get this data into VBA.Also I could move over to C# if needs be.

View 4 Replies

Pass Objects Between Threads Before Child Thread Completes

Oct 15, 2009

What is the best way to pass objects between threads? I would like to create a new thread that creates a new object : Dim myobject as newobject = new newoject Then in my main thread, I would like to use myobject. Ideally I would like to just assign to a global variable but I don't think that is possible. I think I may have to use some form of delegate function (but I think the child thread would need to complete to use a callback). The new thread will not actually end before I need the object reference in the main thread. How should I go about this?

View 2 Replies

C# - Displaying Member Details To Correct User?

May 26, 2009

I currently have a website and upon registration to the website i generate each member a unique GUID. Upon the user logging in to the website i check the credentials and store the guid in session if successful, in order to show the user there profile / how many post have been made etc i run my queries to the database passing the users session GUID to fetch data related to them.

View 2 Replies

Membership - Getting Error When Trying To Update User Details

Feb 21, 2011

I am using asp.net membership and trying to update a users details but get the following error:
Error 2 Overload resolution failed because no accessible 'New' accepts this number of arguments.

Below is the full .vb code:
Partial Class FamilyAdmin_edit_user
Inherits System.Web.UI.Page
Private username As String
Dim user As MembershipUser
Private Sub Page_Load()
[Code] .....

Before I had:
Dim user As MembershipUser

And got the error:
Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:
System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:
Line 20: 'parameterless
constructor Line 21: Line 22: .....

View 1 Replies

Return User Details After Ldap Authentication (asp.net)?

May 15, 2012

I am trying to set up a new internal system for my client currently, they insisted on integrating the login with AD, which makes sense, and i have managed that with no problem. However what i also want to do, after authentication, is to store some user details / attributes as session variables. I have the following code to aithenticate the user:

'this function authenticates against AD - very simple and works nicely.
Function AuthenticateUser(path As String, user As String, pass As String) As Boolean
Dim de As New DirectoryEntry(path, user, pass, AuthenticationTypes.Secure)

[code]....

which works nicely, and once the function returns me a True, i set Session("LoggedIn") as True.what i need to do is (hopefully within the above function) save the user's name, and 2 other custom atributes from within the user's AD profile.How would i access those (hypothetically)

View 1 Replies

How To Do Programming Master Details Details Details

Jul 26, 2009

I have 4 Tables Master And Three Tables Details

how to programming this Technique

This Picture dispaly what i mean http://img300.imageshack.us/img300/3981/26072009110315.png

View 2 Replies

Desk App - End The Details That The User Selects And Types From The Form?

Oct 19, 2010

i am trying to design and code a simple help desk program. i would like it to send the details that the user selects and types from the form i have designed (see picture) and also to send the username, computer name, servername and a copy of the windows event log for the previous 15 minutes, to a designated email address in pretend I.T. department.

View 4 Replies

Verifying User Details And Auto-login Windows?

May 4, 2011

I've see this application which can dig out our User Name from somewhere and asks our password. To be on the safe side, I typed my wrong password and it could cross-check that it was a wrong password and it asked me to type the right password. My question is:

How do you dig out logged in user's User Name?

How do you verify if a password given matches with the one really used to log into windows?

How do we auto-login by providing these verified details you say at a specific time by regularly checking the time using a timer?

View 2 Replies

Data Bind Into GridView On Specific User Login Details

Feb 21, 2012

I was assigned a task so as to bind the user related data into a grid view on user login. I have got two web pages, one of which contains Login and authentication information. This goes fine. When user was redirected to second page, I need to provide a GridView control where user details should be automatically updated in grid view control in the back ground.I have three different fields which were saved in sql table. particular user details need to be retrieved from the sql table on user login and bind the data to grid view automatically.

View 1 Replies

DB/Reporting :: Give User A List Of Names And When Gets Clicked It Will Show All Details In A Report

Dec 11, 2008

Ive been trying to figure out what report I should use as it appears I have crystal reports built in and also have Microsoft Report Viewer in this VB 2008.What I need to do is give the user a list of names and when a ame gets clicked it will show all the details in a report.I have loaded a ListView Control with the names from my database and this is letting the user pick a report so I can get the name and ID number of the record to show this way and just need to figure out how to get that record onto a report and what report to use?Ive done similar in VB6 but have never looked at .Net. The data is comming from an access database.

View 2 Replies

How End User Can Design Himself Reports In .net

Feb 5, 2012

I need to create vb.Net reports, where end user can design himself labels,text box,combo box and can move or resize in grid like editor.i am pasting the sample image which i am looking for.when ever user clicks the command button new Texbox or label should create on grid where he can change or move.

View 2 Replies

Design A Routine That Will Allow The User To Search?

Dec 12, 2011

I am new to vb.net and am trying to design a routine that will allow the user to search for a record and return the results in a datagrid. Then double click on a row within the datagrid to view a more detailed form. I have been able to build the search form but am having problems with the double click event.I found a sample application on the Microsoft web site which is doing this on a smaller scale. The sample is built on the Northwind sql database and searches the customer table when you double click a row in the datagrid the following Microsoft code runs and opens a detailed form.

[Code]...

View 8 Replies

Let The User Design A Form And The Fields In It?

Nov 6, 2009

I am developing an application in which I would like to let the users design some forms and decide the fields that are in the form.An example is better than a poor explanation, so let me put the example of Microsoft CRM in which you as end user can define a form, the fields in that form, or customize existing forms by adding or removing fields.

View 5 Replies

Create Database User Interface Design?

Mar 31, 2012

I am designing a database using access 2010 and I ve been asked to design the user interface with Visual basic.I actually have designed tables and their relationship and did some queries according to the requirements. how do I create user interface in VB from this point knowing I don't have any form and report designed in access?

View 6 Replies

Option For User To Design Custom Reports

Dec 10, 2011

How can I give option to user to design there own reports? i.e. They should be able to define
1. Report Title
2. Reports Fields(When they click on Work Order button they should be able to view Work Order Table column and they should be able to select columns then a report should be composed. Then all the Column should be in the form datagrid. Is it possible.

View 10 Replies

User Control Design Time Collection?

Apr 30, 2011

This is a related to my last post, but not enough to make sense as a tag on question.I have a collection(of myClass) that is exposed as a public property in a user control.When I add an item to the collection in code I would make the call collection.add(new myClass) and of course the constructor for myClass is called.When I add items to the collection via the design time menu the constructor for myClass is not called.... of it it is called, I can't see any evidence of it.

View 3 Replies

User Control Design Time Error

Apr 29, 2011

I'm trying to make a simple User control that houses one collection of a class that I've made. After building the control All works as planned and then randomly when I try to go to the design time interface for the form I placed the control on I get an error page with the following:

To Prevent Possible data loss before loading the designer, the following errors must be resolved:(ignore and continue: which about half the time works and the control shows up and the other part of the time all of the controls on the page are missing)

The one error is the following:Object of type'System.Collections.Generic.List'1[StaticGraphPlot.clsStaticCurveData]' cannot be converted to type System.Collections.Generic.List'1[StaticGraphPlot.clsStaticCurveData]'.

[Code]...

View 2 Replies

Adding Items To A User Control Add Design Time?

Dec 4, 2009

I have created a user control that mimics what a label does. I realize I could have inherited the label control, but I am working on understanding the process. I wish to add items to the control. normally (in the code of my project) would do:

Form1.Label1.Controls.Add(mylabel)
After creating mylabel in the code of course.

[code]....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved