-
Notifications
You must be signed in to change notification settings - Fork 1
/
Degreeissuance.aspx.cs
92 lines (62 loc) · 2.3 KB
/
Degreeissuance.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
92
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 Degreeissuance : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-A1B8R5V\\SQLEXPRESS;Initial Catalog=project;Integrated Security=True");
con.Open();
SqlCommand cm;
string fname = fnamee.Text, lname = lnamee.Text, major = majorr.Text;
string addr = address.Text, rollno=roll.Text, cnic=cnicc.Text, cgpa=gpa.Text, grad= DropDownList1.Text;
DateTime date= DateTime.Today;
DateTime timesubmitted = DateTime.Now;
string issuefee = "1";
String query = "Insert into DEGREE_ISSUANCE values ( '"+fname+"','"+lname+ "','" + addr + "','" + rollno+"','"+cnic+"','"+grad+"','"+major+"','"+cgpa+"','"+date+ "','" + timesubmitted + "','" + issuefee + "')";
cm= new SqlCommand(query, con);
cm.ExecuteNonQuery();
cm.Dispose();
SqlCommand cmd;
string query2 = "Insert into PERMISSION (roll,status) VALUES (@id,'Sent to FYP Committee')";
cmd = new SqlCommand(query2, con);
cmd.Parameters.AddWithValue("@id", roll.Text);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("Submittedconfirmation.aspx");
}
protected void fname_TextChanged(object sender, EventArgs e)
{
}
protected void lname_TextChanged(object sender, EventArgs e)
{
}
protected void rollno_TextChanged(object sender, EventArgs e)
{
}
protected void cnic_TextChanged(object sender, EventArgs e)
{
}
protected void address_TextChanged(object sender, EventArgs e)
{
}
protected void major_TextChanged(object sender, EventArgs e)
{
}
protected void cgpa_TextChanged(object sender, EventArgs e)
{
}
}