-
Notifications
You must be signed in to change notification settings - Fork 0
/
Yourlist.aspx.cs
42 lines (37 loc) · 1.07 KB
/
Yourlist.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
using System;
using System.Web.UI;
public partial class Yourlist : System.Web.UI.Page
{
//
addlist bl = new addlist();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
loaddata();
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
// objbll.NAME = txtaddress.Text;
}
public void loaddata()
{
gvListView.DataSource = bl.Getadlist();
gvListView.DataBind();
}
protected void btnDelete_Command(object sender, System.Web.UI.WebControls.CommandEventArgs e)
{
try
{
bl.SYS_ID = e.CommandArgument.ToString();
bl.Delete();
ScriptManager.RegisterStartupScript(this, typeof(Page),"", " toastr.warning('Record Deleted Successfully');", true);
loaddata();
}
catch (Exception ex)
{
ScriptManager.RegisterStartupScript(this, typeof(Page), "", " toastr.error('Record Deleted Failed ==>'"+ex.Message+");", true);
}
}
}