Archives from S:\ Drive
Good to keep around methinks
No files matched your search
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GlacierPoint", "GlacierPoint\GlacierPoint.csproj", "{4AD2D4A4-060F-4478-96C2-BB83F883B58A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4AD2D4A4-060F-4478-96C2-BB83F883B58A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4AD2D4A4-060F-4478-96C2-BB83F883B58A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4AD2D4A4-060F-4478-96C2-BB83F883B58A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4AD2D4A4-060F-4478-96C2-BB83F883B58A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,126 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Address book page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Page Language="C#" MasterPageFile="~/GlacierPoint.Master" AutoEventWireup="true"
|
||||
CodeBehind="AddressBook.aspx.cs" Inherits="GlacierPoint.AddressBook" Title="GlacierPoint Address Book" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<h1>Address Book</h1>
|
||||
<asp:LinkButton ID="addEmployeeButton" runat="server" Text="Add New Employee" OnClick="addEmployeeButton_Click" /><br />
|
||||
<asp:GridView ID="grid" runat="server" AutoGenerateColumns="False"
|
||||
CellPadding="4" AllowPaging="True"
|
||||
AllowSorting="True" DataKeyNames="EmployeeId" DataSourceID="employeesSqlDataSource"
|
||||
PageSize="3" EnableModelValidation="True" ForeColor="#333333"
|
||||
GridLines="None">
|
||||
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Name" HeaderText="Name" />
|
||||
<asp:BoundField DataField="City" HeaderText="City" />
|
||||
<asp:BoundField DataField="MobilePhone" HeaderText="Mobile Phone" />
|
||||
<asp:ButtonField CommandName="Select" Text="Select" />
|
||||
</Columns>
|
||||
<EditRowStyle BackColor="#999999" />
|
||||
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
|
||||
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
|
||||
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
|
||||
</asp:GridView>
|
||||
<asp:SqlDataSource ID="employeeDetailSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:GlacierPoint %>"
|
||||
DeleteCommand="DELETE FROM [gp_Employee] WHERE [EmployeeId] = @EmployeeId" InsertCommand="INSERT INTO [gp_Employee] ([DepartmentId], [Name], [Username], [Password], [Address], [City], [State], [Zip], [HomePhone], [Extension], [MobilePhone]) VALUES (@DepartmentId, @Name, @Username, @Password, @Address, @City, @State, @Zip, @HomePhone, @Extension, @MobilePhone)"
|
||||
SelectCommand="SELECT [EmployeeId], [DepartmentId], [Name], [Username], [Password], [Address], [City], [State], [Zip], [HomePhone], [Extension], [MobilePhone] FROM [gp_Employee] WHERE ([EmployeeId] = @EmployeeId)"
|
||||
UpdateCommand="UPDATE [gp_Employee] SET [DepartmentId] = @DepartmentId, [Name] = @Name, [Username] = @Username, [Password] = @Password, [Address] = @Address, [City] = @City, [State] = @State, [Zip] = @Zip, [HomePhone] = @HomePhone, [Extension] = @Extension, [MobilePhone] = @MobilePhone WHERE [EmployeeId] = @EmployeeId">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="grid" Name="EmployeeId" PropertyName="SelectedValue"
|
||||
Type="Int32" />
|
||||
</SelectParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="EmployeeId" Type="Int32" />
|
||||
</DeleteParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="DepartmentId" Type="Int32" />
|
||||
<asp:Parameter Name="Name" Type="String" />
|
||||
<asp:Parameter Name="Username" Type="String" />
|
||||
<asp:Parameter Name="Password" Type="String" />
|
||||
<asp:Parameter Name="Address" Type="String" />
|
||||
<asp:Parameter Name="City" Type="String" />
|
||||
<asp:Parameter Name="State" Type="String" />
|
||||
<asp:Parameter Name="Zip" Type="String" />
|
||||
<asp:Parameter Name="HomePhone" Type="String" />
|
||||
<asp:Parameter Name="Extension" Type="String" />
|
||||
<asp:Parameter Name="MobilePhone" Type="String" />
|
||||
<asp:Parameter Name="EmployeeId" Type="Int32" />
|
||||
</UpdateParameters>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="DepartmentId" Type="Int32" />
|
||||
<asp:Parameter Name="Name" Type="String" />
|
||||
<asp:Parameter Name="Username" Type="String" />
|
||||
<asp:Parameter Name="Password" Type="String" />
|
||||
<asp:Parameter Name="Address" Type="String" />
|
||||
<asp:Parameter Name="City" Type="String" />
|
||||
<asp:Parameter Name="State" Type="String" />
|
||||
<asp:Parameter Name="Zip" Type="String" />
|
||||
<asp:Parameter Name="HomePhone" Type="String" />
|
||||
<asp:Parameter Name="Extension" Type="String" />
|
||||
<asp:Parameter Name="MobilePhone" Type="String" />
|
||||
</InsertParameters>
|
||||
</asp:SqlDataSource>
|
||||
<br />
|
||||
<asp:DetailsView ID="employeeDetails" runat="server" AutoGenerateRows="False" AutoGenerateDeleteButton="True"
|
||||
AutoGenerateEditButton="True" AutoGenerateInsertButton="True" DataKeyNames="EmployeeId"
|
||||
DataSourceID="employeeDetailSqlDataSource" OnItemDeleted="employeeDetails_ItemDeleted"
|
||||
OnItemInserted="employeeDetails_ItemInserted"
|
||||
OnItemUpdated="employeeDetails_ItemUpdated" CellPadding="4"
|
||||
EnableModelValidation="True" ForeColor="#333333" GridLines="None">
|
||||
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
|
||||
<CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
|
||||
<EditRowStyle BackColor="#999999" />
|
||||
<FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
|
||||
<Fields>
|
||||
<asp:BoundField DataField="EmployeeId" HeaderText="EmployeeId" InsertVisible="False"
|
||||
ReadOnly="True" SortExpression="EmployeeId" />
|
||||
<asp:TemplateField HeaderText="DepartmentId" SortExpression="DepartmentId">
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="didDdl" runat="server" DataSourceID="departmentsDataSource"
|
||||
DataTextField="Department" DataValueField="DepartmentId" SelectedValue='<%# Bind("DepartmentId") %>' />
|
||||
</EditItemTemplate>
|
||||
<InsertItemTemplate>
|
||||
<asp:DropDownList ID="didDdl" runat="server" DataSourceID="departmentsDataSource"
|
||||
DataTextField="Department" DataValueField="DepartmentId" SelectedValue='<%# Bind("DepartmentId") %>' />
|
||||
</InsertItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
|
||||
<asp:DropDownList ID="didDdl" runat="server" DataSourceID="departmentsDataSource"
|
||||
DataTextField="Department" DataValueField="DepartmentId" SelectedValue='<%# Bind("DepartmentId") %>'
|
||||
Enabled="False" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
|
||||
<asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" />
|
||||
<asp:BoundField DataField="Password" HeaderText="Password" SortExpression="Password" />
|
||||
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
|
||||
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
|
||||
<asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
|
||||
<asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />
|
||||
<asp:BoundField DataField="HomePhone" HeaderText="HomePhone" SortExpression="HomePhone" />
|
||||
<asp:BoundField DataField="Extension" HeaderText="Extension" SortExpression="Extension" />
|
||||
<asp:BoundField DataField="MobilePhone" HeaderText="MobilePhone" SortExpression="MobilePhone" />
|
||||
</Fields>
|
||||
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderTemplate>
|
||||
<%#Eval("Name") == null? "Adding New Employee" : Eval("Name")%>
|
||||
</HeaderTemplate>
|
||||
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
|
||||
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
|
||||
</asp:DetailsView>
|
||||
<asp:SqlDataSource ID="departmentsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:GlacierPoint %>"
|
||||
SelectCommand="SELECT [DepartmentId], [Department] FROM [gp_Department]"></asp:SqlDataSource>
|
||||
<asp:SqlDataSource ID="employeesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:GlacierPoint %>"
|
||||
SelectCommand="SELECT [EmployeeId], [Name], [City], [MobilePhone] FROM [gp_Employee] ORDER BY [Name]">
|
||||
</asp:SqlDataSource>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Address Book Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
public partial class AddressBook : System.Web.UI.Page
|
||||
{
|
||||
protected void employeeDetails_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
|
||||
{
|
||||
grid.DataBind();
|
||||
}
|
||||
|
||||
protected void employeeDetails_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
|
||||
{
|
||||
grid.DataBind();
|
||||
}
|
||||
|
||||
protected void employeeDetails_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
|
||||
{
|
||||
grid.DataBind();
|
||||
}
|
||||
|
||||
protected void addEmployeeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
employeeDetails.ChangeMode(DetailsViewMode.Insert);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class AddressBook {
|
||||
|
||||
/// <summary>
|
||||
/// addEmployeeButton control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton addEmployeeButton;
|
||||
|
||||
/// <summary>
|
||||
/// grid control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grid;
|
||||
|
||||
/// <summary>
|
||||
/// employeeDetailSqlDataSource control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.SqlDataSource employeeDetailSqlDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// employeeDetails control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DetailsView employeeDetails;
|
||||
|
||||
/// <summary>
|
||||
/// departmentsDataSource control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.SqlDataSource departmentsDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// employeesSqlDataSource control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.SqlDataSource employeesSqlDataSource;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Admin Tools Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Page Language="C#" MasterPageFile="~/GlacierPoint.Master" AutoEventWireup="true"
|
||||
CodeBehind="AdminTools.aspx.cs" Inherits="GlacierPoint.AdminTools" Title="Untitled Page" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<h1>
|
||||
Admin Tools</h1>
|
||||
<asp:Label ID="dbErrorLabel" ForeColor="Red" runat="server" />
|
||||
<p>
|
||||
Select an employee to update:<br />
|
||||
<asp:DropDownList ID="employeesList" runat="server" />
|
||||
<asp:Button ID="selectButton" Text="Select" runat="server" OnClick="selectButton_Click" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="nameLabel" runat="server" Text="Name:" Width="100" />
|
||||
<asp:TextBox ID="nameTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="usernameLabel" runat="server" Text="Username:" Width="100" />
|
||||
<asp:TextBox ID="usernameTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="addressLabel" runat="server" Text="Address:" Width="100" />
|
||||
<asp:TextBox ID="addressTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="cityLabel" runat="server" Text="City:" Width="100" />
|
||||
<asp:TextBox ID="cityTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="stateLabel" runat="server" Text="State:" Width="100" />
|
||||
<asp:TextBox ID="stateTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="zipLabel" runat="server" Text="Zip:" Width="100" />
|
||||
<asp:TextBox ID="zipTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="homePhoneLabel" runat="server" Text="Home Phone:" Width="100" />
|
||||
<asp:TextBox ID="homePhoneTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="extensionLabel" runat="server" Text="Extension:" Width="100" />
|
||||
<asp:TextBox ID="extensionTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Label ID="mobilePhoneLabel" runat="server" Text="Mobile Phone:" Width="100" />
|
||||
<asp:TextBox ID="mobilePhoneTextBox" runat="server" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Button ID="updateButton" Text="Update Employee" Enabled="False" runat="server"
|
||||
OnClick="updateButton_Click" />
|
||||
<asp:Button ID="deleteButton" Text="Delete Employee" Enabled="False" runat="server"
|
||||
OnClick="deleteButton_Click" />
|
||||
</p>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,264 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Admin Tools Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
public partial class AdminTools : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Read the employees list when initially loading the page
|
||||
if (!IsPostBack)
|
||||
{
|
||||
LoadEmployeesList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LoadEmployeesList()
|
||||
{
|
||||
// Declare objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
SqlDataReader reader;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command
|
||||
comm = new SqlCommand("SELECT EmployeeId, Name FROM gp_Employee", conn);
|
||||
|
||||
// Enclose database code in Try-Catch-Finally
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
reader = comm.ExecuteReader();
|
||||
|
||||
// Populate the list of employees
|
||||
employeesList.DataSource = reader;
|
||||
employeesList.DataValueField = "EmployeeId";
|
||||
employeesList.DataTextField = "Name";
|
||||
employeesList.DataBind();
|
||||
|
||||
// Close the reader
|
||||
reader.Close();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Display error message
|
||||
dbErrorLabel.Text = "Error loading employees<br />";
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
// Disable the update button
|
||||
updateButton.Enabled = false;
|
||||
|
||||
// Clear any values in the TextBox controls
|
||||
nameTextBox.Text = "";
|
||||
usernameTextBox.Text = "";
|
||||
addressTextBox.Text = "";
|
||||
cityTextBox.Text = "";
|
||||
stateTextBox.Text = "";
|
||||
zipTextBox.Text = "";
|
||||
homePhoneTextBox.Text = "";
|
||||
extensionTextBox.Text = "";
|
||||
mobilePhoneTextBox.Text = "";
|
||||
}
|
||||
|
||||
protected void selectButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Declare objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
SqlDataReader reader;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command
|
||||
comm = new SqlCommand( "SELECT Name, Username, Address, City, State, Zip, HomePhone, Extension, MobilePhone FROM gp_Employee WHERE EmployeeId = @EmployeeId", conn);
|
||||
|
||||
// Add command parameters
|
||||
comm.Parameters.Add("@EmployeeId", SqlDbType.Int);
|
||||
comm.Parameters["@EmployeeId"].Value = employeesList.SelectedItem.Value;
|
||||
|
||||
// Enclose database code in Try-Catch-Finally
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
reader = comm.ExecuteReader();
|
||||
|
||||
// Display the data on the form
|
||||
if (reader.Read())
|
||||
{
|
||||
nameTextBox.Text = reader["Name"].ToString();
|
||||
usernameTextBox.Text = reader["Username"].ToString();
|
||||
addressTextBox.Text = reader["Address"].ToString();
|
||||
cityTextBox.Text = reader["City"].ToString();
|
||||
stateTextBox.Text = reader["State"].ToString();
|
||||
zipTextBox.Text = reader["Zip"].ToString();
|
||||
homePhoneTextBox.Text = reader["HomePhone"].ToString();
|
||||
extensionTextBox.Text = reader["Extension"].ToString();
|
||||
mobilePhoneTextBox.Text = reader["MobilePhone"].ToString();
|
||||
}
|
||||
|
||||
// Close the reader
|
||||
reader.Close();
|
||||
|
||||
// Enable the Update button
|
||||
updateButton.Enabled = true;
|
||||
deleteButton.Enabled = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Display error message
|
||||
dbErrorLabel.Text =
|
||||
"Error loading employee details<br />";
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Declare objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command
|
||||
comm = new SqlCommand(
|
||||
"UPDATE gp_Employee SET Name=@Name, Username=@Username, " +
|
||||
"Address=@Address, City=@City, State=@State, Zip=@Zip, " +
|
||||
"HomePhone=@HomePhone, Extension=@Extension, " +
|
||||
"MobilePhone=@MobilePhone " +
|
||||
"WHERE EmployeeId=@EmployeeId", conn);
|
||||
|
||||
// Add command parameters
|
||||
comm.Parameters.Add("@Name", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@Name"].Value = nameTextBox.Text;
|
||||
comm.Parameters.Add("@Username", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@Username"].Value = usernameTextBox.Text;
|
||||
comm.Parameters.Add("@Address", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@Address"].Value = addressTextBox.Text;
|
||||
comm.Parameters.Add("@City", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@City"].Value = cityTextBox.Text;
|
||||
comm.Parameters.Add("@State", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@State"].Value = stateTextBox.Text;
|
||||
comm.Parameters.Add("@Zip", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@Zip"].Value = zipTextBox.Text;
|
||||
comm.Parameters.Add("@HomePhone", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@HomePhone"].Value = homePhoneTextBox.Text;
|
||||
comm.Parameters.Add("@Extension", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@Extension"].Value = extensionTextBox.Text;
|
||||
comm.Parameters.Add("@MobilePhone", SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@MobilePhone"].Value = mobilePhoneTextBox.Text;
|
||||
comm.Parameters.Add("@EmployeeId", SqlDbType.Int);
|
||||
comm.Parameters["@EmployeeId"].Value = employeesList.SelectedItem.Value;
|
||||
|
||||
// Enclose database code in Try-Catch-Finally
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
comm.ExecuteNonQuery();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Display error message
|
||||
dbErrorLabel.Text = "Error updating employee details<br />";
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
// Refresh the employees list
|
||||
LoadEmployeesList();
|
||||
}
|
||||
|
||||
protected void deleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Define data objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command
|
||||
comm = new SqlCommand("DELETE FROM gp_Employee WHERE EmployeeId = @EmployeeId", conn);
|
||||
|
||||
// Add command parameters
|
||||
comm.Parameters.Add("@EmployeeId", SqlDbType.Int);
|
||||
comm.Parameters["@EmployeeId"].Value = employeesList.SelectedItem.Value;
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
comm.ExecuteNonQuery();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Display error message
|
||||
dbErrorLabel.Text = "Error deleting employee<br />";
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
// Refresh the employees list
|
||||
LoadEmployeesList();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class AdminTools {
|
||||
|
||||
/// <summary>
|
||||
/// dbErrorLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label dbErrorLabel;
|
||||
|
||||
/// <summary>
|
||||
/// employeesList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList employeesList;
|
||||
|
||||
/// <summary>
|
||||
/// selectButton control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button selectButton;
|
||||
|
||||
/// <summary>
|
||||
/// nameLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label nameLabel;
|
||||
|
||||
/// <summary>
|
||||
/// nameTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox nameTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// usernameLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label usernameLabel;
|
||||
|
||||
/// <summary>
|
||||
/// usernameTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox usernameTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// addressLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label addressLabel;
|
||||
|
||||
/// <summary>
|
||||
/// addressTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox addressTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// cityLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label cityLabel;
|
||||
|
||||
/// <summary>
|
||||
/// cityTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox cityTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// stateLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label stateLabel;
|
||||
|
||||
/// <summary>
|
||||
/// stateTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox stateTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// zipLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label zipLabel;
|
||||
|
||||
/// <summary>
|
||||
/// zipTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox zipTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// homePhoneLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label homePhoneLabel;
|
||||
|
||||
/// <summary>
|
||||
/// homePhoneTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox homePhoneTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// extensionLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label extensionLabel;
|
||||
|
||||
/// <summary>
|
||||
/// extensionTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox extensionTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// mobilePhoneLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label mobilePhoneLabel;
|
||||
|
||||
/// <summary>
|
||||
/// mobilePhoneTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox mobilePhoneTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// updateButton control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button updateButton;
|
||||
|
||||
/// <summary>
|
||||
/// deleteButton control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button deleteButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Default Skin
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
body
|
||||
{
|
||||
font-family: Tahoma, Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
h1
|
||||
{
|
||||
font-size: 25px;
|
||||
}
|
||||
a:link, a:visited
|
||||
{
|
||||
text-decoration: none;
|
||||
color: Blue;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
color: Red;
|
||||
}
|
||||
.Header
|
||||
{
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
position: absolute;
|
||||
width: 800px;
|
||||
}
|
||||
.Menu
|
||||
{
|
||||
top: 160px;
|
||||
left: 15px;
|
||||
width: 195px;
|
||||
position: absolute;
|
||||
}
|
||||
.Content
|
||||
{
|
||||
top: 160px;
|
||||
left: 170px;
|
||||
position: absolute;
|
||||
width: 600px;
|
||||
}
|
||||
.GridMain
|
||||
{
|
||||
border-right: gainsboro thin solid;
|
||||
border-top: gainsboro thin solid;
|
||||
border-left: gainsboro thin solid;
|
||||
border-bottom: gainsboro thin solid;
|
||||
background-color: #333333;
|
||||
width: 400px;
|
||||
}
|
||||
.GridRow
|
||||
{
|
||||
background-color: #FFFAFA;
|
||||
}
|
||||
.GridSelectedRow
|
||||
{
|
||||
background-color: #E6E6FA;
|
||||
}
|
||||
.GridHeader
|
||||
{
|
||||
background-color: #ADD8E6;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Skin Defination File
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
|
||||
<asp:TextBox runat="server" ForeColor="blue" />
|
||||
|
||||
<asp:GridView runat="server" CssClass="GridMain" CellPadding="4" GridLines="None">
|
||||
<RowStyle CssClass="GridRow" />
|
||||
<SelectedRowStyle CssClass="GridSelectedRow" />
|
||||
<HeaderStyle CssClass="GridHeader" />
|
||||
<PagerStyle CssClass="GridRow" />
|
||||
</asp:GridView>
|
||||
|
||||
<asp:DetailsView runat="server" CssClass="GridMain" CellPadding="4" GridLines="None">
|
||||
<RowStyle CssClass="GridRow" />
|
||||
<HeaderStyle CssClass="GridHeader" />
|
||||
<PagerStyle CssClass="GridRow" />
|
||||
</asp:DetailsView>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Home Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Page Language="C#" MasterPageFile="~/GlacierPoint.Master" AutoEventWireup="true"
|
||||
CodeBehind="Default.aspx.cs" Inherits="GlacierPoint.Default" Title="GlacierPoint" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<h1>
|
||||
Company News</h1>
|
||||
<p>
|
||||
You will add some news later.</p>
|
||||
<h1>
|
||||
Company Events</h1>
|
||||
<p>
|
||||
You will add company events later.</p>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Home Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
public partial class Default : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class Default {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Departments Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Page Language="C#" MasterPageFile="~/GlacierPoint.Master" AutoEventWireup="true"
|
||||
CodeBehind="Departments.aspx.cs" Inherits="GlacierPoint.Departments" Title="GlacierPoint Departments" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<h1>
|
||||
GlacierPoint Departments</h1>
|
||||
<asp:GridView ID="departmentsGrid" runat="server" AllowPaging="True" OnPageIndexChanging="departmentsGrid_PageIndexChanging"
|
||||
PageSize="4" AllowSorting="True" OnSorting="departmentsGrid_Sorting"
|
||||
CellPadding="4" EnableModelValidation="True" ForeColor="#333333"
|
||||
GridLines="None">
|
||||
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
|
||||
<EditRowStyle BackColor="#999999" />
|
||||
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
|
||||
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
|
||||
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
|
||||
</asp:GridView>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,191 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Departments Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
public partial class Departments : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
// Define data objects
|
||||
SqlConnection conn;
|
||||
DataSet dataSet = new DataSet();
|
||||
SqlDataAdapter adapter;
|
||||
|
||||
//DataRow dataRow;
|
||||
SqlCommandBuilder commandBuilder;
|
||||
|
||||
if (ViewState["DepartmentsDataSet"] == null)
|
||||
{
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create adapter
|
||||
adapter = new SqlDataAdapter("SELECT DepartmentId, Department FROM gp_Department", conn);
|
||||
|
||||
// Fill the DataSet
|
||||
adapter.Fill(dataSet, "Departments");
|
||||
|
||||
// Make changes to the table
|
||||
//dataRow = dataSet.Tables["Departments"].NewRow();
|
||||
//dataRow["Department"] = "New Department";
|
||||
//dataSet.Tables["Departments"].Rows.Add(dataRow);
|
||||
foreach (DataRow dataRow in dataSet.Tables["Departments"].Rows)
|
||||
{
|
||||
if (dataRow["Department"].ToString() == "New Department")
|
||||
{
|
||||
dataRow.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
//// Submit the changes
|
||||
commandBuilder = new SqlCommandBuilder(adapter);
|
||||
adapter.Update(dataSet.Tables["Departments"]);
|
||||
// Make changes to the table
|
||||
|
||||
|
||||
// Store the DataSet in view state
|
||||
ViewState["DepartmentsDataSet"] = dataSet;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataSet = (DataSet)ViewState["DepartmentsDataSet"];
|
||||
}
|
||||
|
||||
// Initialize the adapter with a new command
|
||||
//adapter.SelectCommand = new SqlCommand(
|
||||
//"SELECT EmployeeId, Name, MobilePhone FROM gp_Employee", conn);
|
||||
//// Add the new table to the DataSet
|
||||
//adapter.Fill(dataSet, "Employees");
|
||||
//// Bind the grid to the DataSet
|
||||
departmentsGrid.DataSource = dataSet;
|
||||
//departmentsGrid.DataMember = "Employees";
|
||||
// Prepare the sort expression using the
|
||||
// gridSortDirection and
|
||||
// gridSortExpression properties
|
||||
string sortExpression;
|
||||
if (gridSortDirection == SortDirection.Ascending)
|
||||
{
|
||||
sortExpression = gridSortExpression + " ASC";
|
||||
}
|
||||
else
|
||||
{
|
||||
sortExpression = gridSortExpression + " DESC";
|
||||
}
|
||||
// Sort the data
|
||||
dataSet.Tables["Departments"].DefaultView.Sort = sortExpression;
|
||||
// Bind the grid to the DataSet
|
||||
departmentsGrid.DataSource =
|
||||
dataSet.Tables["Departments"].DefaultView;
|
||||
|
||||
|
||||
departmentsGrid.DataBind();
|
||||
}
|
||||
|
||||
protected void departmentsGrid_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
// Retrieve the new page index
|
||||
int newPageIndex = e.NewPageIndex;
|
||||
// Set the new page index of the GridView
|
||||
departmentsGrid.PageIndex = newPageIndex;
|
||||
// Bind the grid to its data source again to update its
|
||||
// contents
|
||||
BindGrid();
|
||||
|
||||
}
|
||||
|
||||
protected void departmentsGrid_Sorting(object sender, GridViewSortEventArgs e)
|
||||
{
|
||||
// Retrieve the name of the clicked column (sort expression)
|
||||
string sortExpression = e.SortExpression;
|
||||
// Decide and save the new sort direction
|
||||
if (sortExpression == gridSortExpression)
|
||||
{
|
||||
if (gridSortDirection == SortDirection.Ascending)
|
||||
{
|
||||
gridSortDirection = SortDirection.Descending;
|
||||
}
|
||||
else
|
||||
{
|
||||
gridSortDirection = SortDirection.Ascending;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gridSortDirection = SortDirection.Ascending;
|
||||
}
|
||||
// Save the new sort expression
|
||||
gridSortExpression = sortExpression;
|
||||
// Rebind the grid to its data source
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
private SortDirection gridSortDirection
|
||||
{
|
||||
get
|
||||
{
|
||||
// Initial state is Ascending
|
||||
if (ViewState["GridSortDirection"] == null)
|
||||
{
|
||||
ViewState["GridSortDirection"] = SortDirection.Ascending;
|
||||
}
|
||||
// Return the state
|
||||
return (SortDirection)ViewState["GridSortDirection"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["GridSortDirection"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string gridSortExpression
|
||||
{
|
||||
get
|
||||
{
|
||||
// Initial sort expression is DepartmentId
|
||||
if (ViewState["GridSortExpression"] == null)
|
||||
{
|
||||
ViewState["GridSortExpression"] = "DepartmentId";
|
||||
}
|
||||
// Return the sort expression
|
||||
return (string)ViewState["GridSortExpression"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["GridSortExpression"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class Departments {
|
||||
|
||||
/// <summary>
|
||||
/// departmentsGrid control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView departmentsGrid;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Employee Directory Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Page Language="C#" MasterPageFile="~/GlacierPoint.Master" AutoEventWireup="true"
|
||||
CodeBehind="EmployeeDirectory.aspx.cs" Inherits="GlacierPoint.EmployeeDirectory"
|
||||
Title="GlacierPoint Employee Directory" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<h1>
|
||||
Employee Directory</h1>
|
||||
<asp:DataList ID="employeesList" runat="server"
|
||||
OnItemCommand="employeesList_ItemCommand" CellPadding="4" ForeColor="#333333">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="extraDetailsLiteral" runat="server" EnableViewState="false" />
|
||||
Name: <strong>
|
||||
<%#Eval("Name")%></strong><br />
|
||||
Username: <strong>
|
||||
<%#Eval("Username")%></strong><br />
|
||||
<asp:LinkButton ID="detailsButton" runat="server" Text='<%#"View more details about " + Eval("Name")%>'
|
||||
CommandName="MoreDetailsPlease" CommandArgument='<%#Eval("EmployeeId")%>' /><br />
|
||||
<asp:LinkButton ID="editButton" runat="server" Text='<%#"Edit employee " + Eval("Name")%>'
|
||||
CommandName="EditItem" CommandArgument='<%#Eval("EmployeeId")%>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
Name:
|
||||
<asp:TextBox ID="nameTextBox" runat="server" Text='<%#Eval("Name")%>' /><br />
|
||||
Username:
|
||||
<asp:TextBox ID="usernameTextBox" runat="server" Text='<%#Eval("Username")%>' /><br />
|
||||
<asp:LinkButton ID="updateButton" runat="server" Text="Update Item" CommandName="UpdateItem"
|
||||
CommandArgument='<%#Eval("EmployeeId")%>' />
|
||||
or
|
||||
<asp:LinkButton ID="cancelButton" runat="server" Text="Cancel Editing" CommandName="CancelEditing"
|
||||
CommandArgument='<%#Eval("EmployeeId")%>' />
|
||||
</EditItemTemplate>
|
||||
<SeparatorTemplate>
|
||||
<hr />
|
||||
</SeparatorTemplate>
|
||||
<EditItemStyle BackColor="#95DFD6" BorderColor="Yellow" BorderStyle="Dashed" BorderWidth="2px" />
|
||||
<AlternatingItemStyle BackColor="White" />
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<ItemStyle BackColor="#EFF3FB" />
|
||||
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<SeparatorStyle BackColor="White" />
|
||||
</asp:DataList><br />
|
||||
<br />
|
||||
<br />
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Employee Directory Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
public partial class EmployeeDirectory : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindList();
|
||||
}
|
||||
}
|
||||
|
||||
protected void BindList()
|
||||
{
|
||||
// Define data objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
SqlDataReader reader;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command
|
||||
comm = new SqlCommand("SELECT EmployeeId, Name, Username FROM gp_Employee", conn);
|
||||
|
||||
// Enclose database code in Try-Catch-Finally
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
reader = comm.ExecuteReader();
|
||||
|
||||
// Bind the reader to the repeater
|
||||
employeesList.DataSource = reader;
|
||||
employeesList.DataBind();
|
||||
|
||||
// Close the reader
|
||||
reader.Close();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void employeesList_ItemCommand(object source, DataListCommandEventArgs e)
|
||||
{
|
||||
// Which button was clicked?
|
||||
if (e.CommandName == "MoreDetailsPlease")
|
||||
{
|
||||
// Find the Literal control in the DataList item
|
||||
Literal li = (Literal)e.Item.FindControl("extraDetailsLiteral");
|
||||
|
||||
// Add content to the Literal control
|
||||
li.Text = "Employee Id: <strong>" + e.CommandArgument + "</strong><br />";
|
||||
}
|
||||
else if (e.CommandName == "EditItem")
|
||||
{
|
||||
// Set the index of the item being edited
|
||||
employeesList.EditItemIndex = e.Item.ItemIndex;
|
||||
|
||||
// Bind again the list to update the list
|
||||
BindList();
|
||||
}
|
||||
else if (e.CommandName == "CancelEditing")
|
||||
{
|
||||
// Cancel edit mode
|
||||
employeesList.EditItemIndex = -1;
|
||||
|
||||
// Refresh the DataList
|
||||
BindList();
|
||||
}
|
||||
else if (e.CommandName == "UpdateItem")
|
||||
{
|
||||
// Get the employee ID
|
||||
int employeeId = Convert.ToInt32(e.CommandArgument);
|
||||
|
||||
// Get the new username
|
||||
TextBox nameTextBox = (TextBox)e.Item.FindControl("nameTextBox");
|
||||
string newName = nameTextBox.Text;
|
||||
|
||||
// Get the new name
|
||||
TextBox usernameTextBox = (TextBox)e.Item.FindControl("usernameTextBox");
|
||||
string newUsername = usernameTextBox.Text;
|
||||
|
||||
// Update the item
|
||||
UpdateItem(employeeId, newName, newUsername);
|
||||
|
||||
// Cancel edit mode
|
||||
employeesList.EditItemIndex = -1;
|
||||
|
||||
// Refresh the DataList
|
||||
BindList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void UpdateItem(int employeeId, string newName, string newUsername)
|
||||
{
|
||||
// Declare data objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command
|
||||
comm = new SqlCommand("sp_UpdateEmployee", conn);
|
||||
|
||||
// Specify we're calling a stored procedure
|
||||
comm.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
|
||||
// Add command parameters
|
||||
comm.Parameters.Add("@EmployeeId", SqlDbType.Int);
|
||||
comm.Parameters["@EmployeeId"].Value = employeeId;
|
||||
comm.Parameters.Add("@NewName", SqlDbType.VarChar, 50);
|
||||
comm.Parameters["@NewName"].Value = newName;
|
||||
comm.Parameters.Add("@NewUsername", SqlDbType.VarChar, 50);
|
||||
comm.Parameters["@NewUsername"].Value = newUsername;
|
||||
|
||||
// Enclose database code in Try-Catch-Finally
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
comm.ExecuteNonQuery();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class EmployeeDirectory {
|
||||
|
||||
/// <summary>
|
||||
/// employeesList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DataList employeesList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Default Template
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GlacierPoint.master.cs" Inherits="GlacierPoint.GlacierPoint" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head runat="server">
|
||||
<title>GlacierPoint.com</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<!-- Header -->
|
||||
<div class="Header">
|
||||
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/GlacierPoint.jpg" Width="339"
|
||||
Height="90" AlternateText="The GlacierPoint Company Intranet" />
|
||||
<h1>
|
||||
GlacierPoint.com</h1>
|
||||
</div>
|
||||
<!-- Menu -->
|
||||
<div class="Menu">
|
||||
<asp:SiteMapDataSource ID="glacierPointSiteMap" runat="server" ShowStartingNode="false" />
|
||||
<asp:Menu ID="glacierPointMenu" runat="server"
|
||||
DataSourceID="glacierPointSiteMap" BackColor="#F7F6F3"
|
||||
DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="1em"
|
||||
ForeColor="#7C6F57" StaticSubMenuIndent="10px">
|
||||
<DynamicHoverStyle BackColor="#7C6F57" ForeColor="White" />
|
||||
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
|
||||
<DynamicMenuStyle BackColor="#F7F6F3" />
|
||||
<DynamicSelectedStyle BackColor="#5D7B9D" />
|
||||
<StaticHoverStyle BackColor="#5AACEF" ForeColor="White" />
|
||||
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
|
||||
<StaticSelectedStyle BackColor="#5D7B9D" />
|
||||
<StaticItemTemplate>
|
||||
<img src="Images/<%# Eval("Text")%>.png" alt="+" width="16" height="16" style="border-width: 0;" />
|
||||
<%# Eval("Text")%>
|
||||
</StaticItemTemplate>
|
||||
</asp:Menu>
|
||||
</div>
|
||||
<!-- Content -->
|
||||
<div class="Content">
|
||||
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Default Template
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
public partial class GlacierPoint : System.Web.UI.MasterPage
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class GlacierPoint {
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image Image1;
|
||||
|
||||
/// <summary>
|
||||
/// glacierPointSiteMap control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.SiteMapDataSource glacierPointSiteMap;
|
||||
|
||||
/// <summary>
|
||||
/// glacierPointMenu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Menu glacierPointMenu;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPlaceHolder1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{4AD2D4A4-060F-4478-96C2-BB83F883B58A}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GlacierPoint</RootNamespace>
|
||||
<AssemblyName>GlacierPoint</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web.Mobile" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AddressBook.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>AddressBook.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AddressBook.aspx.designer.cs">
|
||||
<DependentUpon>AddressBook.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AdminTools.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>AdminTools.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AdminTools.aspx.designer.cs">
|
||||
<DependentUpon>AdminTools.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Departments.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>Departments.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Departments.aspx.designer.cs">
|
||||
<DependentUpon>Departments.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EmployeeDirectory.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>EmployeeDirectory.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EmployeeDirectory.aspx.designer.cs">
|
||||
<DependentUpon>EmployeeDirectory.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GlacierPoint.Master.cs">
|
||||
<DependentUpon>GlacierPoint.Master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GlacierPoint.Master.designer.cs">
|
||||
<DependentUpon>GlacierPoint.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HelpDesk.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>HelpDesk.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HelpDesk.aspx.designer.cs">
|
||||
<DependentUpon>HelpDesk.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="App_Themes\Blue\GlacierPoint.css" />
|
||||
<Content Include="Web.sitemap" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="App_Themes\Blue\SkinFile.skin" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AddressBook.aspx" />
|
||||
<Content Include="AdminTools.aspx" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="Departments.aspx" />
|
||||
<Content Include="EmployeeDirectory.aspx" />
|
||||
<Content Include="GlacierPoint.Master" />
|
||||
<Content Include="HelpDesk.aspx" />
|
||||
<Content Include="Images\Book_Closed.gif" />
|
||||
<Content Include="Images\GlacierPoint.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>1082</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
@@ -0,0 +1,46 @@
|
||||
<%--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Help Desk Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
--%>
|
||||
<%@ Page Language="C#" MasterPageFile="~/GlacierPoint.Master" AutoEventWireup="true"
|
||||
CodeBehind="HelpDesk.aspx.cs" Inherits="GlacierPoint.HelpDesk" Title="Helpdesk Page" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<h1>
|
||||
Employee Help Desk Request</h1>
|
||||
<asp:Label ID="dbErrorMessage" ForeColor="Red" runat="server" />
|
||||
<p>
|
||||
Station Number:<br />
|
||||
<asp:TextBox ID="stationTextBox" runat="server" CssClass="textbox" />
|
||||
<asp:RequiredFieldValidator ID="stationNumReq" runat="server" ControlToValidate="stationTextBox"
|
||||
ErrorMessage="<br />Please enter a station number" Display="Dynamic" />
|
||||
<asp:CompareValidator ID="stationNumCheck" runat="server" ControlToValidate="stationTextBox"
|
||||
Operator="DataTypeCheck" Type="Integer" ErrorMessage="<br />Please enter a valid station number."
|
||||
Display="Dynamic" />
|
||||
<asp:RangeValidator ID="stationNumRangeCheck" runat="server" ControlToValidate="stationTextBox"
|
||||
MinimumValue="1" MaximumValue="50" Type="Integer" ErrorMessage="<br />Your station number must be between 1 and 50"
|
||||
Display="Dynamic" />
|
||||
</p>
|
||||
<p>
|
||||
Problem Category:<br />
|
||||
<asp:DropDownList ID="categoryList" runat="server" CssClass="dropdownmenu" />
|
||||
</p>
|
||||
<p>
|
||||
Problem Subject:<br />
|
||||
<asp:DropDownList ID="subjectList" runat="server" CssClass="dropdownmenu" />
|
||||
</p>
|
||||
<p>
|
||||
Problem Description:<br />
|
||||
<asp:TextBox ID="descriptionTextBox" runat="server" CssClass="textbox" Columns="40"
|
||||
Rows="4" TextMode="MultiLine" />
|
||||
<asp:RequiredFieldValidator ID="descriptionReq" runat="server" ControlToValidate="descriptionTextBox"
|
||||
ErrorMessage="<br />Please enter a description" Display="Dynamic" />
|
||||
</p>
|
||||
<p>
|
||||
<asp:Button ID="submitButton" runat="server" CssClass="button" Text="Submit Request"
|
||||
OnClick="submitButton_Click" />
|
||||
</p>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace GlacierPoint
|
||||
{
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Help Desk Page
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
public partial class HelpDesk : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// Declare objects
|
||||
SqlConnection conn;
|
||||
SqlCommand categoryComm;
|
||||
SqlCommand subjectComm;
|
||||
SqlDataReader reader;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create command to read the help desk categories
|
||||
categoryComm = new SqlCommand("SELECT CategoryId, Category FROM gp_HelpDeskCategory", conn);
|
||||
|
||||
// Create command to read the help desk subjects
|
||||
subjectComm = new SqlCommand("SELECT SubjectId, Subject FROM gp_HelpDeskSubject", conn);
|
||||
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the category command
|
||||
reader = categoryComm.ExecuteReader();
|
||||
|
||||
// Populate the list of categories
|
||||
categoryList.DataSource = reader;
|
||||
categoryList.DataValueField = "CategoryId";
|
||||
categoryList.DataTextField = "Category";
|
||||
categoryList.DataBind();
|
||||
|
||||
// Close the reader
|
||||
reader.Close();
|
||||
|
||||
// Execute the subject command
|
||||
reader = subjectComm.ExecuteReader();
|
||||
|
||||
// Populate the list of subjects
|
||||
subjectList.DataSource = reader;
|
||||
subjectList.DataValueField = "SubjectId";
|
||||
subjectList.DataTextField = "Subject";
|
||||
subjectList.DataBind();
|
||||
|
||||
// Close the reader
|
||||
reader.Close();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void submitButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Page.IsValid)
|
||||
{
|
||||
// Define data objects
|
||||
SqlConnection conn;
|
||||
SqlCommand comm;
|
||||
|
||||
// Read the connection string from Web.config
|
||||
string connectionString = ConfigurationManager.ConnectionStrings["GlacierPoint"].ConnectionString;
|
||||
|
||||
// Initialize connection
|
||||
conn = new SqlConnection(connectionString);
|
||||
|
||||
// Create insert command
|
||||
comm = new SqlCommand("sp_InsertHelpDesk", conn);
|
||||
comm.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
|
||||
// Add command parameters
|
||||
comm.Parameters.Add("@EmployeeId", System.Data.SqlDbType.Int);
|
||||
comm.Parameters["@EmployeeId"].Value = 5;
|
||||
|
||||
comm.Parameters.Add("@StationNumber", System.Data.SqlDbType.Int);
|
||||
comm.Parameters["@StationNumber"].Value = stationTextBox.Text;
|
||||
|
||||
comm.Parameters.Add("@CategoryId", System.Data.SqlDbType.Int);
|
||||
comm.Parameters["@CategoryId"].Value = categoryList.SelectedItem.Value;
|
||||
|
||||
comm.Parameters.Add("@SubjectId", System.Data.SqlDbType.Int);
|
||||
comm.Parameters["@SubjectId"].Value = subjectList.SelectedItem.Value;
|
||||
|
||||
comm.Parameters.Add("@Description", System.Data.SqlDbType.NVarChar, 50);
|
||||
comm.Parameters["@Description"].Value = descriptionTextBox.Text;
|
||||
|
||||
comm.Parameters.Add("@StatusId", System.Data.SqlDbType.Int);
|
||||
comm.Parameters["@StatusId"].Value = 1;
|
||||
|
||||
// Enclose database code in Try-Catch-Finally
|
||||
try
|
||||
{
|
||||
// Open the connection
|
||||
conn.Open();
|
||||
|
||||
// Execute the command
|
||||
comm.ExecuteNonQuery();
|
||||
|
||||
// Reload page if the query executed successfully
|
||||
Response.Redirect("HelpDesk.aspx");
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
// Display error message
|
||||
dbErrorMessage.Text = "Error submitting help desk request! Please try again later, and/or change the entered data!";
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close the connection
|
||||
conn.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint {
|
||||
|
||||
|
||||
public partial class HelpDesk {
|
||||
|
||||
/// <summary>
|
||||
/// dbErrorMessage control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label dbErrorMessage;
|
||||
|
||||
/// <summary>
|
||||
/// stationTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox stationTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// stationNumReq control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator stationNumReq;
|
||||
|
||||
/// <summary>
|
||||
/// stationNumCheck control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CompareValidator stationNumCheck;
|
||||
|
||||
/// <summary>
|
||||
/// stationNumRangeCheck control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RangeValidator stationNumRangeCheck;
|
||||
|
||||
/// <summary>
|
||||
/// categoryList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList categoryList;
|
||||
|
||||
/// <summary>
|
||||
/// subjectList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList subjectList;
|
||||
|
||||
/// <summary>
|
||||
/// descriptionTextBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox descriptionTextBox;
|
||||
|
||||
/// <summary>
|
||||
/// descriptionReq control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator descriptionReq;
|
||||
|
||||
/// <summary>
|
||||
/// submitButton control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button submitButton;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 770 B |
|
After Width: | Height: | Size: 512 B |
|
After Width: | Height: | Size: 136 B |
|
After Width: | Height: | Size: 753 B |
|
After Width: | Height: | Size: 741 B |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 786 B |
|
After Width: | Height: | Size: 806 B |
|
After Width: | Height: | Size: 593 B |
@@ -0,0 +1,42 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Assembly Info
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GlacierPoint")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Coleman University")]
|
||||
[assembly: AssemblyProduct("GlacierPoint")]
|
||||
[assembly: AssemblyCopyright("Copyright © Coleman University 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("7c115c63-7be5-4a36-8f63-527292d2e283")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1022
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GlacierPoint.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1022
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GlacierPoint.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Website Configuration
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
|
||||
<appSettings/>
|
||||
<connectionStrings>
|
||||
<add name="GlacierPoint"
|
||||
connectionString="Data Source=172.16.2.34;
|
||||
User Id=db77260; Password=daeddb98;
|
||||
Initial Catalog=db77260"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<compilation debug="true" />
|
||||
<!--
|
||||
The <authentication> section enables configuration
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Windows" />
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
|
||||
<error statusCode="403" redirect="NoAccess.htm" />
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
<pages theme ="Blue" />
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
/*********************************************************************
|
||||
* Glacier Point Project - Website Sitemap
|
||||
* Date: 6/10/2014
|
||||
* By: Amrit Panesar - 77260
|
||||
*********************************************************************/
|
||||
-->
|
||||
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
|
||||
<siteMapNode url="~/" title="Root" description="Root">
|
||||
<siteMapNode url="~/Default.aspx" title="Home" description="GlacierPoint Home" />
|
||||
<siteMapNode url="~/HelpDesk.aspx" title="Help Desk" description="GlacierPoint Help Desk" />
|
||||
<siteMapNode url="~/EmployeeDirectory.aspx" title="Employee Directory" description="GlacierPoint Employee Directory" />
|
||||
<siteMapNode url="~/AddressBook.aspx" title="Address Book" description="GlacierPoint Address Book" />
|
||||
<siteMapNode url="~/Departments.aspx" title="Departments" description="GlacierPoint Departments" />
|
||||
<siteMapNode url="~/AdminTools.aspx" title="Admin Tools" description="Admin Tools" />
|
||||
</siteMapNode>
|
||||
</siteMap>
|
||||