forked from robi-y/seproject-team-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindividual.aspx.cs
More file actions
executable file
·59 lines (37 loc) · 1.47 KB
/
Copy pathindividual.aspx.cs
File metadata and controls
executable file
·59 lines (37 loc) · 1.47 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace JumpUp
{
public partial class individual : System.Web.UI.Page
{
dal da = new dal();
protected void Page_Load(object sender, EventArgs e)
{
///put the first name of the user in the label
Label1.Text = da.get_client_name_according_to_user_name((string)Session["userName"]);
if (!IsPostBack)
{
GridView1.DataSource = da.getDetailsForUser((string)Session["userName"]);
GridView1.DataBind();
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
//string autid = GridView1.DataKeys[e.RowIndex].Value.ToString();
if (this.GridView1.Rows.Count > 0)
{
GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
string dt1 = GridView1.Rows[e.RowIndex].Cells[2].Text;
int room = Convert.ToInt16( GridView1.Rows[e.RowIndex].Cells[3].Text);
string user = (string)Session["userName"];
da.delete_lesson(user, dt1, room);
GridView1.DataSource = da.getDetailsForUser(user);
GridView1.DataBind();
}
}
}
}