-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathViewStudent.aspx.cs
45 lines (44 loc) · 1.98 KB
/
ViewStudent.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using MySql.Data.MySqlClient;
using BLL.BOperations;
using DAL.Entities;
public partial class ViewStudent : System.Web.UI.Page
{
EStudents std = new EStudents();
SOperation stdHandler = new SOperation();
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["Std_Id"] != null)
{
int id = int.Parse(Request.QueryString["Std_Id"]);
DataSet ds = stdHandler.GetStudentByID(id);
if (ds.Tables[0].Rows.Count > 0)
{
SID.Text = ds.Tables[0].Rows[0]["Std_Id"].ToString();
SFname.Text = ds.Tables[0].Rows[0]["Std_Fname"].ToString();
SLname.Text = ds.Tables[0].Rows[0]["Std_Lname"].ToString();
SEmail.Text = ds.Tables[0].Rows[0]["Std_Email"].ToString();
SPass.Text = ds.Tables[0].Rows[0]["Std_Pass"].ToString();
SDOB.Text = ds.Tables[0].Rows[0]["Std_DOB"].ToString();
STel.Text = ds.Tables[0].Rows[0]["Std_TelNo"].ToString();
SMoblie.Text = ds.Tables[0].Rows[0]["Std_MobileNo"].ToString();
SDOA.Text = ds.Tables[0].Rows[0]["Std_DOA"].ToString();
SStatus.Text = ds.Tables[0].Rows[0]["Std_Status"].ToString();
SGender.Text = ds.Tables[0].Rows[0]["Std_Gender"].ToString();
int cid = int.Parse(ds.Tables[0].Rows[0]["Std_ClassID"].ToString());
SClass.Text = stdHandler.GetStudentClassName(cid);
int Sid = int.Parse(ds.Tables[0].Rows[0]["Std_SectionID"].ToString());
SClassSec.Text = stdHandler.GetStudentSecName(Sid);
int gid =int.Parse(ds.Tables[0].Rows[0]["Std_GuardianID"].ToString());
SParentID.Text = stdHandler.GetStudentGrdName(gid);
}
}
}
}