CAPÍTULO 2. CUMPLIMIENTO DE LOS LÍMITES DE GASTO
O. Provincia de Ubaté
2.3. SÍNTESIS DE RESULTADOS DE INDICADOR LEY 617 DE 2000
using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient;
public partial class adedimage : System.Web.UI.Page
{
Connct c = new Connct();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["uid"] == null) { Response.Redirect("login.aspx?log=n"); } if (!Page.IsPostBack) { filldll(); insert(); } }
public void filldll()
{
c.con.Open();
string str = "select * from album order by al_name"; SqlDataAdapter ad = new SqlDataAdapter(str, c.con); DataSet ds = new DataSet();
ad.Fill(ds, "album"); DropDownList1.DataSource = ds; DropDownList1.DataTextField = "al_name"; DropDownList1.DataValueField = "al_id"; DropDownList1.DataBind(); c.con.Close(); }
public void insert()
{
c.con.Open();
string str = "select * from image,album where al_id=img_alname order by img_id";
SqlCommand cmd = new SqlCommand(str, c.con); SqlDataReader dr1 = cmd.ExecuteReader(); int i = 0;
while (dr1.Read()) {
TableRow R = new TableRow(); TableCell c1 = new TableCell();
TableCell c2 = new TableCell(); TableCell c3 = new TableCell(); TableCell c4 = new TableCell(); TableCell c5 = new TableCell(); TableCell c6 = new TableCell(); c1.Text = dr1["img_id"].ToString(); c2.Text = dr1["img_name"].ToString();
DropDownList1.SelectedValue = dr1["img_alname"].ToString(); c3.Text = DropDownList1.SelectedItem.Text;
System.Web.UI.WebControls.Image i1 = new Image();
i1.ImageUrl = "~/Attach/" + dr1["img_orgname"].ToString(); i1.Height = 100;
i1.Width = 150; c4.Controls.Add(i1);
System.Web.UI.WebControls.HyperLink h1 = new HyperLink(); System.Web.UI.WebControls.HyperLink h2 = new HyperLink(); h1.NavigateUrl = "adeditimage.aspx?imgid=" + dr1["img_id"]; h1.Text = "Edit";
h2.Text = "Delete";
h2.Attributes.Add("onclick", "return confirm('Are You sure you want to delete?');");
h2.NavigateUrl = "addelimage.aspx?imgid=" + dr1["img_id"]; c5.Controls.Add(h1); c6.Controls.Add(h2); R.Cells.Add(c1); R.Cells.Add(c2); R.Cells.Add(c3); R.Cells.Add(c4); R.Cells.Add(c5); R.Cells.Add(c6);
c1.HorizontalAlign = HorizontalAlign.Center; c2.HorizontalAlign = HorizontalAlign.Left; c3.HorizontalAlign = HorizontalAlign.Left; c4.HorizontalAlign = HorizontalAlign.Center; c5.HorizontalAlign = HorizontalAlign.Center; c6.HorizontalAlign = HorizontalAlign.Center; Table3.Rows.Add(R); i = i + 1; } c.con.Close(); } } Admin master
<%@ Master Language="C#" AutoEventWireup="true"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server"> <style type ="text/css">
body { valign="top"; margin:0px; } </style>
<link type ="text/css" rel="Stylesheet" href ="css/StyleSheet.css" />
<title>Untitled Page</title> </head>
<body bgcolor="#6351B5">
<form id="form1" runat="server">
<div>
<table width="100%" border="1" cellpadding ="0" cellspacing ="0"
bordercolor="black">
<tr><td colspan ="2" height="60">
<table width="100%" cellpadding ="0" cellspacing ="0"><tr><td
width="10%"><img src ="images/left.JPG" height="60" /></td><td
style="width: 57%">
<img src ="images/center.JPG" height="60" style="width: 696px" /></td><td width="30%">
<img src ="images/right.JPG" height="60" style="width: 243px" /></td></tr></table>
</td></tr>
<tr><td colspan ="2" Height="30" align="center"><font
color="white">~~ ADMIN SECTION ~~</font></td></tr>
<tr><td align="left" valign ="top" width="20%">
<table><tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl
="~/adhome.aspx"><font
color="white">Home</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl
="~/adadartdet.aspx"><font color="white">Add Article Details</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl
="~/adadanndet.aspx"><font color="white">Add Announcement Details</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl
="~/adadeventdet.aspx"><font color="white">Add Event Details</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
<td><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl
="~/adadstuddet.aspx"><font color="white">Add Student Details</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl
="~/adadtechdet.aspx"><font color="white">Add Teacher Details</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl
="~/adadalimdet.aspx"><font color="white">Add
Album/Image</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl
="~/adadresdet.aspx"><font color="white">Add Research Link</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl
="~/adadstorydet.aspx"><font color="white">Add Success Stories</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink12" runat="server" NavigateUrl
="~/adadpoldet.aspx"><font color="white">Add Poll Questions</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink13" runat="server" NavigateUrl
="~/adadcoursedet.aspx"><font color="white">Add Course Details</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl
="~/addistopdet.aspx"><font color="white">Activate/Deactivate Discussion Topic</font></asp:HyperLink></td></tr> <tr><td
valign="middle" height="25"><font color="white" size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink14" runat="server" NavigateUrl
="~/adadppt.aspx"><font color="white">Add Result Powerpoint Slides</font></asp:HyperLink></td></tr>
<tr><td valign="middle" height="25"><font color="white"
size="1">>></font></td>
<td><asp:HyperLink ID="HyperLink11" runat="server" NavigateUrl
="~/logout.aspx"><font
color="white">Logout</font></asp:HyperLink></td></tr>
</table> </td>
<td width="80%" valign="top">
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</td>
</tr>
<tr><td colspan ="2" align="center"><font size="1">!!....Online Learning Portal....!!</font></td></tr>
<tr><td colspan ="2" align="center"><font size="1">!!....Best Viewed in 1024x768....!!</font></td></tr> </table> </div> </form> </body> </html> Admin master.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls;
public partial class Admin : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{ } } Web.config <?xml version="1.0"?> <!--
Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in
machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <appSettings/> <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|
DataDirectory|\online.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient"/> </connectionStrings>
<system.web> <!--
Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development.
-->
<compilation debug="true"> <assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies> </compilation> <!--
The <authentication> section enables configuration of the security authentication mode used by
ASP.NET to identify an incoming user. -->
<authentication mode="Windows"/> <!--
The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp"
namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls> </pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate="false"/>
</httpHandlers> <httpModules>
<add name="ScriptModule"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules> </system.web>
<system.codedom> <compilers>
<compiler language="c#;cs;csharp" extension=".cs"
warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion"
<providerOption name="WarnAsError"
value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript"
extension=".vb" warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="OptionInfer"
value="true"/>
<providerOption name="WarnAsError"
value="false"/>
</compiler> </compilers> </system.codedom> <!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/> <modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules> <handlers>
<remove name="WebServiceHandlerFactory-Integrated"/> <remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/> <remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*"
path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource"
preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers> </system.webServer> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/>
</dependentAssembly> <dependentAssembly>
<assemblyIdentity
name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration>