-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathViewEmployee.aspx.cs
More file actions
40 lines (39 loc) · 1.66 KB
/
ViewEmployee.aspx.cs
File metadata and controls
40 lines (39 loc) · 1.66 KB
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
using BLL.BOperations;
using DAL.Entities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class ViewEmployee : System.Web.UI.Page
{
EEmployee emp = new EEmployee();
EOperation empHandler = new EOperation();
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["E_ID"] != null)
{
int id = int.Parse(Request.QueryString["E_ID"]);
DataSet ds = empHandler.GetEmployeeByID(id);
if (ds.Tables[0].Rows.Count > 0)
{
EID.Text = ds.Tables[0].Rows[0]["E_ID"].ToString();
EFname.Text = ds.Tables[0].Rows[0]["E_Fname"].ToString();
ELname.Text = ds.Tables[0].Rows[0]["E_Lname"].ToString();
EEmail.Text = ds.Tables[0].Rows[0]["E_Email"].ToString();
EPass.Text = ds.Tables[0].Rows[0]["E_Pass"].ToString();
EDOB.Text = ds.Tables[0].Rows[0]["E_DOB"].ToString();
ETel.Text = ds.Tables[0].Rows[0]["E_TelNo"].ToString();
EMoblie.Text = ds.Tables[0].Rows[0]["E_MobileNo"].ToString();
EDOJ.Text = ds.Tables[0].Rows[0]["E_DOJ"].ToString();
EStatus.Text = ds.Tables[0].Rows[0]["E_Status"].ToString();
EGender.Text = ds.Tables[0].Rows[0]["E_Gender"].ToString();
int Rid = int.Parse(ds.Tables[0].Rows[0]["E_RoleID"].ToString());
ERole.Text = empHandler.GetEmployeeRoleName(Rid);
Esalary.Text = ds.Tables[0].Rows[0]["E_Salary"].ToString();
}
}
}
}