Linq To SQL Using Data Across Multiple Windows Forms

Mar 10, 2010

I have to forms, form1 and form 2. On form1 I have datagridview with all the fields in it. If I double click on it I would like a new form to open where I can add a new record.

Then I have a edit button on the form, If I click the edit button I would like another form to open where I can edit the data in.

In this post it explains it, I need the same but for linq to sql.

[URL]

View 4 Replies


ADVERTISEMENT

Application That Has Multiple Front Ends Developed Using Windows Forms / WPF / ASP / Compact Framework Mobile Forms

Apr 9, 2010

I have the requirement to create an application that has multiple front ends developed using Windows Forms, WPF, ASP and Compact Framework Mobile Forms.I would like to be able to create a series of obejct representing the business logic and have this logic accessible from the various front ends available. My first thought was to use remoting as I'd like to be able to pass the business objects back and forth between client and server but the compact framework doesn't support remoting and also transferring a full framework business object to a compact framework business object doesn't seem possible.My next thought was to use web services but again the passing of business objects seems to be very hard to accomplish. Without doing this I would have to create individual web methods for each business operation.

Finally my next option is to use sockets and write the whole client/server logic within some classes and expose them to the UI/Business layer. My only problem with this is it is not scaleable should the number of clients increase dramatically whereas using remoting or web services I can host the solution via ASP.Net.Does anybody have an ideas on the best way forward for this or even have any input on how they would write an application that required a windows form, wpf, asp website and mobile device GUI all of which want to use the same business logic?

View 3 Replies

Searching A Set Of Data With Multiple Terms Using Linq?

Mar 17, 2010

I'm in the process of moving from ADO.NET to Linq. The application is a directory search program to look people up. The users are allowed to type the search criteria into a single textbox. They can separate each term with a space, or wrap a phrase in quotes such as "park place" to indicate that it is one term.

Behind the scenes the data comes from a XML file that has about 90,000 records in it and is about 65 megs. I load the data into a DataTable and then use the .Select method with a SQL query to perform the searches. The query I pass is built from the search terms the user passed. I split the string from the textbox into an array using a regular expression that will split everything into a separate element that has a space in it. However if there are quotes around a phrase, that becomes it's own element in the array. I then end up with a single dimension array with x number of elements, which I iterate over to build a long query.

I then build the search expression below:

query = query & _
"((userid LIKE '" & tempstr & "%') OR " & _
"(nickname LIKE '" & tempstr & "%') OR " & _

[Code]....

View 1 Replies

Using Multiple Windows Forms?

Jun 24, 2011

I created a Shipping calculator for my project. I am almost done, it is just on my Form3 code, I am having trouble retrieving information from Form2 and place it in a listbox. I was able to retrieve information from Form1 successfully, but nothing from Form2.

FORM1
Public Class Form1
Dim Total As Double 'Variable to hold the total

[Code].....

View 3 Replies

.net - LINQ To SQL: Using Multiple Data Contexts Easily With An Interface

Feb 17, 2012

I have a program that is accessing many similar tables using a linq to sql datacontext. Do linq to sql tables implement a common interface? I would like to write methods that could work with any of the similar tables, so it would be great to do something like

Dim myTable as ILinqDataTable
If switch = "TableA" then myTable=myDataContext.TableA Else myTable=myDataContext.TableB

[Code]...

View 1 Replies

Forms :: Retaining Data Across Multiple Forms

Sep 8, 2010

VB.NET newbie here... I have an vb.net windows application set up. It has multiple forms, about 6 in all. There's a main menu form, and then 5 other forms to collect data. The user will collect data on each form and bounce back and forth between forms. How do I get the forms to retain the data that has been entered into the text boxes and/or other controls on the forms? For example, they might fill out a few textboxes on a form, but then need to go to a different form and fill something out... and then back to the previous form. Right now, when they come back to the form, all the data previously entered in to the text boxes is gone.

View 1 Replies

Forms :: Operating System Multiple Windows With Same Shell?

Mar 26, 2010

Ok basically i am making a game (personal/share with others for free)The idea of the game is its 1998 and you have windows 95 and you have to someone obtain windows 98. then slowely new operating systems are released... 2000, xp, vista, 7 and you have to continue to upgrade.

The game in played in a simualted real environment of the windows operating system. The idea is that you have access to the real programs that came with windows 95... (or whatever operating system you have ingame) and you have access to my fake webbrowser which has a bunch of fake websites (offline) in the game. You can either try to illegally download the operating system (viruses can infect you like this (fake ones)) or you can buy it off microsoft but to get money you need to do hacking jobs....

Anyway thought i should give you some back story to what i am actually making. (This project is more a test project since i am only 15 and have only really just started using visual basic for a few months.)

OK now i have so far got it looking almost completely like windows 95 and functioning like it to...

Hey just for the record... here are some nice pictures of it running

First of all heres what it looks like when you are doing selecting which program to open with the start menu:

This next picture is of notepad in my program:

Ok now this picture shows perfectly the active window has become inactive when rightclicking (or normal clicking) the desktop

Next picture shows the display properties windows... not that fasinating yet since i have not finished it and it does not accually do anything yet... its just for looks right now and scrolling through the theme names.

Now this is another tab from the properties window (the screensaver tab) you can't do much here apart from looking at the names of the screensavers)

Ok heres another pic from another tab in display properties... (this shows how you can pic a color to change the background in the display window (clicking apply makes your background of the destop in the fake os accually change)

Ok this image in the same window as the previous one shows how you can select to change different things colors (i only got active titlebar and desktop changing right now...)

This image shows the active titlebar color change...

This screenshot shows the settings tab of the properties window

This screenshot shows windows help (main purpose here is just to show the colour change has taken effect)

Ok last of all this just shows that the maximize button works

I CAN ONLY HAVE ONE PROGRAM OPEN AT ONCE basically this is because i have a panel called program and in that a another few panels such as the active window titlebar...

Now i basically have it so that the programs are all in the pannel programand when you "open" a program all the other panels in this window are closed and the one you "open" is docked... and the label (programsname) is chnged to the name of the program.

Here is a picture of the visual editor if you don't get me...

As you can see there are weird little things in program1 (forget program 2 that is a thing i was trying to do ages ago with my old crappy shell)

these weird things are my programs which get docked to the size of the program panel when you click to open a program...

This method works well but only if you have one program at a time.

A solution i thought of was to copy and paste the shell (program panel) and then just put each program in a seperate shell... this would work... but then i can't open 2 of the same program e.g. have 4 notepads running at same time. I am also having heaps of trouble with the taskbar (there in a button on the task-bar which changes text when the programs name changes)

Anyway i am going to post my full program here (code and all) just download if from this rapid share link.
EDIT: the file was 5 meg and now is 3 meg so that should be easier to download RapidShare: 1-CLICK Web hosting - Easy Filehosting and then run the solution file or whatever

Please show me some code that will get me be able to run infinite windows of same type and different type...

Do whatever you have to do (just make sure you make sure it works on your side before resending the project back to me.)

View 3 Replies

Multiple Windows Forms Opening Upon Program Launch

May 8, 2012

I am running Microsoft Visual Basic 2010 Express. I created a simple program that is nothing more than dozens of Windows Forms that are linked together by the various clickable buttons I put on each form. The program is like a "book" with several pages, and you jump to a specific page by clicking on specific buttons on the current page ("Windows Form").

My question is, how do I change my program so that when it is launched, instead of just 1 Windows Form opening, the program opens up several Windows Forms (of my choosing) automatically? In other words, instead of my "book" (VB program) opening "page 1," when I run it, I want it so that pages 4, 7, 8, 10, and 15, are "opened" whenever I run my "book."

Is there some code I need to insert into each Windows Form I wanted opened automatically when the program is loaded? Or is this a MS VB 2010 Express environment option I need to set?

View 7 Replies

Add Multiple Hyperlinks In A Label Control In Windows Forms In Visual Basic 2008

Apr 4, 2011

In a label box, I want to list a couple of websites, email address along with some text. How do I go about it?

Potential uses- As a Help > About dialog box where websites, email of the author can be listed.

To make things as easy as possible for the user, and encourage visiting of the mentioned websites.

Simple text will be ignored, while standard blue color, underlined text with hand mouse-cursor will need no thinking on user's part.

View 1 Replies

Handling Data Between Multiple Forms

Nov 12, 2010

i am coding in vb2008 express.Can u suggest me any tutorial or sample code for "Handling Data between multiple forms".

View 3 Replies

How To Retain Data Across Multiple Forms

Sep 8, 2010

I have an vb.net windows application set up. It has multiple forms, about 6 in all. There's a main menu form, and then 5 other forms to collect data. The user will collect data on each form and bounce back and forth between forms. How do I get the forms to retain the data that has been entered into the text boxes and/or other controls on the forms? For example, they might fill out a few textboxes on a form, but then need to go to a different form and fill something out and then back to the previous form. Right now, when they come back to the form, all the data previously entered in to the text boxes is gone.

View 7 Replies

Use Data To Fill In Multiple Forms

Mar 11, 2010

I have a database set up in Access. Currently I have 12 exact copies so individuals can enter data. We use the data to fill in multiple forms.I know that VB can be used to allow everyone to access one database. Does anyone have this as a runtime module since I have never written in VB and don't know where to start. My last code writing was on a AS400.

View 3 Replies

Multiple Forms - Using Data In List From Another Class

Jan 13, 2010

I am trying to develop a vb program where i am using List to store data. I want to use all datas saved in that list from another class. In Class 1, i am trying to include a method that will return my list. And form class 2, i will call that method and get that list. But code isn't working. [Code]

View 2 Replies

Handling Multiple Data Entry Forms Which Can Conflict With One Another?

Aug 6, 2009

How do you handle the screnario wherein multiple data entry forms are open and modifying one could potentially affect the record being modified in other forms?

View 3 Replies

Multiple Full-Screen Forms Sharing Data?

Sep 13, 2011

My question is in two parts:

1) I am writing an application for a touchscreen which will have several different Forms - each of which will be full-screen. What is the best way to achieve this? Hide/show each Form as the user navigates between screens? MDI Parent with multiple Child Forms becoming visible 'on top'? Or is there a more elegant solution?

2) I would also like a 'banner' on the top of each Form (or always visible on the top of the MDI Parent, etc) similar to a 'navigation frame' on a website. This banner will display a clock with the current time, and the current GPS location (meaning that a Timer will be used to get/set these values every 1000 milliseconds). I thought of using a UserControl for the banner - but if this is used on multiple Forms then I will end-up with multiple Timers all waiting 1000 milliseconds to update essentially the same information.

Is there a best practice for this type of scenario? - my thoughts so far are using the "Main" Form for Global Timers, etc - but then how do I update all Form clocks each second? (without iterating through all visible Forms... which seems messy).

View 5 Replies

VS 2008 CSV Or XML - Make Data Available To Multiple Forms At The Same Time?

Nov 4, 2010

I have used CSV files before for a simple database of about 12,000 items - this was a simple one page form... Now I want to have the same database but with the data available to multiple forms at the same time.. eg.. Form 1 displaying persons 1,2,3,5,7 name, addy, phone etc and form 2 pulling info for persons 2,3,4,8... Is this possible with CSV files?? or even XML?... The only other thing is that I do it all in .NET 2.0....

View 3 Replies

VS 2005 Accessing The Controls Of Multiple Data Window(mdw) Forms

Oct 21, 2009

I have to make some automatization on a web server, I use Visual Studio 2005 Visual Basic Windows Console Application. I want to make a load/performance test of the web server, so I open several Internet Explorer instances, and I login the application, that is not a problem. But after that I have a mess on the page and I cannot make any more automatization...The composition of the page after the login is like this: I have the default form, another form and a multiple data window(mdw) controller, which dinamically can switches the forms on this part.

The problem is that I don't know how to access the controls of this mdw forms. I couldn't find much about this mdw controller and I am not an expert.

My code is here:

Imports System
Imports System.Diagnostics
Imports System.Web.Ui.Webcontrols

[Code].....

View 5 Replies

Forms :: Way To Return Multiple Rows Of Data To Calling Method Via Class Property?

Jan 28, 2009

I have this application which has one class. I need to return a recordset of data to the calling form. If i use Properties to return, it can only return only a single value at a time. Right now i'm returning a datareader object with one of the properties.Can anyone suggest a better way to return multiple rows of data to the calling method via Class Property?

View 1 Replies

Show A Large Amount Of Data That Spans Across Multiple Forms And Text Boxes?

Jan 15, 2011

I am trying to find a way to show a large amount of data that spans across multiple forms and text boxes. I am making a somewhat summery of the input strings.

View 3 Replies

Switch From ADO To ADO.NET - Regards To Data Access When It Comes To Windows Forms Applications

Jul 21, 2009

I have some friends who are 'old-school' VB6 database developers and I was telling them about .NET and its features, specifically ADO.NET. In our conversation, they brought up the following reasons why they would rather stick with ADO than move to ADO.NET: The Dataset is disconnected (What if power fails?)

The same amount of code still has to be written The new options of Dataset, BindingSource and TableAdapter seem confusing the same code is written programatically access the Database, all that changes is how that command is laid out. Why ADO.NET is 'better' than ADO with regards to data access when it comes to Windows Forms applications. What does ADO.NET provide that ADO does not? What does it do better than ADO? I'd like examples that do not involve LINQ.

View 8 Replies

Windows Forms - Data From User Input To DataReport?

Jul 22, 2011

I'm developing a windows forms application using VB.NET. I'm currently working on DataReport (by Microsoft, not Crystal). Everything works fine when using DataSet as DataSource. But I have a question on how am I going to put data to my DataReport from a user input? Preferably when the user is on the act of printing(clicking the print button in the ReportViewer), a Form will pop-up and ask him for input. That input I'm talking about is random names of people, and we don't have to track their names so there's no reason to put it on the database.

Here's my simple setup:

MainForm.vb (Form)
MyReportViewer (ReportViewer)
MyReport.rdlc (DataReport)

[Code]....

If it is impossible to do it on the act of printing. Maybe on the MainForm_Load event or before the generation of report can do.

View 1 Replies

Windows Forms Datagridview Doesn't Show Data?

Oct 7, 2009

I have a user control that contains a search value text box a button, and a datagridview to display what the data adapter found. In the data set designer, I have an ODBC connection to a table, with two SQL queries defined FillByCustomerName(NAME), and FillByCustomerNumber(CUSTOMER_NUMBER). If I preview the data in the designer, I see the data expected. The datagridview doesn't show any data. The functions PopulateGridByName and PopulateGridByNumber do the work. I've tried adding a dgCustomer.show statement, The form that calls the user control has no codebehind code, and throws no errors.

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Try
Dim SearchValue As String = CreateSearchValue()

[Code].....

View 4 Replies

Data Binding - DataList Control In Windows Application Forms?

Jun 6, 2010

I am upgrading my application from vb6 to vb.net.I used to populate my data in datalist control in vb6 forms. I am not finding it in vb.net windows form application. Which one control is the equivalent to it?

How can i list my data in that control?

just like: I had a table with data like id, name

I want the name should be the displayed column and id the bound column? how can i do that

View 1 Replies

System.Windows.Forms.WebBrowser - Retrieve Post Data After Navigating?

Mar 3, 2009

I'm instantiating a WebBrowser object and programmatically clicking a button to navigate. Is there a way (property, method, or voodoo ritual) for me to check the browser after it lands on the new page to see 1) the form method that was used and 2) the post data?

View 3 Replies

Operator '*' Is Not Defined For Types 'System.Windows.Forms.VscrollBar' And 'Systems.Windows.Forms.VscrollBar

Oct 29, 2011

I am trying to use values from form1 in my project, in form2, but Im not sure how to do it. I've tried

txtboxTotal = (Form1.vsbLength * Form1.vsbWidth) * Pattern

But I get: operator '*' is not defined for types 'System.Windows.Forms.VscrollBar' and 'Systems.Windows.Forms.VscrollBar.'

View 14 Replies

Inheritance And Variety Of Data Structures Including Queues, Lists, Arrays, Or Stacks In A Windows Forms Application

Jun 27, 2012

I'd like to give a homework assignment to a person learning VB.NET. I'd like it to use basic inheritance and a variety of data structures including queues, lists, arrays, or stacks in a windows forms application. I was thinking of a pizza-ordering application. This would allow them to utilize some basic inheritance and practice using .NET UI elements.

View 2 Replies

.net - Parent/Child Relationships Failing When Getting Data From Parent Class With Multiple Forms Open?

Jun 24, 2009

I have a main form, and some sub forms, and each sub form can have some sub forms. When I have multiple sub forms open, and I try to get data from the parent form, it returns the data from the wrong parent form.For example I have two instances of Mainform.subform running. If I do something like this in a child form of one instance of the subform. It returns data from the other subform.

dim l = Mainform.subform.listofdata

Edit:I am using visual Studio 2008. Winforms, form designed using designer. In my mainform I am doing this

Protected Friend frmMain as Mainform
frmmain = new mainform

In frmMain I am doing this

Protected Friend frmsub as new Subform'
frmsub = new subform

[code]....

View 1 Replies

Implicit Conversions From 'System.Windows.Forms.Control' To 'System.Windows.Forms.Webbrowser'

Sep 8, 2010

I have the code which checks if there is a selected tab

Private Function GetBrowser() As WebBrowser
If TabControl1.SelectedTab IsNot Nothing Then
For Each c As Control In TabControl1.SelectedTab.Controls
If TypeOf (c) Is WebBrowser Then
Return c

[Code]...

View 2 Replies

Unable To Cast Object Of Type 'System.Windows.Forms.Button' To Type 'System.Windows.Forms.TextBox'

Apr 28, 2009

I have a panel with some controls in it (several textboxes, a slider, 2 buttons, and a small groupbox).. When I click a button, I want all of the textboxes within the panel to be readonly... So I have this code: [code] When I run it though, I get the following error:Unable to cast object of type 'System.Windows.Forms.Button' to type 'System.Windows.Forms.TextBox'.If I remove a button, it moves on to give me the same error but for a label..

View 4 Replies

Forms :: Multiple Forms, Closing Events And Sub Routines?

May 25, 2010

I have googled high and low to find an answer to this but I must be searching wrong.I have an application which has a listview displaying some items that are stored in a SQL Compact database. I am using a second form to add new items to this list directly into the database.When the second form closes I want to call the sub in my first form to refresh the list from the database.

How can I get it to fire the form1 sub routine on the close event of form2

View 3 Replies







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