Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PL-SQL Expert

Database table: MosaicVisits

I have a database table named "MosaicVisits" attached. I would like to create search page to retrieve and display the data from the database table either search by the LastName or between a date range. For example, I can select the option search by LastName and enter last name into the textbox and click on Submit button, records associated to that LastName will display.

Or you can select to search by a date range. For example, the start date is 1/14/2013 and end date is 2/11/2013. Once you click on the Submit button, the following records will display.

VisitID Tech_ID LastName PurposeStudy PurposeSocial PurposeGroupProjects PurposeOther Ethnicity VisitDate
19 11053394 Ford 0 1 0   White 1/14/2013 9:44
17 12339966 Anderson 0 1 0   AfricanAmerican 1/14/2013 9:39
58 12339966 Anderson 1 1 0     1/16/2013 9:00
89 12339966 Anderson 1 1 0     1/18/2013 9:03
67 12339966 Anderson 1 0 0     1/17/2013 8:45
78 288982 Johnson 1 0 0   Asian 1/17/2013 11:50
28 713754 Vang 0 1 0   Asian 1/14/2013 12:25
25 234567 Vang 1 1 0   Asian 1/14/2013 10:56
118 234567 Vang 1 1 0   Asian 1/23/2013 10:53
190 10996760 Vang 1 0 0   Asian 2/11/2013 11:18

You can only perform one search option at a time. All leading zero should also display.

Below are what I need:

1. Create the script to create the MS SQL table

2. Create the script to create a store procedure

3. Create c# script that connect to the store procedure named MosaicVisitsDB.CS.

Below is a sample of the c# format to connect to the store procedure.

using System;
usingSystem.Collections.Generic;
usingSystem.Configuration;
usingSystem.Data;
usingSystem.Data.SqlClient;
usingSystem.Linq;
usingSystem.Web;

///


/// Summary description for StdntLookupDB
///

publicenumQueryType
{
ByLastName,
ByTechID
}

publicclassStudentDB
{
publicSqlDataReaderGetStudents(QueryTypequeryType, stringqueryText)
{
// Create Instance of Connection (establishing the SQL Server connection)
varmyConnection = newSqlConnection(ConfigurationManager.ConnectionStrings["ARDevConn"].ConnectionString);

//Create SqlCommandObj (usp_GetStudentInfoByLastName will be the name of the store procedure)
varmyCommand = newSqlCommand("usp_getstudentdata", myConnection);

// Mark the Command as a Store Procedure
myCommand.CommandType = CommandType.StoredProcedure;

//Set up params
varparamFilterBy = newSqlParameter("@FilterBy", SqlDbType.Int, 8);
paramFilterBy.Value = (int)queryType;
myCommand.Parameters.Add(paramFilterBy);

varparamFilterText = newSqlParameter("@FilterText", SqlDbType.NVarChar, 50);
paramFilterText.Value = queryText;
myCommand.Parameters.Add(paramFilterText);

// Open the connection
myConnection.Open();
//Execute the Command
SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);

//Return the datareader result
return result;
}
}

4. Create the search web page by either the LastName or between a date range in asp.net 2013.

5. Create c# handler or code behind to perform the function, which will connect the store procedure to the search web page form.

Attachment:- Data.rar

PL-SQL, Programming

  • Category:- PL-SQL
  • Reference No.:- M91582543
  • Price:- $150

Guranteed 48 Hours Delivery, In Price:- $150

Have any Question?


Related Questions in PL-SQL

Assignment - queries functions and triggersaimthe aims of

Assignment - Queries, Functions and Triggers Aim The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL queries; create SQ ...

Continuing the project you have worked on in weeks 1-4 in

Continuing the project you have worked on in Weeks 1-4, in this final week, complete the following tasks: Refine your database and SQL statements by incorporating your instructor's feedback. Verify that the database comp ...

For this assignment you will be provided a database backup

For this assignment, you will be provided a database backup for a database called FinanceDB. You will have to restore this backup to your own version of SQL Server. All of the questions in this assignment relate to the F ...

Purpose of the assessment with ulo mapping the purpose of

Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop skills in managing data in databases and to gain understanding of data model development and implementation using a commercially a ...

Complete the following tasksin microsoft access create the

Complete the following tasks: In Microsoft Access, create the database and tables that you identified in W3 Assignment 2. In Microsoft Word, write the SQL statements to create the database and tables. Write SQL statement ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As