|
From: <sv...@de...> - 2005-06-07 19:07:25
|
Author: pcamacho Date: 2005-06-07 15:07:24 -0400 (Tue, 07 Jun 2005) New Revision: 1252 Removed: humano2/trunk/web/builder/site/borraratributo.aspx humano2/trunk/web/builder/site/borraratributo.aspx.cs Log: DEL: dataattributedelete.aspx* are the files effectively used to delete a= n attribute. Deleted: humano2/trunk/web/builder/site/borraratributo.aspx =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- humano2/trunk/web/builder/site/borraratributo.aspx 2005-06-07 18:58:4= 9 UTC (rev 1251) +++ humano2/trunk/web/builder/site/borraratributo.aspx 2005-06-07 19:07:2= 4 UTC (rev 1252) @@ -1,18 +0,0 @@ -<%@ Page language=3D"c#" Codebehind=3D"borraratributo.aspx.cs" AutoEvent= Wireup=3D"false" Inherits=3D"Builder.site.borraratributo" %> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > -<HTML> - <HEAD> - <title>borraratributo</title> - <meta name=3D"GENERATOR" Content=3D"Microsoft Visual Studio .NET 7.1"> - <meta name=3D"CODE_LANGUAGE" Content=3D"C#"> - <meta name=3D"vs_defaultClientScript" content=3D"JavaScript"> - <meta name=3D"vs_targetSchema" content=3D"http://schemas.microsoft.com= /intellisense/ie5"> - </HEAD> - <body> - <form id=3D"Form1" method=3D"post" runat=3D"server"> - <asp:DropDownList id=3D"ddlClases" runat=3D"server" AutoPostBack=3D"T= rue"></asp:DropDownList><br> - <asp:DropDownList id=3D"ddlAtributos" runat=3D"server"></asp:DropDown= List><br> - <asp:Button id=3D"btnBorrar" runat=3D"server" Text=3D"Borrar"></asp:B= utton> - </form> - </body> -</HTML> Deleted: humano2/trunk/web/builder/site/borraratributo.aspx.cs =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- humano2/trunk/web/builder/site/borraratributo.aspx.cs 2005-06-07 18:5= 8:49 UTC (rev 1251) +++ humano2/trunk/web/builder/site/borraratributo.aspx.cs 2005-06-07 19:0= 7:24 UTC (rev 1252) @@ -1,117 +0,0 @@ -// -// The Humano2 Business solution. -// Copyright (C) 2004,5 Humano2 Chile S.A. (http://www.humano2.com) -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. =20 -// -// $Id$ -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.SessionState; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; -using Humano2.Core.Db; -using Humano2.Components.WebTools; - -namespace Builder.site -{ - /// <summary> - /// Summary description for borraratributo. - /// </summary> - public class borraratributo : System.Web.UI.Page - { - protected System.Web.UI.WebControls.DropDownList ddlClases; - private absCrud crud; - protected System.Web.UI.WebControls.DropDownList ddlAtributos; - protected System.Web.UI.WebControls.Button btnBorrar; - absComplex complex; - - private void Page_Load(object sender, System.EventArgs e) - { - crud =3D Factory.Crud(); - crud.Domain=3D109; - complex =3D crud.GetCore().Complex; - - if(!IsPostBack) - { - string[] clases =3D complex.domainsClass(crud.Domain.ToString()); - ddlClases.Items.Clear(); - ddlClases.Items.Add(new ListItem("Seleccione una Clase","0")); - for(int i=3D0;i<=3Dclases.Length-1;i+=3D2) - { - ddlClases.Items.Add(new ListItem(clases[i+1].ToString(),clases[i].T= oString())); - } - ddlAtributos.Items.Clear(); - ddlAtributos.Items.Add(new ListItem("Seleccione primero una clase","= 0")); - } - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - =09 - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { =20 - this.ddlClases.SelectedIndexChanged +=3D new System.EventHandler(this= .ddlClases_SelectedIndexChanged); - this.btnBorrar.Click +=3D new System.EventHandler(this.btnBorrar_Clic= k); - this.Load +=3D new System.EventHandler(this.Page_Load); - - } - #endregion - - private void ddlClases_SelectedIndexChanged(object sender, System.Even= tArgs e) - { - string[] atributos =3D complex.classAttributes(ddlClases.SelectedValu= e); - try - { - ddlAtributos.Items.Clear(); - ddlAtributos.Items.Add(new ListItem("Seleccione un Atributo","0")); - for(int i=3D0;i<=3Datributos.Length-1;i+=3D2) - { - ddlAtributos.Items.Add(new ListItem(atributos[i].ToString(),atribut= os[i+1].ToString())); - } - } - catch - { - ddlAtributos.Items.Clear(); - ddlAtributos.Items.Add(new ListItem("No Hay Atributo","0")); - } - } - - private void btnBorrar_Click(object sender, System.EventArgs e) - { - if(ddlAtributos.SelectedValue !=3D "0") - { - crud.Delete(Convert.ToInt32(ddlAtributos.SelectedValue)); - - adapter dbAdapter =3D new adapter(); - //FIXME: 109 in the code? what if it's an other domain. - dbAdapter.ChangeAttributesOfView(Convert.ToInt32(ddlAtributos.Select= edValue),=20 - complex.TableId(Convert.ToInt32(ddlAtributos.SelectedValue)= ), - 109,1); - - Response.Redirect(Html.genAbsoluteUrl("/builder/site/borraratributo.= aspx")); - } - } - } -} |