Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

unctional Requirements Design a Windows Forms Application for a movie database p

ID: 3800169 • Letter: U

Question

unctional Requirements Design a Windows Forms Application for a movie database providing appropriate controls for the following data: Movie Name ISBN13 Number (optional) Release Date Location (Canadian OR International) Genre (Action, Biography, Comedy, Drama, Educational, History, Horror, Musical, Mystery, Romance, Sci-Fi, Thriller OR Western) Rating (1 to 5 stars) Duration (in minutes) Price Support loading and saving of the data for multiple movies to a Sequential Text file Display a list of movies to the user and allow the user to select a movie from this list of movies and have the appropriate move controls updated with the selected movie’s information. Allow movie records to be added, modified and deleted Allow the user to search for a particular movie by name and have the appropriate movie controls updated to reflect the corresponding movie's information. unctional Requirements Design a Windows Forms Application for a movie database providing appropriate controls for the following data: Movie Name ISBN13 Number (optional) Release Date Location (Canadian OR International) Genre (Action, Biography, Comedy, Drama, Educational, History, Horror, Musical, Mystery, Romance, Sci-Fi, Thriller OR Western) Rating (1 to 5 stars) Duration (in minutes) Price Support loading and saving of the data for multiple movies to a Sequential Text file Display a list of movies to the user and allow the user to select a movie from this list of movies and have the appropriate move controls updated with the selected movie’s information. Allow movie records to be added, modified and deleted Allow the user to search for a particular movie by name and have the appropriate movie controls updated to reflect the corresponding movie's information. unctional Requirements Design a Windows Forms Application for a movie database providing appropriate controls for the following data: Movie Name ISBN13 Number (optional) Release Date Location (Canadian OR International) Genre (Action, Biography, Comedy, Drama, Educational, History, Horror, Musical, Mystery, Romance, Sci-Fi, Thriller OR Western) Rating (1 to 5 stars) Duration (in minutes) Price Support loading and saving of the data for multiple movies to a Sequential Text file Display a list of movies to the user and allow the user to select a movie from this list of movies and have the appropriate move controls updated with the selected movie’s information. Allow movie records to be added, modified and deleted Allow the user to search for a particular movie by name and have the appropriate movie controls updated to reflect the corresponding movie's information.

Explanation / Answer

Search Form

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

<%@ Page Title="" Language="C#" MasterPageFile="~/User.master" AutoEventWireup="true" CodeFile="SearchDynamicQueryform.aspx.cs" Inherits="SearchDynamicQueryform" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.class1
{
margin-left:400px;
margin-top:-80px;
}
.class2
{
margin-left:100px;
}
td
{
width:500px;
}
.auto-style1 {

width: 654px;
}
.class3
{
margin-left:400px;
}
</style>
<script type="text/javascript">
function fun1()
{
  
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div>
Search dynamic query form
<table>
<tr>
<td class="auto-style1">Display</td>
<td>Condition</td>
</tr>
</table>
<asp:CheckBoxList ID="CheckBoxList1" runat="server" CssClass="class2">
<asp:ListItem>userid</asp:ListItem>
<asp:ListItem>name</asp:ListItem>
<asp:ListItem>emailid</asp:ListItem>
</asp:CheckBoxList>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" CssClass="class1">
<asp:ListItem>Male</asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
</asp:RadioButtonList>
<asp:Button ID="Button1" runat="server" Text="Submit" CssClass="class3" />
</div>
<div>
<asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="true"></asp:GridView>
</div>
</asp:Content>

Registration

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

<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="Registration.aspx.cs" Inherits="Registration" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.auto-style1 {
width: 128px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<table align="center">
<tr align="center">
<td colspan="2">User Registration</td>
</tr>
<tr>
<td><asp:Label ID="Label1" runat="server" Text="UserName"></asp:Label></td>
<td class="auto-style1"><asp:TextBox ID="txtname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td><asp:Label ID="Label2" runat="server" Text="EmailAddres"></asp:Label></td>
<td class="auto-style1"><asp:TextBox ID="txtemail" runat="server" ></asp:TextBox></td>
</tr>
<tr>
<td><asp:Label ID="Label3" runat="server" Text="Password"></asp:Label></td>
<td class="auto-style1"><asp:TextBox ID="txtpwd" runat="server" TextMode="Password" ></asp:TextBox></td>
</tr>
<tr>
<td><asp:Label ID="Label4" runat="server" Text="ConfirmPassword"></asp:Label></td>
<td class="auto-style1"><asp:TextBox ID="conpwd" runat="server" TextMode="Password" ></asp:TextBox></td>
</tr>
<tr>
<td><asp:Label ID="Label5" runat="server" Text="Gender"></asp:Label></td>
<td class="auto-style1"><asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
<asp:ListItem>Male</asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
</asp:RadioButtonList></td>
  
</tr>
<tr>
<td><asp:Label ID="label6" runat="server" Text="DOB"></asp:Label></td>
<td><asp:TextBox ID="txtdate" runat="server" ></asp:TextBox></td>
</tr>
<tr align="center">
<td colspan="2">
<asp:Button ID="btn1" runat="server" Text="Register" />
</td>

</tr>
</table>


</asp:Content>

UserHome

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

<%@ Page Title="" Language="C#" MasterPageFile="~/User.master" AutoEventWireup="true" CodeFile="userhome.aspx.cs" Inherits="userhome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div>
<b>Create Type of Dynamic Query Form</b>
</div>
<div>
select type of query form:<asp:DropDownList ID="drop1" runat="server">
<asp:ListItem>------select-------</asp:ListItem>
<asp:ListItem>Create Dynamic Query Form</asp:ListItem>
<asp:ListItem>Search Dynamic Query Result</asp:ListItem>

</asp:DropDownList><asp:Button ID="button1" runat="server" Text="Submit" />
</div>
</asp:Content>

search

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
public partial class SearchDynamicQueryform : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);

protected void Page_Load(object sender, EventArgs e)
{
if(con.State==ConnectionState.Closed)
{
con.Open();
}
if(!IsPostBack)
{
SqlCommand cmd = new SqlCommand("select * from reg",con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "reg");
Gridview1.DataSource = ds.Tables["reg"].DefaultView;
Gridview1.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
String str1 = RadioButtonList1.SelectedItem.ToString();
String str2 = CheckBoxList1.SelectedItem.ToString();
if(str1!=null)
{
display(str1);
}
if(str2!=null)
{
displayfields(str2);
}

}
public void display(String str1)
{
SqlCommand cmd1 = new SqlCommand("select name,emailid,dob from reg where gender='"+str1+"'",con);
SqlDataAdapter da = new SqlDataAdapter(cmd1);
DataSet ds = new DataSet();
da.Fill(ds, "reg");
Gridview1.DataSource = ds.Tables["reg"].DefaultView;
Gridview1.DataBind();

}
public void displayfields(String str2)
{
int k=0;
if(str2=="userid")
{
k = 0;
}
else if(str2=="name")
{
k = 1;
  
}
else if(str2=="emailid")
{
k = 2;
}
Response.Write(str2);
SqlCommand cmd2 = new SqlCommand("select * from reg ", con);
SqlDataAdapter da = new SqlDataAdapter(cmd2);
DataSet ds = new DataSet();
da.Fill(ds, "reg");

DataTable dt = new DataTable();
dt.Columns.Add(str2);
for (int i = 0; i < ds.Tables["reg"].Rows.Count;i++ )
{
DataRow dr =dt.NewRow();
dr[str2] = ds.Tables["reg"].Rows[i][k];
dt.Rows.Add(dr);
}

Gridview1.DataSource = dt;

Gridview1.DataBind();
Response.Write(ds.Tables["reg"].Rows[0][0]);
}
}

change the fields as your requirements