-
Notifications
You must be signed in to change notification settings - Fork 8
/
StudentFeeDetails.aspx.cs
80 lines (61 loc) · 2.35 KB
/
StudentFeeDetails.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
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;
public partial class fee_details_for_student : System.Web.UI.Page
{
SqlConnection conn;
//SqlCommand cmd;
SqlDataAdapter da;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
lblErr.Text = "";
if (!IsPostBack)
{
//string rollNumber = string.Empty;
//if (Session["roleNo"] != null)
//{
// rollNumber = Session["roleNo"].ToString();
//if (Session["roleNo"] == null)
//{
// if (Session["UserID"] != null)
//{
//rollNumber = Session["UserName"].ToString();
//}
conn = new SqlConnection();
ds = new DataSet();
conn.ConnectionString = ConfigurationSettings.AppSettings["conn"].ToString();
da = new SqlDataAdapter("select firstName,rollno,admissionfeedue,busfeedue,libraryfeedue,tutionfeedue from studentdetails where userid= '" + Session["UserID"] + "'", conn);
ds = new DataSet();
da.Fill(ds);
if (ds.Tables.Count > 0)
{
if (ds.Tables[0].Rows.Count > 0)
{
TextBox1.Text = ds.Tables[0].Rows[0][0].ToString();
TextBox2.Text = ds.Tables[0].Rows[0][1].ToString();
TextBox3.Text = ds.Tables[0].Rows[0][2].ToString();
TextBox4.Text = ds.Tables[0].Rows[0][3].ToString();
TextBox5.Text = ds.Tables[0].Rows[0][4].ToString();
TextBox6.Text = ds.Tables[0].Rows[0][5].ToString();
}
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("studentHomePage.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("studentHomePage.aspx");
}
}