forked from nooraintahir/Degree-Issuance-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Requests.aspx.cs
91 lines (65 loc) · 3.03 KB
/
Requests.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class Requests : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button6_Click(object sender, EventArgs e)
{
Response.Redirect("OnestopUI.aspx");
}
protected void Pend_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-A1B8R5V\\SQLEXPRESS;Initial Catalog=project;Integrated Security=True");
SqlCommand SqlCommand;
SqlDataReader reader;
SqlDataAdapter adapter = new SqlDataAdapter();
con.Open();
string query = "SELECT fname,lname,rollno,cnic,cgpa,Fypaccept,Financeaccept,processed FROM (DEGREE_ISSUANCE INNER JOIN STUDENT ON rollno=Roll_no) INNER JOIN PERMISSION ON Roll_no=roll WHERE Fypaccept LIKE 1 AND Financeaccept LIKE 1 AND processed LIKE 0";
SqlCommand = new SqlCommand(query, con);
adapter.SelectCommand = new SqlCommand(query, con);
reader = SqlCommand.ExecuteReader();
GridView1.DataSource = reader;
GridView1.DataBind();
con.Close();
}
protected void Proc_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-A1B8R5V\\SQLEXPRESS;Initial Catalog=project;Integrated Security=True");
SqlCommand SqlCommand;
SqlDataReader reader;
SqlDataAdapter adapter = new SqlDataAdapter();
con.Open();
string query = "SELECT fname,lname,rollno,cnic,cgpa,Fypaccept,Financeaccept,processed FROM (DEGREE_ISSUANCE INNER JOIN STUDENT ON rollno=Roll_no) INNER JOIN PERMISSION ON Roll_no=roll WHERE processed LIKE 1";
SqlCommand = new SqlCommand(query, con);
adapter.SelectCommand = new SqlCommand(query, con);
reader = SqlCommand.ExecuteReader();
GridView1.DataSource = reader;
GridView1.DataBind();
con.Close();
}
protected void New_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-A1B8R5V\\SQLEXPRESS;Initial Catalog=project;Integrated Security=True");
SqlCommand SqlCommand;
SqlDataReader reader;
SqlDataAdapter adapter = new SqlDataAdapter();
con.Open();
string query = "SELECT fname,lname,rollno,cnic,cgpa,Fypaccept,Financeaccept,processed FROM (DEGREE_ISSUANCE INNER JOIN STUDENT ON rollno=Roll_no) INNER JOIN PERMISSION ON Roll_no=roll WHERE Fypaccept LIKE 0 OR Financeaccept LIKE 0";
SqlCommand = new SqlCommand(query, con);
adapter.SelectCommand = new SqlCommand(query, con);
reader = SqlCommand.ExecuteReader();
GridView1.DataSource = reader;
GridView1.DataBind();
con.Close();
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}