-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrmUserProfile.aspx.cs
96 lines (76 loc) · 3.15 KB
/
frmUserProfile.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
93
94
95
96
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IEF_Visualization.cls;
namespace IEF_Visualization
{
public partial class frmUserProfile : System.Web.UI.Page
{
clsDataHandling objDataHandling = new clsDataHandling();
protected void Page_Load(object sender, EventArgs e)
{
string user_name = Session["USER_NAME"] as string;
//user_name = "stefan21";
objDataHandling.user_name = user_name;
if (user_name == null || user_name == "")
{
Response.Redirect("frmHome.aspx", false);
}
else
{
lblUser.Text = Session["USER_FULL_NAME"] as string;
//lbl_hi_user.Text = user_name;
}
objDataHandling.showData(grdSankeyHistory);
}
protected void grdSankeyHistory_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "view")
{
LinkButton lnkView = (LinkButton)e.CommandSource;
string job_id = lnkView.CommandArgument;
//Response.Redirect("frmCircularSankeyLP.aspx?job_id=" + job_id + "&&ID=" + job_id);
Response.Redirect("frmCircularSankey.aspx?job_id=" + job_id);
}
if (e.CommandName == "Delete")
{
LinkButton lnkView = (LinkButton)e.CommandSource;
string job_id = lnkView.CommandArgument;
objDataHandling.DeleteData(job_id);
objDataHandling.showData(grdSankeyHistory);
string script = "alert('" + "Data has been deleted successfully" + "');";
ScriptManager.RegisterStartupScript(this, typeof(Page), "UserSecurity", script, true);
}
}
protected void grdSankeyHistory_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
//GridViewRow row = grdSankeyHistory.Rows[e.RowIndex];
//string id = Convert.ToString(row.Cells[0].Text);
//objDataHandling.DeleteData(id);
//objDataHandling.showData(grdSankeyHistory);
//string script = "alert('" + "Data has been deleted successfully" + "');";
//ScriptManager.RegisterStartupScript(this, typeof(Page), "UserSecurity", script, true);
}
protected void grdSankeyHistory_RowDataBound(object sender, GridViewRowEventArgs e)
{
//if (e.Row.RowType == DataControlRowType.DataRow)
//{
// foreach (Button button in e.Row.Cells[8].Controls.OfType<Button>())
// {
// if (button.CommandName == "Delete")
// {
// button.Attributes["onclick"] = "if(!confirm('Do you want to delete')){return false;};";
// }
// }
//}
}
protected void btnLoggOut_Click(object sender, EventArgs e)
{
Session.RemoveAll();
Response.Redirect("frmHome.aspx", false);
}
}
}