88719/CollegeWebsite/.vs/CollegeWebsite/config/applicationhost.config
88719/CollegeWebsite/.vs/CollegeWebsite/v16/.suo
88719/CollegeWebsite/CollegeWebsite/AddView.aspx
88719/CollegeWebsite/CollegeWebsite/AddView.aspx.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CollegeWebsite
{
public partial class AddView : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlConnection con = new SqlConnection("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\College.mdf;Integrated Security=True");
con.Open();
string com = "Select * from Course";
SqlDataAdapter adpt = new SqlDataAdapter(com, con);
DataTable dt = new DataTable();
adpt.Fill(dt);
course_code.DataSource = dt;
course_code.DataBind();
course_code.DataTextField = "course_name";
course_code.DataValueField = "course_code";
course_code.DataBind();
con.Close();
}
}
protected void ButtonId_Click(object sender, EventArgs e)
{
SqlConnection con = null;
try
{
con = new SqlConnection("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\College.mdf;Integrated Security=True");
con.Open();
SqlCommand cm = new SqlCommand("select count(*) as studentID from student", con);
Executing the SQL query
SqlDataReader sdr = cm.ExecuteReader();
sdr.Read();
int cu
entStudentID = Convert.ToInt32(sdr["studentID"].ToString()) + 1;
string courseCode = course_code.SelectedItem.Value ;
sdr.Close();
SqlCommand cmd = new SqlCommand("Insert into Student(student_id, firstname, lastname, address, city, province, postal_code, phone_number)Values" +
"(@StudentID,@FirstName,@LastName,@Address,@City,@Province,@PostalCode,@PhoneNumber)", con);
Add the parameters for the InsertCommand.
cmd.Parameters.AddWithValue("@StudentID", cu
entStudentID);
cmd.Parameters.AddWithValue("@FirstName", firstname.Text);
cmd.Parameters.AddWithValue("@LastName", lastname.Text);
cmd.Parameters.AddWithValue("@Address", address.Text);
cmd.Parameters.AddWithValue("@City", city.Text);
cmd.Parameters.AddWithValue("@Province", province.Text);
cmd.Parameters.AddWithValue("@PostalCode", postal_code.Text);
cmd.Parameters.AddWithValue("@PhoneNumber", phone_number.Text);
cmd.ExecuteNonQuery();
SqlCommand cm1 = new SqlCommand("select count(*) as studentCourseID from studentcourse", con);
Executing the SQL query
SqlDataReader sdr1 = cm1.ExecuteReader();
sdr1.Read();
int cu
entStudentCourseID = Convert.ToInt32(sdr1["studentCourseID"].ToString()) + 1;
sdr1.Close();
SqlCommand cmd1 = new SqlCommand("Insert into StudentCourse(student_course_id,student_id,course_code)Values" +
"(@StudentCourseID,@StudentID,@CourseCode)", con);
cmd1.Parameters.AddWithValue("@StudentCourseID", cu
entStudentCourseID);
cmd1.Parameters.AddWithValue("@StudentID", cu
entStudentID);
cmd1.Parameters.AddWithValue("@CourseCode", courseCode);
cmd1.ExecuteNonQuery();
Response.Redirect("Home.aspx");
}
catch (Exception ex)
{
Console.WriteLine("OOPs, something went wrong." + ex);
}
Closing the connection
finally
{
con.Close();
}
}
}
}
88719/CollegeWebsite/CollegeWebsite/AddView.aspx.designer.cs
------------------------------------------------------------------------------
This code was generated by a tool.
Changes to this file may cause inco
ect behavior and will be lost if
the code is regenerated.
auto-generated
------------------------------------------------------------------------------
namespace CollegeWebsite
{
public partial class AddView
{
form1 control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
GridView1 control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.GridView GridView1;
firstname control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox firstname;
lastname control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox lastname;
address control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox address;
city control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox city;
province control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox province;
postal_code control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox postal_code;
phone_number control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.TextBox phone_number;
course_code control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.DropDownList course_code;
ButtonId control.
summary
emarks
Auto-generated field.
To modify move field declaration from designer file to code-behind file.
emarks
protected global::System.Web.UI.WebControls.Button ButtonId;
}
}
88719/CollegeWebsite/CollegeWebsite/App_Data/College.mdf
88719/CollegeWebsite/CollegeWebsite/App_Data/College_log.ldf
88719/CollegeWebsite/CollegeWebsite
in/CollegeWebsite.dll
88719/CollegeWebsite/CollegeWebsite
in/CollegeWebsite.dll.config
88719/CollegeWebsite/CollegeWebsite
in/CollegeWebsite.pd
88719/CollegeWebsite/CollegeWebsite
in/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
88719/CollegeWebsite/CollegeWebsite
in/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml
Microsoft.CodeDom.Providers.DotNetCompilerPlatform
Provides access to instances of the .NET Compiler Platform C# code generator and code compiler.
Default Constructo
Creates an instance using the given ICompilerSettings
Gets an instance of the .NET Compiler Platform C# code compiler.
An instance of the .NET Compiler Platform C# code compile
Provides settings for the C# and VB CodeProviders
The full path to csc.exe or vbc.exe
TTL in seconds
Provides access to instances of the .NET Compiler Platform VB code generator and code compiler.
Default Constructo
Creates an instance using the given ICompilerSettings
Gets an instance of the .NET Compiler Platform VB code compiler.
An instance of the .NET Compiler Platform VB code compile
88719/CollegeWebsite/CollegeWebsite
in
oslyn/csc.exe
88719/CollegeWebsite/CollegeWebsite
in
oslyn/csc.exe.config
88719/CollegeWebsite/CollegeWebsite
in
oslyn/csc.rsp
# Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
# This file contains command-line options that the C#
# command line compiler (CSC) will process as part
# of every compilation, unless the "/noconfig" option
# is specified.
# Reference the common Framework li
aries
:Accessibility.dll
:Microsoft.CSharp.dll
:System.Configuration.dll
:System.Configuration.Install.dll
:System.Core.dll
:System.Data.dll
:System.Data.DataSetExtensions.dll
:System.Data.Linq.dll
:System.Data.OracleClient.dll
:System.Deployment.dll
:System.Design.dll
:System.DirectoryServices.dll
:System.dll
:System.Drawing.Design.dll
:System.Drawing.dll
:System.EnterpriseServices.dll
:System.Management.dll
:System.Messaging.dll
:System.Runtime.Remoting.dll
:System.Runtime.Serialization.dll
:System.Runtime.Serialization.Formatters.Soap.dll
:System.Security.dll
:System.ServiceModel.dll
:System.ServiceModel.Web.dll
:System.ServiceProcess.dll
:System.Transactions.dll
:System.Web.dll
:System.Web.Extensions.Design.dll
:System.Web.Extensions.dll
:System.Web.Mobile.dll
:System.Web.RegularExpressions.dll
:System.Web.Services.dll
:System.Windows.Forms.dll
:System.Workflow.Activities.dll
:System.Workflow.ComponentModel.dll
:System.Workflow.Runtime.dll
:System.Xml.dll
:System.Xml.Linq.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/csi.exe
88719/CollegeWebsite/CollegeWebsite
in
oslyn/csi.exe.config
88719/CollegeWebsite/CollegeWebsite
in
oslyn/csi.rsp
:System
:System.Core
:Microsoft.CSharp
:System.ValueTuple.dll
u:System
u:System.IO
u:System.Collections.Generic
u:System.Console
u:System.Diagnostics
u:System.Dynamic
u:System.Linq
u:System.Linq.Expressions
u:System.Text
u:System.Threading.Tasks
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.Build.Tasks.CodeAnalysis.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.CodeAnalysis.CSharp.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.CodeAnalysis.CSharp.Scripting.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.CodeAnalysis.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.CodeAnalysis.Scripting.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.CodeAnalysis.VisualBasic.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.CSharp.Core.targets
$(NoWarn);1701;1702
$(NoWarn);2008
$(AppConfig)
$(IntermediateOutputPath)$(TargetName).compile.pd
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.DiaSymReader.Native.amd64.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.DiaSymReader.Native.x86.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.Managed.Core.targets
false
true
true
true
,$(PathMap)
@(_TopLevelSourceRoot->'%(Identity)=%(MappedPath)', ',')$(PathMap)
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.VisualBasic.Core.targets
true
false
$(IntermediateOutputPath)$(TargetName).compile.pd
88719/CollegeWebsite/CollegeWebsite
in
oslyn/Microsoft.Win32.Primitives.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.AppContext.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Collections.Immutable.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Console.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Diagnostics.DiagnosticSource.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Diagnostics.FileVersionInfo.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Diagnostics.StackTrace.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Globalization.Calendars.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.IO.Compression.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.IO.Compression.ZipFile.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.IO.FileSystem.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.IO.FileSystem.Primitives.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Net.Http.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Net.Sockets.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Reflection.Metadata.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Runtime.InteropServices.RuntimeInformation.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Security.Cryptography.Algorithms.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Security.Cryptography.Encoding.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Security.Cryptography.Primitives.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Security.Cryptography.X509Certificates.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Text.Encoding.CodePages.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Threading.Tasks.Extensions.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.ValueTuple.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Xml.ReaderWriter.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Xml.XmlDocument.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Xml.XPath.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/System.Xml.XPath.XDocument.dll
88719/CollegeWebsite/CollegeWebsite
in
oslyn/vbc.exe
88719/CollegeWebsite/CollegeWebsite
in
oslyn/vbc.exe.config
88719/CollegeWebsite/CollegeWebsite
in
oslyn/vbc.rsp
# Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
# This file contains command-line options that the VB
# command line compiler (VBC) will process as part
# of every compilation, unless the "/noconfig" option
# is specified.
# Reference the common Framework li
aries
:Accessibility.dll
:System.Configuration.dll
:System.Configuration.Install.dll
:System.Data.dll
:System.Data.OracleClient.dll
:System.Deployment.dll
:System.Design.dll
:System.DirectoryServices.dll
:System.dll
:System.Drawing.Design.dll
:System.Drawing.dll
:System.EnterpriseServices.dll
:System.Management.dll
:System.Messaging.dll
:System.Runtime.Remoting.dll
:System.Runtime.Serialization.Formatters.Soap.dll
:System.Security.dll
:System.ServiceProcess.dll
:System.Transactions.dll
:System.Web.dll
:System.Web.Mobile.dll
:System.Web.RegularExpressions.dll
:System.Web.Services.dll
:System.Windows.Forms.dll
:System.XML.dll
:System.Workflow.Activities.dll
:System.Workflow.ComponentModel.dll
:System.Workflow.Runtime.dll
:System.Runtime.Serialization.dll
:System.ServiceModel.dll
:System.Core.dll
:System.Xml.Linq.dll
:System.Data.Linq.dll
:System.Data.DataSetExtensions.dll
:System.Web.Extensions.dll
:System.Web.Extensions.Design.dll
:System.ServiceModel.Web.dll
# Import System and Microsoft.VisualBasic
imports:System
imports:Microsoft.VisualBasic
imports:System.Linq
imports:System.Xml.Linq
optioninfer+
88719/CollegeWebsite/CollegeWebsite
in
oslyn/VBCSCompiler.exe
88719/CollegeWebsite/CollegeWebsite
in
oslyn/VBCSCompiler.exe.config
88719/CollegeWebsite/CollegeWebsite/CollegeWebsite.csproj
Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http:
schemas.microsoft.com/develope
msbuild/2003"
Debug
Configuration
AnyCPU
Platform
ProductVersion
2.0
SchemaVersion
{B407E904-60C1-49D6-B3CE-B70B7533EBC6}
ProjectGuid
{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
ProjectTypeGuids
Li
ary
OutputType
Properties
AppDesignerFolde
CollegeWebsite
RootNamespace
CollegeWebsite
AssemblyName
v4.7.2
TargetFrameworkVersion
true
UseIISExpress
44317
IISExpressSSLPort
NuGetPackageImportStamp
PropertyGroup
true
DebugSymbols
full
DebugType
false
Optimize
in\
OutputPath
DEBUG;TRACE
DefineConstants
orReport>prompt
E
orReport
4
WarningLevel
PropertyGroup
true
DebugSymbols
pdbonly
DebugType
true
Optimize
in\
OutputPath
TRACE
DefineConstants
orReport>prompt
E
orReport
4
WarningLevel
PropertyGroup
ItemGroup
..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
HintPath
Reference
ItemGroup
College.mdf
DependentUpon
Content
ItemGroup
AddView.aspx
DependentUpon
ASPXCodeBehind
SubType
Compile
AddView.aspx
DependentUpon
Compile
Home.aspx
DependentUpon
ASPXCodeBehind
SubType
Compile
Home.aspx
DependentUpon
Compile
UpdateView.aspx
DependentUpon
ASPXCodeBehind
SubType
Compile
UpdateView.aspx
DependentUpon
Compile
ItemGroup
Web.config
DependentUpon
None
Web.config
DependentUpon
None
ItemGroup
10.0
VisualStudioVersion
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
VSToolsPath
PropertyGroup
True
UseIIS
True
AutoAssignPort
61365
DevelopmentServerPort
DevelopmentServerVPath
https:
localhost:44317
IISUrl
False
NTLMAuthentication
False
UseCustomServe
CustomServerUrl
False
SaveServerSettingsInUserFile
WebProjectProperties
FlavorProperties
VisualStudio
ProjectExtensions
orText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http:
go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
E
orText
PropertyGroup
or Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(E
orText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))"
Target