What Detail Level Should Expose

Aug 27, 2009

Say I have a class that stores a value, and raises events when that value is changed:

[code]...

also say that I have a container class which contains a number of objects of this style, and raises its own event when any contained object changes its value:

[code]...

Given this setup, what is the best way to expose the stored variables in the StoreEventMonitors class? As three integers As three RaiseEventWhenStoredValueChanges objects?there is a good reason to use three different event-raising Objects, instead of simply writing a new class which stores three integers.

View 5 Replies


ADVERTISEMENT

Cannot Insert / Update Data On Detail Table Via Master-detail Form

Nov 12, 2011

I use a simple master-detail form using Visual basic 2005 express edition and ms sql server 2005 express edition, as well.

The master table is dept (deptno int, dname nvarchar(50)) .

The deail table is emp (empno int, deptno int, ename nvarchar(50)).

The primary key for the dept table is deptno and for the emp table is empno.

There is also a foreign key (deptno on emp table).

I created a new project, connected to a db (called test.mdf) and created a data source consisting the two of the above reffered tables.

I dragged and dropped these tables on the form and i noticed the following:

1)When the form opens... the system queries the database and displays the data on each block on the form.

2)I insert and/or update a record on the master table (dept) and everything goes well...

3)I try to insert and/or update a record on the detail table (emp) and nothing is changed on the detail table - without any error.

4)When i try to insert and/or update a record on the detail table (emp) which violates the primary key constraint or foreign key the system complaints...(as expected).

View 9 Replies

DB/Reporting :: Master - Detail Data - Overwrite The Primary Field Value In The First Grid And The Detail Records

Jul 13, 2010

I have made several posts on here lately regarding master/detail or parent/child data setups but no one has been able to help. It seems like a subject people don't like to tackle BUT I really need help.

I'm having a real hard with the DataView.RowFilter functionality and it is driving me insane.

For the most part, I have the basic master/detail functionality working. When you select a record in the first grid, it shows the correct data in the second grid. When you enter a record in the first grid, you can enter related data in the second grid. I accomplish this by using a dataview and row filter bound to the 2nd grid. When you change the record in the first grid, the rowfilter for the 2nd grid is restated and reapplied.

The problem arises when I overwrite the primary field value in the first grid and the detail records become orphaned. You would think all I have to do is change the ID in the 2nd grid to match the new ID in the 1st grid but this is where I am having problems. I wrote a loop to change the ID of each record currently loaded in the 2nd grid to match the newly changed ID in the first grid. The code is here:

Code:
Dim I As Integer

For I = AuthorizationGroupsDGV.Rows.Count - 2 To 0 Step -1
AuthorizationGroupsDGV.Rows(I).Cells(0).Value = StrEmployeeID
Next

I have used this code before and it works great. It has to step backwards through the grid because when the ID's are changed, they no longer match the RowFilter criteria and they disappear from the grid. They still exist in the dataset. The problem is, while the code "works" the intended effect does not. Some of the records completely disappear from the dataset and do not reload when I restate the row filter against the new ID number.

View 2 Replies

Master Detail Databinding Winform With Detail In NEW Window

Aug 2, 2009

There are a lot of master/detail databinding examples with detail form on the same window than the master, I can't find any example where detail is in a new window.

View 1 Replies

Why Does Master Detail Records Search Doesnt Bring Detail Records

Sep 29, 2009

I have a dataset containing 2 tables,Customers and Contacts. Just showing the master-detail is not a problem. Problem occurs when I try to search the master table to bring in the detail table. Searching the master table shows only the master record, but not the related detail records. Adding a 'findby' query on the detail table only shows the records.url.. Normally when the master table is filled, the detail record shows in a form.

View 1 Replies

Application-level KeyUp/KeyDown Events (not Windows Form-level)?

Apr 1, 2012

I am creating an Excel add-in written in VB.NET. I would like to bind KeyDown and KeyUp events to the spreadsheet to record when the user presses and releases the arrow keys while navigating the spreadsheetIdeally, these events would be built into Excel alongside the native SheetActivate and SheetSelectionChange events, for example. Alas, they are not.

View 1 Replies

What's The Difference Between Dim On The Member Level And Static On The Procedure Level

Jan 6, 2010

In Visual Basic 2008, there's two different ways that I know of to accomplish the same thing:The Dim on the member level:

Dim counter1 as integer = 0
Dim counter2 as integer = 180
Public Sub SampleSub1()

[code].....

View 1 Replies

Top Level SQL Table Row - Save The Top Level Automatically?

Mar 18, 2011

I have created a simple program which uses a two tier structure of SQL Tables.At the top level, one record holds the date of the activities and linked to it using its primary key as a foreign key, three subordinate tables hold time stamped records.The issue I have been unable to solve is that before adding any of the lower level records for a given date, a newly added top level record must be saved to the database.Doing this manually is simple - but can I rely on my users to remember to do this before they start plugging in the lower level data?I thought not, so I am looking to save the top level automatically.I've failed miserably but I refuse to believe that it's not possible.

View 14 Replies

Multiple Level Of For Each And Linq In Each Level

Feb 12, 2011

I have multiple level of For Each and in each level, i have a Linq that is the 'In' criteria as in:

[Code]....

It will go inside each for (because the value is not nothing), however, it will only loop (next) in the very inner 'For Each t In tFor'. After it is finish inner loops, the outer Fors' or Next will not execute... even thought there are more than one values in that 'In'... like 'sFor' or 'fFor'. i've noticed while debuging, while break at the for (for example 'sFor', before stepping in), i get the error message:

"Enumeration yielded no results" when i expand the result for that variable and it will not step into it. but if i do not expand the result, it will step in. It seem that some how, once an element is accessed for that 'In' collection, it breaks (meaning does not loop for the rest of the elements) the next for that collection is this a bug or am i missing something in Linq? BTW: i believe it has something to do with the SqlDataReader in the Linq. I'm working with IAsyncResult.

View 5 Replies

Import A Platinum Level Advisor .jar To Use With This Platinum Level Product Key?

Nov 10, 2009

U0161 import a Platinum level Advisor .jar to use with this Platinum level product key.How I can get this and import it to continue my completion of setup of mysql download?From where I can download that file?To enable this application, please provide a MySQL Enterprise Product Key or your MySQL Enterprise credentials.

View 1 Replies

Expose An Object As Property?

Aug 26, 2009

I want to create a class that inherit from a polygon this is not possible because the polygon is not inheritable. I want to create a class that handle a polygon anyway and it behave like a polygon. Wile with the property i can pass the value from the class to the polygon but if I want to do something like

[Code]...

View 4 Replies

Expose ILIst Members To 6.0 Through COM

Nov 23, 2010

i have to develop API in .Net 4.0 which can be used in VB 6.0,i know how to use this and currently i am using my this API in VB successfully.but Stuck at one place,i have collection class and i have to expose it to VB with having functionality of List class of .Net.[code]i know that generic is not supported in VB, but i think with this declaration in VB 6.0 it creates interface class for class B as IList.but in VB using object creation of class B it doesn't provides me members of LIST in intellesense like (Add,Remove of List Class)

View 2 Replies

Expose Information About A Running .NET Exe?

Jun 6, 2010

I have a .NET exe that I wrote and it has a couple properties that I made public and want to expose.

I want to shell this exe (Process.Start()) and then somehow reference this exe and get access to these public properties. These properties expose information about the running exe.

I know how to shell to the exe. And I know how to add a reference to the exe from my project that I want to use this object. But how do I get access to the properties of this running exe?

If you do know the answer maybe you could just tell me what the standard method is to expose properties of a running exe to another application at run-time.

View 5 Replies

.net - Expose Methods Of Nested Class?

Apr 23, 2012

I have a Public Class called "ClientConnection". Inside that class, I have a Public ReadOnly Property called "FileTransfers(ByVal TransferID)". The property returns an object of the class "FileTransfer". All methods in FileTransfer are set to public.

VS is able to discover the methods inside the parent class "ClientConnection". How would I expose the methods inside the sub-class "FileTransfer" that is returned by the property "FileTransfers(ByVal TransferID)"?

Public Class ClientConnection
'irreverent code removed
Public ReadOnly Property FileTransfers(ByVal TransferID As Integer)

[Code].....

View 1 Replies

C# - Expose An Enumeration From A Wrapped COM Component

Sep 3, 2010

I'm writing a class library in .NET that wraps a COM dll and exposes specific functionality to be consumed by other .NET code. The COM library has several enumerations defined and I've used some of the enum types as parameters like so:

//C#
public void TransactionTypeSetByEnum(COMComponent.TransactionType transType)
{
this.TransactionType = transType

[Code]....

View 1 Replies

C# - New COM Component In Old Codebase Does Not Expose New Properties?

May 15, 2012

I maintain a WinForms application that uses a third party COM component. We recently upgraded to a new version of the component with some additional properties/features (all old properties are intact), but I could not get Visual Studio to detect the new properties. It acted very much like it was hanging onto a reference to the old version of the component. Here are the steps I took to try to clear it:

Deleted the form that was consuming the component (copied out code first). The only control on this form was the third party component.
Removed the reference to the old component Deleted the bin and obj folders in the solution directory so that the PIA's would get newly created when I added the new control Uninstalled the old component, installed the new one Opened the solution, added the reference to the new component Added a form to the application, dropped the component onto the form and gave it the same name the old control had (so that the rest of the application didn't have to be refactored Pasted the form code back in place At that point the application would compile and run, but I could not get Intellisense to detect the new properties, and if I put them in place anyways the application would not compile. Nothing I tried would get the new properties to show.

View 1 Replies

Cannot Expose Type Through A Class File?

Jul 23, 2009

Does this mean that the type is not set up correctly?If you're not living on the edge, you're taking up too much room

View 5 Replies

Expose A .NET Public Const To COM Interop?

May 18, 2010

For historical reasons, we need to expose string constants in .NET through COM interface.We managed to expose ENUM but we can't find a way to expose string const.We try the following code :

[Code]...

View 1 Replies

Expose A Font Dialog Similar To The Following?

Sep 12, 2010

I am attempting to do something which isn't particularly obvious (to me at least). Digging around on the web I located the following sample (notice the font sample appears in the list on the left?).[URL] Now I know how to use the font dialog from VB.Net, but don't know the appropriate property to set to get the example to show in the listbox/listview? I set the same properties as the author but it shows a plain text font. I am basically attempting to save my users from having to click through every font to see what they each look like.

[Code]...

View 2 Replies

UserControl Expose FONT Properties

Jun 23, 2009

Creating a usecontrol:

The control will have numberous properties available at design and run time.

I am having trouble creating and exposing FONT properties for the child objects.

Example: The control will have a label with a designtime and useradjustable Display font. I wish to

1) be able to set the Font attributes via the properties dialog at design time.

2) set those properties via GUI at runtime.

The problem...

Code:

Private propArtistHeaderFont() As Font
Public Property ArtistHeaderFont() As Font
Get

[Code].....

So clearly I can not pass the FONT properties back and forth via the SET/GET method.

View 2 Replies

VB To C# Translation - Expose The Public Interface In C#?

Aug 31, 2010

In VB (ASP.NET)

Application("myapp")= Server.CreateObject("APP.Engine")
aa = Application("myapp").myMethod(2)

works.

In C# I tried

Application["myapp"]= Server.CreateObject("APP.Engine")

but

Application["myapp"].myMethod(2)

fails with 'object' does not contain a definition for 'myMethod'How can I expose the public interface in C#?

View 4 Replies

Asp.net - How To Get Classes To Expose The Same Shared/Static Method

Mar 4, 2010

I have a base class with several derived classes. I want all of my derived classes to have the same Public Shared (static) method with their own implementation. How do I do this? Is it even possible?

View 3 Replies

Expose Properties Of A WPF Control To The WinForms Host?

Apr 19, 2011

I've got a WPF control hosted inside a Windows Forms form via ElementHost. My WPF control (let's just call it WpfControl for the sake of an example) contains a variable that I'd like to expose to my Form.

View 1 Replies

How To Expose ComboBox On User Control For DataBinding

Aug 8, 2011

I'm creating a composite user control and trying to exposing the controls as properties so that I can databind them from the form that I drop the user control onto. One of the controls I'm trying to expose is a combobox and I can't seem to figure out how to expose this combobox to the designer. I'm trying the following code that I've cobbled together from what bits of documentation I can find but so far no joy.

<Category("Data"), Bindable(True), _
Browsable(True), EditorBrowsable(EditorBrowsableState.Always), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), _
AttributeProvider(GetType(IListSource))> _
Public Property RollbackCombo As ComboBox
[Code] .....

View 1 Replies

Inheriting Forms - Expose Control Events?

Nov 2, 2009

I am using an inherited form extensively for the first time, and I'd like to know if what I'm doing is correct.I have a base form with a grid and four buttons (Add, Edit, Remove and Close). There is no functionality in any of the button click events, as the specific implementation of each derived form will be different. The only exception perhaps is that the Close button closes the form. The only reason I am using a base form really is because I've many forms that look the same.How do I now expose the button click events to any derived forms? The only straightforward way I could think of was to have the button click events call an Overridable method, which I then override in the derived form:

Public Class frmTableBase
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Me.AddButtonClicked()[code]...

Is that the correct way? It seems a little bit overkill to have to do this, although I can't think of another way really... Perhaps I could add the Overridable keyword to the event handlers themselves (and make them public)..?I'm doing it the way I showed now however. It works, but I'd just like to know if this is the generally accepted way of doing this.

View 3 Replies

Why Not Expose List (Of String) In The Parameters Of Web Service

Dec 9, 2009

The FxCop says in a rule that generic List should not be exposed to the outside world.But I do not understand why and what is the replacement for the generice List? url...

View 4 Replies

.net - Expose WCF Service Cannot Retrieve Object Through Windows Firewall?

May 13, 2011

I built a WCF service that exposes itself for a web application, it accepts an object and prints the data on the clients machine. Works fine on my development machine, and the service is up and running on any machine i install it on. I can enter ip address in clients machine web browser and see it is running. Problem is when i send the object to the clients machine it returns an error, that sounds like it could be because of the clients windows firewall. Where would i start at to deal with this problem ?There was no endpoint listening at http://192.168.1.168:2202/PrintLabel that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

View 1 Replies

Asp.net Mvc - Expose Built-in Security And User Management To A MVC Application?

Jul 23, 2009

I have built a MVC website on IIS6. I used the built-in ASP.NET Security without Membership, just the way it was implemented in the template solution. It is easy to secure a contoller or action, but now I need to expose the user management to an admin logged into the site. I understand that the builtin ASP controls for doing this are not "best practice" and are a dog to get working. So what is the best practice for offering user management through a ASP.NET MVC application?

I considered using the Entity Framework and wireing it up to the myriad of stored procs. but that seems awkward. I see options for AccountMembershipService and FormsAuthenticationService. That is what the existing project account controller uses. But, I am not fimilliar with either.I can't help but think that this should have already been there from the project template. This is a fundamental part of any website and you were given 15%, why not the rest?

View 5 Replies

Expose A Function Inside A Module In Class Liberary( DLL)

May 20, 2009

I wand to Expose a function inside a module in my Class Liberary( DLL)

module Module1
Public Function Add(val1 , val2) as double
return val1 + val2
End Function
End Module

View 7 Replies

Transactions - Expose Private Fields Using A Partial Class?

Nov 12, 2010

I am trying to implement transactions across multiple TableAdapters in VB.NET (using Visual Studio 2010) by extending the partial class as described in the following examples:

http://blah.winsmarts.com/2006/06/18/the-definitive-tableadapters--transactions-blog-post.aspx
madprops.org/blog/typed-datasets-and-sqltransaction/
stackoverflow.com/questions/2342289/net-tableadapter-to-dataadapter

However, when I attempt to expose any of the private fields created by the designer they are underlined in the editor with the following error:

'_adapter' is not declared. It may be inaccessible due to its protection
level.

Searching this site as well as google has not revealed anything useful, but perhpas I'm searching the wrong keywords.

Here is the code in MyDataset.vb

Partial Public Class MyTableAdapter
Public Property MyTransaction() As SqlTransaction
Get

[code]....

View 1 Replies







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