-
Notifications
You must be signed in to change notification settings - Fork 0
/
Administrator.aspx.cs
58 lines (51 loc) · 1.69 KB
/
Administrator.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Dominio;
using Negocio;
namespace TPC_Juarez
{
public partial class Administrator : System.Web.UI.Page
{
public List<Produ> listaProdus { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Usuario user = new Usuario();
user = (Usuario)Session["userSession"];
ProduNegocio negocio = new ProduNegocio();
listaProdus = negocio.listar();
if(Request.QueryString["Cerrar Sesion"]!=null)
{
Session["userSession"] = null;
Response.Redirect("Default.aspx");
}
}
}
protected void dgvProductos_RowCommand(object sender, GridViewCommandEventArgs e)
{
}
protected void dgvProductos_SelectedIndexChanged(object sender, EventArgs e)
{
// int index = Convert.ToInt32(e.CommandArgument);
// string idPoke = dgvProductos.Rows[index].Cells[1].Text;
}
protected void btnSalir_Click(object sender, EventArgs e)
{
//if (Session[userSession] != null)
//{
// Session[userSession] = null;
//}
//Response.Redirect("Default.aspx");
}
protected void salirAdmin_Click(object sender, EventArgs e)
{
Session["userSession"] = null;
Response.Redirect("Default.aspx");
}
}
}