-
Notifications
You must be signed in to change notification settings - Fork 0
/
SubmittedQuotes.aspx.cs
48 lines (41 loc) · 1.28 KB
/
SubmittedQuotes.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using System.Data.Common;
using System.Data;
using ADB.Data;
using System.Web.Security;
public partial class Quote_SubmittedQuotes : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblUserName.Text = Common.GetUserName();
}
BindGrid();
}
private void BindGrid()
{
SqlDatabase database = new SqlDatabase(DataRepository.ConnectionStrings["ADB.Data.ConnectionString"].ConnectionString);
DbCommand command = database.GetStoredProcCommand("GetQuoteRequests");
database.AddInParameter(command, "@UserID", DbType.Int32, Common.GetUserID());
DataSet dataset = ADB.Data.Utility.ExecuteDataSet(database, command);
GVQuotes.DataSource = dataset;
GVQuotes.DataBind();
}
protected void GVCandidates_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GVQuotes.PageIndex = e.NewPageIndex;
BindGrid();
}
protected void lnkSignOut_Click(object sender, EventArgs e)
{
Session.Clear();
FormsAuthentication.SignOut();
Response.Redirect("~/Login");
}
}