Skip to content

Commit ca9e9be

Browse files
committed
registrar tematica
1 parent 66b263f commit ca9e9be

20 files changed

+302
-1
lines changed

swtransito/.vs/swtransito/v14/.suo

-12 KB
Binary file not shown.

swtransito/swtransito/Controllers/ModuloController.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ public DataTable Traer_modulos()
3737
return mod.consultar_modulos();
3838
}
3939

40+
public DataTable Traer_modulos_admin()
41+
{
42+
return mod.consultar_modulos_admin();
43+
}
44+
45+
public string Traer_nombre_monulo(string id_modulo)
46+
{
47+
return mod.traer_nombre_modulo(id_modulo);
48+
}
49+
4050

4151

4252
}

swtransito/swtransito/Models/Modulo.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,29 @@ public DataTable consultar_modulos()
5050
}
5151

5252

53+
public DataTable consultar_modulos_admin()
54+
{
55+
string sql = @" select Nombre,Numero,idModulo from modulo where modulo.estado='A' ; ";
56+
57+
return conn.EjecutarConsulta(sql, CommandType.Text);
58+
59+
}
60+
61+
5362

5463

5564

65+
public string traer_nombre_modulo(string idmodulo)
66+
{
67+
string sql = @" select Nombre from modulo where idModulo='" + idmodulo + "' AND modulo.estado='A' ; ";
68+
DataTable data = conn.EjecutarConsulta(sql, CommandType.Text);
69+
return data.Rows[0]["Nombre"].ToString();
70+
}
71+
72+
73+
74+
75+
5676

5777

5878

swtransito/swtransito/Views/Administrador/Administrador.Master

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<title>DASHGUM - FREE Bootstrap Admin Template</title>
1212

1313
<!-- Bootstrap core CSS -->
14+
15+
16+
17+
1418

1519
<link href="../../Admin/Theme/assets/css/bootstrap.css" rel="stylesheet" />
1620
<!--external css-->
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Administrador/Administrador.Master" AutoEventWireup="true" CodeBehind="Agregar_tematica.aspx.cs" Inherits="swtransito.Views.Administrador.Agregar_tematica" %>
2+
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
3+
</asp:Content>
4+
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
5+
6+
7+
<div class="col-md-10 col-md-offset-1">
8+
<div class="row ">
9+
<h3><i class="fa fa-angle-right"></i><%#Session["nombre_modulo"]%></h3>
10+
11+
<br />
12+
<br />
13+
14+
15+
<!-- SERVER STATUS PANELS -->
16+
17+
18+
19+
20+
21+
22+
23+
24+
</div>
25+
<!-- /row -->
26+
27+
</div>
28+
29+
30+
31+
32+
33+
</asp:Content>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
namespace swtransito.Views.Administrador
9+
{
10+
public partial class Agregar_tematica : System.Web.UI.Page
11+
{
12+
protected void Page_Load(object sender, EventArgs e)
13+
{
14+
15+
}
16+
}
17+
}

swtransito/swtransito/Views/Administrador/Agregar_tematica.aspx.designer.cs

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swtransito/swtransito/Views/Administrador/Modulos.aspx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<table class="table table-striped table-advance table-hover">
1414
<h4><i class="fa fa-angle-right"></i>Modulos Registrados</h4>
1515
<hr>
16-
<a class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal" style="border-left-width: 1px; margin-left: 5px;">Registrar Usuario</a>
16+
<a class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal" style="border-left-width: 1px; margin-left: 5px;">Registrar Modulo</a>
1717
<thead>
1818

1919
<tr>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Administrador/Administrador.Master" AutoEventWireup="true" CodeBehind="Ver_modulos_adm.aspx.cs" Inherits="swtransito.Views.Administrador.Agregar_Tematica" %>
2+
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
3+
</asp:Content>
4+
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
5+
6+
<div class="col-md-10 col-md-offset-1">
7+
<div class="row ">
8+
<h3><i class="fa fa-angle-right"></i> Modulos Registrados</h3>
9+
10+
<br />
11+
<br />
12+
13+
14+
<!-- SERVER STATUS PANELS -->
15+
<form runat="server" class="form-horizontal form-label-left">
16+
<asp:ListView runat="server" ID="list_modulos">
17+
<ItemTemplate>
18+
<div class="col-md-4 col-sm-4 mb">
19+
20+
21+
<div class="darkblue-panel pn">
22+
<div class="darkblue-header">
23+
<h5>No.<%#Eval("Numero")%> <%#Eval("Nombre")%></h5>
24+
</div>
25+
<h1 class="mt"><i class="fa fa-folder-open fa-3x"></i></h1>
26+
27+
<footer>
28+
<div class="centered">
29+
30+
<asp:LinkButton class="btn btn-small btn-theme04" runat="server" OnCommand="Unnamed_Command" CommandArgument='<%#Eval("idModulo")%>' CommandName="traer">Agregar Tematica</asp:LinkButton>
31+
32+
</div>
33+
</footer>
34+
</div>
35+
36+
37+
38+
<! --/grey-panel -->
39+
</div>
40+
<!-- /col-md-4-->
41+
</ItemTemplate>
42+
</asp:ListView>
43+
</form>
44+
45+
46+
47+
48+
49+
50+
51+
</div>
52+
<!-- /row -->
53+
54+
</div>
55+
56+
57+
58+
59+
60+
61+
62+
63+
</asp:Content>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using swtransito.Controllers;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Web;
6+
using System.Web.UI;
7+
using System.Web.UI.WebControls;
8+
9+
namespace swtransito.Views.Administrador
10+
{
11+
public partial class Agregar_Tematica : System.Web.UI.Page
12+
{
13+
14+
15+
ModuloController mod = new ModuloController();
16+
protected void Page_Load(object sender, EventArgs e)
17+
{
18+
list_modulos.DataSource = mod.Traer_modulos_admin();
19+
list_modulos.DataBind();
20+
21+
22+
23+
}
24+
25+
26+
public void Unnamed_Command(object sender, CommandEventArgs e)
27+
{
28+
if (e.CommandName.Equals("traer"))
29+
{
30+
string idmodulo = (e.CommandArgument.ToString());
31+
32+
33+
34+
Session["id_modulo_admin"] = idmodulo;
35+
36+
string nombre = mod.Traer_nombre_monulo(idmodulo);
37+
Session["nombre_modulo"] = nombre;
38+
39+
Response.Redirect("~/Views/Administrador/Agregar_tematica.aspx");
40+
}
41+
42+
}
43+
44+
45+
46+
47+
48+
49+
}
50+
}

0 commit comments

Comments
 (0)