Forms Data Controls :: How To Use A Custom Wizard To Make Entries In Multiple Tables

Apr 8, 2010

I'm using Visual Studio 2008 with SQL Server Express databases in my .net 3.5 website

I have three tables I'd like to make entries to when the user completes a wizrd i've setup on a web form.

The First Step - The user enters basic information about their "Case". The table looks like so:

db_Cases - CaseId PK auto int, CustomerId, etc fields

The Second Step - The user enters information about the "Debtors" that are related to this "Case". Think of this as being products....The only difference is these records wont be used over and over again like a product would. The user may need to enter data about several "Debtors", just like if you needed to show several different products on an invoice. For example the user may need to enter information about a husband and wife. This means two entries in the "Debtors" table. The table looks like so:

db_Debtors - DebtorId PK auto int, etc fields

The Third Step - Here's my problem. This step needs to make entries into a third table called "CaseDetails". Again, this is just like if you were creating an invoice with several different products on it, where you would want to get a subtotal of each product's cost. The table looks like so:

db_CaseDetails - CaseDeatailId PK auto int, CaseId int, DebtorId, int

* When this table is later viewed, It will reflect all "Debtors" attached to the specific "Case" being viewed.

The first two steps aren't a problem, I pretty well have that handled in the wizard. BUT How do I create the entries in the "CaseDetails" table when the user finishes?

My idea right now is..... Considering the "Debtors" will be re-used but only on rare occations, I'm thinking I should just add the "CaseId" that was created in step one, to the "Debtors" table at the same time the "Debtor" is created. So the table would look like so.

db_Debtors - DebtorId PK auto int, CaseId int, Name, Address, etc

View 1 Replies


Similar Messages:

Data Controls :: Make One GridView To Work With Multiple Tables

May 7, 2015

I have several table (car,country,employee,language....) and StoredProcedure (Insert,Update,Delete,Select) for all.

Is it possible in one form ex. TEST.aspx  and one grid load data for any table and call all storedProcedure for him.

One GridView for all....

Select work fine, but how adjust (insert,update,primary key) it is possible?

View 1 Replies

Web Forms :: How To Store Multiple Entries Of Properties On Custom Object In C#

Jan 12, 2010

I am creating a web service that returns the list of states. How do I create an object in C# in the web service that will return multiple values (of properties of an object). Currently, the way I am doing it, it only returns the last value pulled from the database. Do I need store an array of properties?

[code]....

View 5 Replies

Forms Data Controls :: GridView Showing Multiple Row Entries Instead Of Just One?

Aug 6, 2010

I have some data displayed in GridView and there are multiple (repeat) entires.

There are about 20 rows of the same data, but I only want to display 1 row.

I know can amend PageSize="1" but then it shows multiple pages which I also don't want.

The multiple rows - are all of the exact same data - but it should only appear once!

View 2 Replies

DataSource Controls :: 2 Tables - Join And Order By / Select All Entries In GalleryAlbums Table?

Apr 6, 2010

I have two tables:

GalleryAlbums and GalleryPhotos.

I would like to Select all entries in the GalleryAlbums table, but Order them (DESC) by date values in a column (upload_date) on the GalleryPhotos table. Both tables have a column "album_id"

A little confused how I might write this statement.

View 15 Replies

Data Controls :: Search In Multiple Tables Using One TextBox And Display Results In Multiple GridView

Jul 22, 2013

I created 3 product  table . A,B and c.

I show product of table in different gridview.  

Now I am using one search box. but how to search product name with image in one query all of three table.... 

Simple how to search product from multiple table and show result...

View 1 Replies

MVC :: Submitting Multiple Data Entries?

May 24, 2010

I am wondering how to handle and setup a means to submit multiple data entries via ASP.NET MVC.

Suppose I have a product database table such as: ProductId, ProductTitle, Price.

From the view, I was thinking to code the HTML form as:

<form ... >
<table>
<tr>
<th>ProductId</th>
<th>ProductTitle</th>.......

Suppose the form is to be submitted to Controller: Product, Action: Add. What sort of coding techniques can I use to handle this dynamic form, such that I follow good or best practice, and if possible also be elegant.

The solution I see so far is to test the Request.Form (or Formcollection) indexer/dictionary for existence for the dynamic input fields. E.g.

public ActionResult Add(Formcollection form)
{
int productEntry = 1;
string productPrefix = "Product";
while(true)
{........

View 1 Replies

Data Controls :: Display Data From Multiple Tables Using Multiple Dynamic GridViews

May 7, 2015

I have storedprocedure which returns four or more dataset!

example here

How load  and display all data in Default.aspx....

dataset 1

............................................

dataset 2

............................................

dataset 3

............................................

dataset 4

............................................

View 1 Replies

Security :: Way To Create Tables That Uses Duplicate Entries?

Apr 17, 2010

I am using the built in database with the tables (i.e. membership, users, etc...). I created my own table (relationships), but when I try to create a row that uses the same email address it says "cannot create duplicate entries". I am not allowing duplicate email addresses in the membership table. That did not work because I couldn't convert System.Guid to long. So, I decided to do it by email address. I changed idRequester to requesteremail and the same for receiver. However, when I try another record with the same email address in either field, it does not accept it.

View 1 Replies

Forms Data Controls :: Update Multiple Tables From DetailsView?

Nov 29, 2010

I have a asp:DetailsView control with the first column are the field headers and the second column is the record details for a given user.

The DetailsView is bound from 4 tables, I need to be able to edit/amend any field. Is there another way I can achieve this from the DetailsView? Would I need to create templates for each table entry then Update SET on each template, would that do it?

View 8 Replies

Forms Data Controls :: How To Update Multiple Tables With A SQLDataSource

Mar 3, 2011

I have 2 tables

One:Table Name Rider With columns RiderID,LName,City

Two:Table Name Car With columns CarID,RiderID,Color

What I would like to be able to do is to allow the users to do an UPDATE on both tables.

Like if you crreated a SQLDataSource using just one table as it's source. You can use that SQLDataSource for a gridview.

Then in the gridview you can display all the data from the table but you can also EDIT all the data in the table through the gridview.

But if I create a SQLDataSource using 2 table joining them together with an INNER JOIN with a Primary Key in one table and a Foriegn Key in the other table. I can still use this SQLDataSource with a GridView to display the data but I can't EDIT the data through the gridview for the 2 tables.

Is there anyway to do this using a SQLDataSource and GridView?

OR is there another way to accomplish this?

View 3 Replies

DataSource Controls :: How To Insert Multiple Entries In A Table

Mar 24, 2010

An option to add a range of computers based on tag numbers, for instance, user input 800101 and 800110 would add computers SYS800101, SYS800102, SYS800103, SYS 800104, SYS800105, SYS800106, SYS800107, SYS800108, SYS800109, and SYS800110. Currently the app adds a single computer at a time.

Here I am using ASP.NET using C# and my backend in active directory.

View 12 Replies

Forms Data Controls :: Dataset With Multiple Tables Bind To Grid

Jul 7, 2010

i m trying to bind my both grid with two tables which are in dataset i m trying but when i m binding my gridview it's always binding the second table see code

[Code]....

i already tried to bind both the gv1 and gv2 they both are displaying same table i.e department

View 3 Replies

Forms Data Controls :: Build Gridview Dynamically - Multiple Tables?

Jun 29, 2010

I have a .NET 1 web app that is using a Oracle database, the web app has a page of table names that allows the users to select, there are 101 tables listed on the page. When the user clicks on a table name, it takes them to a page that shows user friendly column headers, the table data, etc. Is there a way to use one GridView to do this and show the user friendly column headers instead of creating 101 pages or 101 user controls and show that control based on the table passed into the page?

for example: the user clicks table 22, I want my gridview to look like this

Buyer's Name State City Zip Code Phone Number

if they click table 55 I want them to see this

Product Wholesale Price MSRP Sale Price On Sale (check box)

instead of showing the users

BuyersFullName BuyersState BuyersCity BuyersZipCode PhoneNumber, etc

and so I, I would like to use 1 gridview on one page if possible and build the grid on the "fly", We have the user friendly column headers in a table.

So my questions are:

is this possible, if so, what is the best approach in doing this

from a scalabilty level and maintenance level, would the 1 gridview be worth for all 101 (and growing tables), or would building a seperate user control for each table be better?

View 5 Replies

Forms Data Controls :: Data From Multiple Database Tables Displayed On The Same Page?

Aug 20, 2010

i would like to find out how to go about displaying data from multiple database tables on the same page. What i mean is it would look like the feeds on the facebook home page where you can see the information like newply uploaded photo or a new post.

I have two tables, and i want to display any newly created row on my home page from either table in the same control. Currently, i have two gridviews, but i want the data from both tables be displayed together.

View 4 Replies

Forms Data Controls :: Showing Data From Multiple Tables In A Listview?

Jan 22, 2010

I have a listview that shows the user the details of the members who have sent friendship request. The table from which the data come has two fields namely, sender_id[id of the one who sends friendship request] and receiver_id[id of the one to whom the request is sent].

There will be two columns in the listview. The first would show the pic and the name of the user. The problem is that how am I going to show the pic and the name if the table from where the data come does not contain these info. I know that the sender_id can be used to fetch the pic and name of the sender, but how should it be done?

Earlier I would do something like <%#Eval("fieldName")%>. But in the above described scenario the field is not present in the current table but the other one.

View 5 Replies

Forms Data Controls :: Joining Multiple Tables To Show Results In A Gridview?

Mar 4, 2011

I have been trying to make this work for a while, but I have not been yet able to figure this put. I am using VS 2008 and mysql database. I wrote a query and checked to see if it works in database. It does.

I have a gridview, whose select command is that query. But for some reason, I just get all the rows from one table only. I rechecked my datasource and it is ok. I read on some discussions that it is NOT possible to have data from two tables in a gridview. Is that true? If that is not true, how can I have data from multiple tables in a gridview? Or any other web control for that matter.

View 6 Replies

Forms Data Controls :: Make A Databound Control With A Custom Scrollbar?

Mar 22, 2010

I'm working on a website to showcase some of my bird photography, using ASP.NET 2.0 and C# with a SQLServerExpress backend.What I have right now is a ListBox bound to my database that displays a list of common names of birds and when the user clicks on an item in the listbox the main image on the page is changed to the image for that bird. For style reasons I want the listbox to always be a fixed size and because I specify the size (using CSS) a vertical scrollbar appears. My problem is that I want to provide my own images of arrows that go above and below the box such that when the user hovers over an arrow the box scrolls slowly and when the user clicks an arow the box scrolls quickly. Finally, my main problem is that I want to get rid of the ugly default vertical scrollbar that comes with ListBox.

Can you guys help me figure out how to do this? I don't mind using a different control other than ListBox as long as it is available in ASP.NET 2.0 and as long as it can be bound to my db. I also don't mind using JavaScript (which I'm sure I'll end up doing for the hover effects). Right now I'm fooling around with subclassing the ListBox control but I've never subclassed a control before so I'm somewhat clueless.

View 3 Replies

Custom Server Controls :: Paging And Sorting Gridview Custom Control Inside Of A Wizard Control?

Dec 24, 2010

here's a situation and I would appreciate your response.

I have programmatically created the Wizard control:

Page_Load(obj s, evargs e)
{
Wizard ClaimDetailWizard = new Wizard();
foreach(int item in selectedItems)
{
//create new step
//added custom control to new step
//add step to wizard
}
//added wizard to a placeholder on a page
}

Based on List I get from Session i added new steps to my wizard To each step I had added a custom control

Each custom control in tern contains another custom Gridview Control in it.

So here's the problem when the page loads for example for two steps. All is good Wizard does what it's supposed to do.

But when I try to use sorting or paging in that custom Gridview. Somehow it displays the gridview I should see in the next step of the wizard.

Also what I'm noticing through debugging. Is that when I press next in the wizard I go back to the original page where I do all of the code specified above, and it recreates the wizzard. But it goes to the next step. Is this the way wizard supposed to work? Just doesn't seem very efficient.

View 1 Replies

DataSource Controls :: Retrieving Data From Multiple Tables?

Aug 17, 2010

I have hard time trying to find the solution to retrieve data from multiple tables in one database.

table Kategorije has fields: idKategorija, naziv, opis table Clanak has fields: idClanak, idKategorija, naslov, autor,...

Kategorije.idKategorijais joined with Clanak.idKategorija, but that isn't the solution because I want my web site to show the Kategorije.naziv instead of Kategorije.idKategorija. This is the code I'm currently using to get idKategorije shown on my web site:

[Code]....

[Code]....

View 3 Replies

DataSource Controls :: Write Data To Multiple (two) Tables?

May 6, 2010

I have to write data to multiple (two) tables.

tbl1 has a column "ORDERID" with auto increment. I have to get this "ORDERID" whenever I write to tbl1 (Insert new record)

tbl2 has a coumn "ORDERID" as foreign key, I have to write "ORDERID" in tbl2 received from the tbl1.

How to do it using SQL ( I am not using StoredProcedure)

View 5 Replies

DataSource Controls :: Filtering Data Based On Multiple Tables?

Mar 16, 2010

I am writting a directory website that advertises fitness classes. These classes are listed by Class Type, and Geographical Area. Each Class Type can satisfy one or more of four Fitness Goals such as Loose Weight etc...

I have a table for Classes (classid, classname, classdesc, classtypeid, geoareaid) I have a table for geographic areas (geoareaid, geoarea) And I have a table for ClassTypes (classtypeid, classtypename, classtypedesc)

Which obviously links geographic area via the classes.geoareaid as a forgien key and classtypes by classes.classtypeid as a forgien key.

I can list all classes by type and also by geo area no problem, the problem arrises when I then also want to filter by goal.

The Goals Table (goalid, goal, goaldesc) is linked to the classtypes table via another table classtypes_goals (classtypeid, goalid) as each classtype can satisfy any of the 4 goals.

I am using a DataSet to fetch the data from a Stored Procedure in the SQL Database but because the classtypes can be linked to multiple goals I am getting duplication in my list depending on how many goals a classtype satisfies.

All I need in my data list is class name, class type and area I don't even need to display the goal I just want a drop down above the table that will filter the list and show only classes of classtype that satisfy the goal chosen.

View 18 Replies

DataSource Controls :: Deleting Data From The Multiple SQL Tables With LINQ (C#)?

Apr 22, 2010

I'm looking for ideas on deleting data from the multiple SQL tables with LINQ (C#).

My existing solution does the following:

1. DeleteAllOnSubmit( Subset of the data from the child table)

2. DeleteAllOnSubmit( Subset of the data from another child table)

3. DeleteAllOnSubmit( Data from the parent table)

4. CommitChanges()

All this resides within a single method, which makes it ugly and not re-usable.

I have considered the following alternatives, but I decided not to use them:

1. Cascade delete on the tables.

2. Do a join on all tables from which I will remove the data, but I'm not sure yet whether I could pass a join query to DeleteAllOnSubmit().

3. Write stored procedure(s) to delete data from each table. I don't have the time to implement this due to a large number of tables and the time constraints.

View 1 Replies

DataSource Controls :: Fill Data In SQLDataAdapter From Multiple Tables?

Jan 26, 2010

I'm using the following query as an SqlCommand:

[Code]....

It obviously doesn't work...what can I do? I cannot use the "Merge" method, because I am working with several tables in a single SELECT statment.

View 2 Replies

Forms Data Controls :: How To Make A Custom Grid / Insert / Edit / Delete Page

Jul 9, 2010

Lets say that i want to make a ADMIN page for articles.

1) I show all my articles on lines
2) Each article has an EDIT BUTTON and INSERT NEW button
3) When I click on the EDIT BUTTON, it opens a CUSTOM page where i can Edit my article.
4) When i click on the INSERT NEW BUTTON it opens the same CUSTOM page where i can Insert my article.

I was trying to do it with Gridview and Formsview.

View 8 Replies







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