URGENTLY PLEASE System.Reflection.AmbiguousMatchException: Se ha encontrado una coincidencia ambigu

  • Thread starter Luis Esteban Valencia
  • Start date
L

Luis Esteban Valencia

A page let of work for me



I commented almost all lines but nothing

the code is this



AUXILIO! EXTREMA URGENCIA!!! System.Reflection.AmbiguousMatchException: Se
ha encontrado una coincidencia ambigua

Una aplicacion me dejo de funcionar y me saca ese errror el codigo es el
siguiente



<%@ Register TagPrefix="uc1" TagName="menu" Src="menu.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="consultaproducon.aspx.vb"
Inherits="SolicitudMantenimiento.consultaproducon"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>default</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body>
<form id=Form1 method=post runat="server">
<TABLE id=Table1 style="HEIGHT: 104px" cellSpacing=0 cellPadding=0 width=800
border=1>
<TBODY>
<TR>
<TD colSpan=2>
<P align=center><IMG src="cabezote-con-foto.jpg" ></P></TD></TR>
<TR>
<TD style="HEIGHT: 26px" vAlign=top align=center width="100%"
bgColor=blue
colSpan=2>
<P align=left><uc1:menu id=Menu1
runat="server"></uc1:menu></P></TD></TR>
<TR>
<TD vAlign=top>
<STRONG>APLICATIVO DE SOLICITUD
DE SERVICIOS DE MANTENIMIENT </STRONG></FONT></P><asp:panel
id=panellogin
runat="server" Width="100%" Height="27px">
<asp:DataGrid id=dgsolicitud runat="server" Width="800px" CellSpacing="1"
ForeColor="Black" BorderWidth="1pt" BackColor="White" Font-Size="X-Small"
Font-Names="Trebuchet MS" BorderColor="Black" AutoGenerateColumns="False"
CellPadding="3">
<HeaderStyle BackColor="Orange"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="idserviciomantenimiento"
HeaderText="Id"></asp:BoundColumn>
<asp:BoundColumn DataField="Nombre"
HeaderText="Nombre"></asp:BoundColumn>
<asp:BoundColumn DataField="Diagnostico"
HeaderText="Diagnostico"></asp:BoundColumn>
<asp:BoundColumn DataField="Estado"
HeaderText="Estado"></asp:BoundColumn>
<asp:ButtonColumn Text="Procesar" HeaderText="Procesar"
CommandName="Ejecutar" >
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
<asp:ButtonColumn Text="Finalizar" HeaderText="Finalizar"
CommandName="Finalizar">
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
</Columns>
</asp:DataGrid></asp:panel><asp:panel id=panelanalizar
runat="server" Height="152px" Visible="False">
<TABLE id=Table2 style="HEIGHT: 219px" borderColor=black cellSpacing=1
cellPadding=1 width=800 border=1>
<TR>
<TD align=center bgColor=orange colSpan=2 ?><FONT
face="Trebuchet MS"><STRONG>DETALLE DE SERVICIO DE
MANTENIMIENTO</STRONG></FONT></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label2 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Id</asp:Label></TD>
<TD>
<asp:Label id=ID runat="server" Font-Size="X-Small" Font-Names="Trebuchet
MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px; HEIGHT: 22px">
<asp:Label id=Label3 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Nombre</asp:Label></TD>
<TD style="HEIGHT: 22px">
<asp:Label id=nombre runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label4 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Centro de Costos</asp:Label></TD>
<TD>
<asp:Label id=centrodecostos runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label5 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Prioridad</asp:Label></TD>
<TD>
<asp:Label id=prioridad runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label6 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Diagnostico</asp:Label></TD>
<TD>
<asp:Label id=diagnostico runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label7 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Usuario</asp:Label></TD>
<TD>
<asp:Label id=comentariosusuario runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label8 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Producon</asp:Label></TD>
<TD>
<asp:TextBox id=TextBox1 runat="server" Width="400px" Height="110px"
BorderWidth="1px" BorderColor="Black" BorderStyle="Solid"
TextMode="MultiLine">comentarios</asp:TextBox>
<asp:RequiredFieldValidator id=RequiredFieldValidator1 runat="server"
ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator></TD></T
R>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label9 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Inicio</asp:Label></TD>
<TD>
<asp:TextBox id=fechainicio runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator1
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechainicio"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label10 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Fin</asp:Label></TD>
<TD>
<asp:TextBox id=fechafin runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator2
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechafin"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD align=center colSpan=2>
<asp:Button id=ejecutar runat="server" Text="Ejecutar"></asp:Button>
<asp:Button id=rechazar runat="server"
Text="Rechazar"> said:
</TABLE></form>
</body>
</HTML>


Le puse comentarios a todo y nada....

Imports System.Data.SqlClient

Public Class consultaproducon

Inherits System.Web.UI.Page

#Region " Código generado por el Diseñador de Web Forms "

'El Diseñador de Web Forms requiere esta llamada.

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection

'

'SqlConnection1

'

Me.SqlConnection1.ConnectionString = "workstation id=LUISVAL;packet
size=4096;user id=escritura;data source=med20nt;per" & _

"sist security info=False;initial catalog=seradmin; password=escritura"

End Sub

Protected WithEvents Label1 As System.Web.UI.WebControls.Label

Protected WithEvents panellogin As System.Web.UI.WebControls.Panel

Protected WithEvents panelanalizar As System.Web.UI.WebControls.Panel

Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection

Protected WithEvents dgsolicitud As System.Web.UI.WebControls.DataGrid

Protected WithEvents Label2 As System.Web.UI.WebControls.Label

Protected WithEvents Label3 As System.Web.UI.WebControls.Label

Protected WithEvents Label4 As System.Web.UI.WebControls.Label

Protected WithEvents Label5 As System.Web.UI.WebControls.Label

Protected WithEvents Label6 As System.Web.UI.WebControls.Label

Protected WithEvents Label7 As System.Web.UI.WebControls.Label

Protected WithEvents Label8 As System.Web.UI.WebControls.Label

Protected WithEvents Label9 As System.Web.UI.WebControls.Label

Protected WithEvents Label10 As System.Web.UI.WebControls.Label

Protected WithEvents ID As System.Web.UI.WebControls.Label

Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox

Protected WithEvents fechainicio As System.Web.UI.WebControls.TextBox

Protected WithEvents fechafin As System.Web.UI.WebControls.TextBox

Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator

Protected WithEvents RegularExpressionValidator1 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents RegularExpressionValidator2 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents ejecutar As System.Web.UI.WebControls.Button

Protected WithEvents rechazar As System.Web.UI.WebControls.Button

Protected WithEvents nombre As System.Web.UI.WebControls.Label

Protected WithEvents centrodecostos As System.Web.UI.WebControls.Label

Protected WithEvents prioridad As System.Web.UI.WebControls.Label

Protected WithEvents diagnostico As System.Web.UI.WebControls.Label

Protected WithEvents comentariosusuario As System.Web.UI.WebControls.Label

'NOTA: el Diseñador de Web Forms necesita la siguiente declaración del
marcador de posición.

'No se debe eliminar o mover.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: el Diseñador de Web Forms requiere esta llamada de método

'No la modifique con el editor de código.

InitializeComponent()

End Sub

#End Region

Protected WithEvents menu1 As menu

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Introducir aquí el código de usuario para inicializar la página

'If Not Page.IsPostBack Then

menu1.usuario = StrReverse(Mid(StrReverse(User.Identity.Name), 1,
InStr(StrReverse(User.Identity.Name), "\") - 1))

' populatedataset()

'End If

End Sub



'Public Sub populatedataset()

' Dim myds As DataSet = New DataSet

' Dim myadapter As SqlDataAdapter = New SqlDataAdapter("select * from
vistaSolicitudServicioMantenimiento", SqlConnection1)

' Try

' SqlConnection1.Open()

' myadapter.Fill(myds, "vistaSolicitudServicioMantenimiento")

' dgsolicitud.DataSource =
myds.Tables("vistaSolicitudServicioMantenimiento").DefaultView

' dgsolicitud.DataBind()

' Catch ex As Exception

' Label1.Text = ex.Message

' End Try

'End Sub

'Private Sub dgSolicitud_EditCommand(ByVal source As System.Object, ByVal e
As System.Web.UI.WebControls.DataGridCommandEventArgs)

' dgsolicitud.EditItemIndex = e.Item.ItemIndex

' populatedataset()

'End Sub

'Private Sub dgSolicitud_UpdateCommand(ByVal source As System.Object, ByVal
e As System.Web.UI.WebControls.DataGridCommandEventArgs)

' If Page.IsValid Then

' Dim estador As RadioButtonList = e.Item.FindControl("estadot")

' Dim fechai As TextBox = e.Item.FindControl("fechainiciot")

' Dim fechaf As TextBox = e.Item.FindControl("fechafint")

' Dim comentarios As TextBox = e.Item.FindControl("comentariosproducomt")

' Dim mysqlcmd As SqlCommand = New SqlCommand("uptate
intranetsolicitudmantenimiento set estado=@estado,
observaciones=@observaciones, fechaincioest=@fechainicioest,
fechafinest@fechafinest where idserviciomantenimiento=@id", SqlConnection1)

' mysqlcmd.Parameters.Add("@id", e.Item.ItemIndex)

' mysqlcmd.Parameters.Add("@estado", estador.SelectedValue)

' mysqlcmd.Parameters.Add("@observaciones", comentarios.Text)

' mysqlcmd.Parameters.Add("@fechainicioest", fechai.Text)

' mysqlcmd.Parameters.Add("@fechafinest", fechaf.Text)

' Try

' SqlConnection1.Open()

' mysqlcmd.ExecuteNonQuery()

' Catch ex As Exception

' Label1.Text = ex.Message

' Finally

' SqlConnection1.Close()

' End Try

' End If



'End Sub



'Private Sub dgsolicitud_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgsolicitud.ItemDataBound

' If Trim(e.Item.Cells(3).Text) = "ENVIADO" Then

' e.Item.Cells(5).Text = "No puede finalizar"

' ElseIf Trim(e.Item.Cells(3).Text) = "EN EJECUCION" Then

' e.Item.Cells(4).Text = "Esta en ejecucion"

' ElseIf Trim(e.Item.Cells(3).Text) = "FINALIZO" Then

' e.Item.Cells(5).Text = ""

' e.Item.Cells(4).Text = ""

' End If

'End Sub

'Private Sub dgsolicitud_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgsolicitud.ItemCommand

' Dim idint As Int32 = e.Item.ItemIndex

' Dim rows As DataRow() =
myds.Tables("vistaSolicitudServicioMantenimiento").Select("idserviciomanteni
miento = " + idint + "")

' If e.CommandName = "Procesar" Then

' dgsolicitud.Visible = False

' panelanalizar.Visible = True

' nombre.Text = rows(0).Item(1)

' centrodecostos.Text = rows(0).Item(4)

' prioridad.Text = rows(0).Item(5)

' diagnostico.Text = rows(0).Item(7)

' comentariosusuario.Text = rows(0).Item(10)





' End If

' If e.CommandName = "Finalizar" Then





' End If



'End Sub

End Class



AUXLIO
 
T

Thomas Dodds

my limited spanish gets me that "ha encontrado una coincidencia ambigua" is
equivalent to the "unexpected error"

do you have a line number? and if so post the code for that line


Luis Esteban Valencia said:
A page let of work for me



I commented almost all lines but nothing

the code is this



AUXILIO! EXTREMA URGENCIA!!! System.Reflection.AmbiguousMatchException:
Se
ha encontrado una coincidencia ambigua

Una aplicacion me dejo de funcionar y me saca ese errror el codigo es el
siguiente



<%@ Register TagPrefix="uc1" TagName="menu" Src="menu.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="consultaproducon.aspx.vb"
Inherits="SolicitudMantenimiento.consultaproducon"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>default</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body>
<form id=Form1 method=post runat="server">
<TABLE id=Table1 style="HEIGHT: 104px" cellSpacing=0 cellPadding=0
width=800
border=1>
<TBODY>
<TR>
<TD colSpan=2>
<P align=center><IMG src="cabezote-con-foto.jpg" ></P></TD></TR>
<TR>
<TD style="HEIGHT: 26px" vAlign=top align=center width="100%"
bgColor=blue
colSpan=2>
<P align=left><uc1:menu id=Menu1
runat="server"></uc1:menu></P></TD></TR>
<TR>
<TD vAlign=top>
<STRONG>APLICATIVO DE SOLICITUD
DE SERVICIOS DE MANTENIMIENT </STRONG></FONT></P><asp:panel
id=panellogin
runat="server" Width="100%" Height="27px">
<asp:DataGrid id=dgsolicitud runat="server" Width="800px" CellSpacing="1"
ForeColor="Black" BorderWidth="1pt" BackColor="White" Font-Size="X-Small"
Font-Names="Trebuchet MS" BorderColor="Black" AutoGenerateColumns="False"
CellPadding="3">
<HeaderStyle BackColor="Orange"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="idserviciomantenimiento"
HeaderText="Id"></asp:BoundColumn>
<asp:BoundColumn DataField="Nombre"
HeaderText="Nombre"></asp:BoundColumn>
<asp:BoundColumn DataField="Diagnostico"
HeaderText="Diagnostico"></asp:BoundColumn>
<asp:BoundColumn DataField="Estado"
HeaderText="Estado"></asp:BoundColumn>
<asp:ButtonColumn Text="Procesar" HeaderText="Procesar"
CommandName="Ejecutar" >
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
<asp:ButtonColumn Text="Finalizar" HeaderText="Finalizar"
CommandName="Finalizar">
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
</Columns>
</asp:DataGrid></asp:panel><asp:panel id=panelanalizar
runat="server" Height="152px" Visible="False">
<TABLE id=Table2 style="HEIGHT: 219px" borderColor=black
cellSpacing=1
cellPadding=1 width=800 border=1>
<TR>
<TD align=center bgColor=orange colSpan=2 ?><FONT
face="Trebuchet MS"><STRONG>DETALLE DE SERVICIO DE
MANTENIMIENTO</STRONG></FONT></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label2 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Id</asp:Label></TD>
<TD>
<asp:Label id=ID runat="server" Font-Size="X-Small" Font-Names="Trebuchet
MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px; HEIGHT: 22px">
<asp:Label id=Label3 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Nombre</asp:Label></TD>
<TD style="HEIGHT: 22px">
<asp:Label id=nombre runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label4 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Centro de Costos</asp:Label></TD>
<TD>
<asp:Label id=centrodecostos runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label5 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Prioridad</asp:Label></TD>
<TD>
<asp:Label id=prioridad runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label6 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Diagnostico</asp:Label></TD>
<TD>
<asp:Label id=diagnostico runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label7 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Usuario</asp:Label></TD>
<TD>
<asp:Label id=comentariosusuario runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label8 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Producon</asp:Label></TD>
<TD>
<asp:TextBox id=TextBox1 runat="server" Width="400px" Height="110px"
BorderWidth="1px" BorderColor="Black" BorderStyle="Solid"
TextMode="MultiLine">comentarios</asp:TextBox>
<asp:RequiredFieldValidator id=RequiredFieldValidator1 runat="server"
ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator></TD></T
R>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label9 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Inicio</asp:Label></TD>
<TD>
<asp:TextBox id=fechainicio runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator1
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechainicio"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label10 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Fin</asp:Label></TD>
<TD>
<asp:TextBox id=fechafin runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator2
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechafin"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD align=center colSpan=2>
<asp:Button id=ejecutar runat="server" Text="Ejecutar"></asp:Button>
<asp:Button id=rechazar runat="server"
Text="Rechazar"> said:
</TABLE></form>
</body>
</HTML>


Le puse comentarios a todo y nada....

Imports System.Data.SqlClient

Public Class consultaproducon

Inherits System.Web.UI.Page

#Region " Código generado por el Diseñador de Web Forms "

'El Diseñador de Web Forms requiere esta llamada.

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection

'

'SqlConnection1

'

Me.SqlConnection1.ConnectionString = "workstation id=LUISVAL;packet
size=4096;user id=escritura;data source=med20nt;per" & _

"sist security info=False;initial catalog=seradmin; password=escritura"

End Sub

Protected WithEvents Label1 As System.Web.UI.WebControls.Label

Protected WithEvents panellogin As System.Web.UI.WebControls.Panel

Protected WithEvents panelanalizar As System.Web.UI.WebControls.Panel

Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection

Protected WithEvents dgsolicitud As System.Web.UI.WebControls.DataGrid

Protected WithEvents Label2 As System.Web.UI.WebControls.Label

Protected WithEvents Label3 As System.Web.UI.WebControls.Label

Protected WithEvents Label4 As System.Web.UI.WebControls.Label

Protected WithEvents Label5 As System.Web.UI.WebControls.Label

Protected WithEvents Label6 As System.Web.UI.WebControls.Label

Protected WithEvents Label7 As System.Web.UI.WebControls.Label

Protected WithEvents Label8 As System.Web.UI.WebControls.Label

Protected WithEvents Label9 As System.Web.UI.WebControls.Label

Protected WithEvents Label10 As System.Web.UI.WebControls.Label

Protected WithEvents ID As System.Web.UI.WebControls.Label

Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox

Protected WithEvents fechainicio As System.Web.UI.WebControls.TextBox

Protected WithEvents fechafin As System.Web.UI.WebControls.TextBox

Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator

Protected WithEvents RegularExpressionValidator1 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents RegularExpressionValidator2 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents ejecutar As System.Web.UI.WebControls.Button

Protected WithEvents rechazar As System.Web.UI.WebControls.Button

Protected WithEvents nombre As System.Web.UI.WebControls.Label

Protected WithEvents centrodecostos As System.Web.UI.WebControls.Label

Protected WithEvents prioridad As System.Web.UI.WebControls.Label

Protected WithEvents diagnostico As System.Web.UI.WebControls.Label

Protected WithEvents comentariosusuario As System.Web.UI.WebControls.Label

'NOTA: el Diseñador de Web Forms necesita la siguiente declaración del
marcador de posición.

'No se debe eliminar o mover.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: el Diseñador de Web Forms requiere esta llamada de método

'No la modifique con el editor de código.

InitializeComponent()

End Sub

#End Region

Protected WithEvents menu1 As menu

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Introducir aquí el código de usuario para inicializar la página

'If Not Page.IsPostBack Then

menu1.usuario = StrReverse(Mid(StrReverse(User.Identity.Name), 1,
InStr(StrReverse(User.Identity.Name), "\") - 1))

' populatedataset()

'End If

End Sub



'Public Sub populatedataset()

' Dim myds As DataSet = New DataSet

' Dim myadapter As SqlDataAdapter = New SqlDataAdapter("select * from
vistaSolicitudServicioMantenimiento", SqlConnection1)

' Try

' SqlConnection1.Open()

' myadapter.Fill(myds, "vistaSolicitudServicioMantenimiento")

' dgsolicitud.DataSource =
myds.Tables("vistaSolicitudServicioMantenimiento").DefaultView

' dgsolicitud.DataBind()

' Catch ex As Exception

' Label1.Text = ex.Message

' End Try

'End Sub

'Private Sub dgSolicitud_EditCommand(ByVal source As System.Object, ByVal
e
As System.Web.UI.WebControls.DataGridCommandEventArgs)

' dgsolicitud.EditItemIndex = e.Item.ItemIndex

' populatedataset()

'End Sub

'Private Sub dgSolicitud_UpdateCommand(ByVal source As System.Object,
ByVal
e As System.Web.UI.WebControls.DataGridCommandEventArgs)

' If Page.IsValid Then

' Dim estador As RadioButtonList = e.Item.FindControl("estadot")

' Dim fechai As TextBox = e.Item.FindControl("fechainiciot")

' Dim fechaf As TextBox = e.Item.FindControl("fechafint")

' Dim comentarios As TextBox = e.Item.FindControl("comentariosproducomt")

' Dim mysqlcmd As SqlCommand = New SqlCommand("uptate
intranetsolicitudmantenimiento set estado=@estado,
observaciones=@observaciones, fechaincioest=@fechainicioest,
fechafinest@fechafinest where idserviciomantenimiento=@id",
SqlConnection1)

' mysqlcmd.Parameters.Add("@id", e.Item.ItemIndex)

' mysqlcmd.Parameters.Add("@estado", estador.SelectedValue)

' mysqlcmd.Parameters.Add("@observaciones", comentarios.Text)

' mysqlcmd.Parameters.Add("@fechainicioest", fechai.Text)

' mysqlcmd.Parameters.Add("@fechafinest", fechaf.Text)

' Try

' SqlConnection1.Open()

' mysqlcmd.ExecuteNonQuery()

' Catch ex As Exception

' Label1.Text = ex.Message

' Finally

' SqlConnection1.Close()

' End Try

' End If



'End Sub



'Private Sub dgsolicitud_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgsolicitud.ItemDataBound

' If Trim(e.Item.Cells(3).Text) = "ENVIADO" Then

' e.Item.Cells(5).Text = "No puede finalizar"

' ElseIf Trim(e.Item.Cells(3).Text) = "EN EJECUCION" Then

' e.Item.Cells(4).Text = "Esta en ejecucion"

' ElseIf Trim(e.Item.Cells(3).Text) = "FINALIZO" Then

' e.Item.Cells(5).Text = ""

' e.Item.Cells(4).Text = ""

' End If

'End Sub

'Private Sub dgsolicitud_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgsolicitud.ItemCommand

' Dim idint As Int32 = e.Item.ItemIndex

' Dim rows As DataRow() =
myds.Tables("vistaSolicitudServicioMantenimiento").Select("idserviciomanteni
miento = " + idint + "")

' If e.CommandName = "Procesar" Then

' dgsolicitud.Visible = False

' panelanalizar.Visible = True

' nombre.Text = rows(0).Item(1)

' centrodecostos.Text = rows(0).Item(4)

' prioridad.Text = rows(0).Item(5)

' diagnostico.Text = rows(0).Item(7)

' comentariosusuario.Text = rows(0).Item(10)





' End If

' If e.CommandName = "Finalizar" Then





' End If



'End Sub

End Class



AUXLIO
 
L

Luis Esteban Valencia

I already fixed it. I had a label with iD = ID



--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 2.
MIEMBRO ACTIVO DE ALIANZADEV
Thomas Dodds said:
my limited spanish gets me that "ha encontrado una coincidencia ambigua" is
equivalent to the "unexpected error"

do you have a line number? and if so post the code for that line


Luis Esteban Valencia said:
A page let of work for me



I commented almost all lines but nothing

the code is this



AUXILIO! EXTREMA URGENCIA!!! System.Reflection.AmbiguousMatchException:
Se
ha encontrado una coincidencia ambigua

Una aplicacion me dejo de funcionar y me saca ese errror el codigo es el
siguiente



<%@ Register TagPrefix="uc1" TagName="menu" Src="menu.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="consultaproducon.aspx.vb"
Inherits="SolicitudMantenimiento.consultaproducon"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>default</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body>
<form id=Form1 method=post runat="server">
<TABLE id=Table1 style="HEIGHT: 104px" cellSpacing=0 cellPadding=0
width=800
border=1>
<TBODY>
<TR>
<TD colSpan=2>
<P align=center><IMG src="cabezote-con-foto.jpg" ></P></TD></TR>
<TR>
<TD style="HEIGHT: 26px" vAlign=top align=center width="100%"
bgColor=blue
colSpan=2>
<P align=left><uc1:menu id=Menu1
runat="server"></uc1:menu></P></TD></TR>
<TR>
<TD vAlign=top>
<P align=center><asp:label id=Label1
runat="server"> said:
DE SERVICIOS DE MANTENIMIENT </STRONG></FONT></P><asp:panel
id=panellogin
runat="server" Width="100%" Height="27px">
<asp:DataGrid id=dgsolicitud runat="server" Width="800px" CellSpacing="1"
ForeColor="Black" BorderWidth="1pt" BackColor="White" Font-Size="X-Small"
Font-Names="Trebuchet MS" BorderColor="Black" AutoGenerateColumns="False"
CellPadding="3">
<HeaderStyle BackColor="Orange"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="idserviciomantenimiento"
HeaderText="Id"></asp:BoundColumn>
<asp:BoundColumn DataField="Nombre"
HeaderText="Nombre"></asp:BoundColumn>
<asp:BoundColumn DataField="Diagnostico"
HeaderText="Diagnostico"></asp:BoundColumn>
<asp:BoundColumn DataField="Estado"
HeaderText="Estado"></asp:BoundColumn>
<asp:ButtonColumn Text="Procesar" HeaderText="Procesar"
CommandName="Ejecutar" >
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
<asp:ButtonColumn Text="Finalizar" HeaderText="Finalizar"
CommandName="Finalizar">
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
</Columns>
</asp:DataGrid></asp:panel><asp:panel id=panelanalizar
runat="server" Height="152px" Visible="False">
<TABLE id=Table2 style="HEIGHT: 219px" borderColor=black
cellSpacing=1
cellPadding=1 width=800 border=1>
<TR>
<TD align=center bgColor=orange colSpan=2 ?><FONT
face="Trebuchet MS"><STRONG>DETALLE DE SERVICIO DE
MANTENIMIENTO</STRONG></FONT></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label2 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Id</asp:Label></TD>
<TD>
<asp:Label id=ID runat="server" Font-Size="X-Small" Font-Names="Trebuchet
MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px; HEIGHT: 22px">
<asp:Label id=Label3 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Nombre</asp:Label></TD>
<TD style="HEIGHT: 22px">
<asp:Label id=nombre runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label4 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Centro de Costos</asp:Label></TD>
<TD>
<asp:Label id=centrodecostos runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label5 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Prioridad</asp:Label></TD>
<TD>
<asp:Label id=prioridad runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label6 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Diagnostico</asp:Label></TD>
<TD>
<asp:Label id=diagnostico runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label7 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Usuario</asp:Label></TD>
<TD>
<asp:Label id=comentariosusuario runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label8 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Producon</asp:Label></TD>
<TD>
<asp:TextBox id=TextBox1 runat="server" Width="400px" Height="110px"
BorderWidth="1px" BorderColor="Black" BorderStyle="Solid"
TextMode="MultiLine">comentarios</asp:TextBox>
<asp:RequiredFieldValidator id=RequiredFieldValidator1 runat="server"
ErrorMessage="RequiredFieldValidator">* said:
R>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label9 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Inicio</asp:Label></TD>
<TD>
<asp:TextBox id=fechainicio runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator1
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechainicio"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label10 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Fin</asp:Label></TD>
<TD>
<asp:TextBox id=fechafin runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator2
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechafin"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD align=center colSpan=2>
<asp:Button id=ejecutar runat="server" Text="Ejecutar"></asp:Button>
<asp:Button id=rechazar runat="server"
Text="Rechazar"> said:
</TABLE></form>
</body>
</HTML>


Le puse comentarios a todo y nada....

Imports System.Data.SqlClient

Public Class consultaproducon

Inherits System.Web.UI.Page

#Region " Código generado por el Diseñador de Web Forms "

'El Diseñador de Web Forms requiere esta llamada.

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection

'

'SqlConnection1

'

Me.SqlConnection1.ConnectionString = "workstation id=LUISVAL;packet
size=4096;user id=escritura;data source=med20nt;per" & _

"sist security info=False;initial catalog=seradmin; password=escritura"

End Sub

Protected WithEvents Label1 As System.Web.UI.WebControls.Label

Protected WithEvents panellogin As System.Web.UI.WebControls.Panel

Protected WithEvents panelanalizar As System.Web.UI.WebControls.Panel

Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection

Protected WithEvents dgsolicitud As System.Web.UI.WebControls.DataGrid

Protected WithEvents Label2 As System.Web.UI.WebControls.Label

Protected WithEvents Label3 As System.Web.UI.WebControls.Label

Protected WithEvents Label4 As System.Web.UI.WebControls.Label

Protected WithEvents Label5 As System.Web.UI.WebControls.Label

Protected WithEvents Label6 As System.Web.UI.WebControls.Label

Protected WithEvents Label7 As System.Web.UI.WebControls.Label

Protected WithEvents Label8 As System.Web.UI.WebControls.Label

Protected WithEvents Label9 As System.Web.UI.WebControls.Label

Protected WithEvents Label10 As System.Web.UI.WebControls.Label

Protected WithEvents ID As System.Web.UI.WebControls.Label

Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox

Protected WithEvents fechainicio As System.Web.UI.WebControls.TextBox

Protected WithEvents fechafin As System.Web.UI.WebControls.TextBox

Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator

Protected WithEvents RegularExpressionValidator1 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents RegularExpressionValidator2 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents ejecutar As System.Web.UI.WebControls.Button

Protected WithEvents rechazar As System.Web.UI.WebControls.Button

Protected WithEvents nombre As System.Web.UI.WebControls.Label

Protected WithEvents centrodecostos As System.Web.UI.WebControls.Label

Protected WithEvents prioridad As System.Web.UI.WebControls.Label

Protected WithEvents diagnostico As System.Web.UI.WebControls.Label

Protected WithEvents comentariosusuario As System.Web.UI.WebControls.Label

'NOTA: el Diseñador de Web Forms necesita la siguiente declaración del
marcador de posición.

'No se debe eliminar o mover.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: el Diseñador de Web Forms requiere esta llamada de método

'No la modifique con el editor de código.

InitializeComponent()

End Sub

#End Region

Protected WithEvents menu1 As menu

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Introducir aquí el código de usuario para inicializar la página

'If Not Page.IsPostBack Then

menu1.usuario = StrReverse(Mid(StrReverse(User.Identity.Name), 1,
InStr(StrReverse(User.Identity.Name), "\") - 1))

' populatedataset()

'End If

End Sub



'Public Sub populatedataset()

' Dim myds As DataSet = New DataSet

' Dim myadapter As SqlDataAdapter = New SqlDataAdapter("select * from
vistaSolicitudServicioMantenimiento", SqlConnection1)

' Try

' SqlConnection1.Open()

' myadapter.Fill(myds, "vistaSolicitudServicioMantenimiento")

' dgsolicitud.DataSource =
myds.Tables("vistaSolicitudServicioMantenimiento").DefaultView

' dgsolicitud.DataBind()

' Catch ex As Exception

' Label1.Text = ex.Message

' End Try

'End Sub

'Private Sub dgSolicitud_EditCommand(ByVal source As System.Object, ByVal
e
As System.Web.UI.WebControls.DataGridCommandEventArgs)

' dgsolicitud.EditItemIndex = e.Item.ItemIndex

' populatedataset()

'End Sub

'Private Sub dgSolicitud_UpdateCommand(ByVal source As System.Object,
ByVal
e As System.Web.UI.WebControls.DataGridCommandEventArgs)

' If Page.IsValid Then

' Dim estador As RadioButtonList = e.Item.FindControl("estadot")

' Dim fechai As TextBox = e.Item.FindControl("fechainiciot")

' Dim fechaf As TextBox = e.Item.FindControl("fechafint")

' Dim comentarios As TextBox = e.Item.FindControl("comentariosproducomt")

' Dim mysqlcmd As SqlCommand = New SqlCommand("uptate
intranetsolicitudmantenimiento set estado=@estado,
observaciones=@observaciones, fechaincioest=@fechainicioest,
fechafinest@fechafinest where idserviciomantenimiento=@id",
SqlConnection1)

' mysqlcmd.Parameters.Add("@id", e.Item.ItemIndex)

' mysqlcmd.Parameters.Add("@estado", estador.SelectedValue)

' mysqlcmd.Parameters.Add("@observaciones", comentarios.Text)

' mysqlcmd.Parameters.Add("@fechainicioest", fechai.Text)

' mysqlcmd.Parameters.Add("@fechafinest", fechaf.Text)

' Try

' SqlConnection1.Open()

' mysqlcmd.ExecuteNonQuery()

' Catch ex As Exception

' Label1.Text = ex.Message

' Finally

' SqlConnection1.Close()

' End Try

' End If



'End Sub



'Private Sub dgsolicitud_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgsolicitud.ItemDataBound

' If Trim(e.Item.Cells(3).Text) = "ENVIADO" Then

' e.Item.Cells(5).Text = "No puede finalizar"

' ElseIf Trim(e.Item.Cells(3).Text) = "EN EJECUCION" Then

' e.Item.Cells(4).Text = "Esta en ejecucion"

' ElseIf Trim(e.Item.Cells(3).Text) = "FINALIZO" Then

' e.Item.Cells(5).Text = ""

' e.Item.Cells(4).Text = ""

' End If

'End Sub

'Private Sub dgsolicitud_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgsolicitud.ItemCommand

' Dim idint As Int32 = e.Item.ItemIndex

' Dim rows As DataRow() =
myds.Tables("vistaSolicitudServicioMantenimiento").Select("idserviciomanteni
miento = " + idint + "")

' If e.CommandName = "Procesar" Then

' dgsolicitud.Visible = False

' panelanalizar.Visible = True

' nombre.Text = rows(0).Item(1)

' centrodecostos.Text = rows(0).Item(4)

' prioridad.Text = rows(0).Item(5)

' diagnostico.Text = rows(0).Item(7)

' comentariosusuario.Text = rows(0).Item(10)





' End If

' If e.CommandName = "Finalizar" Then





' End If



'End Sub

End Class



AUXLIO
 
T

Thomas Dodds

Bueno! ... perhaps ... ;-)


Luis Esteban Valencia said:
I already fixed it. I had a label with iD = ID



--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 2.
MIEMBRO ACTIVO DE ALIANZADEV
Thomas Dodds said:
my limited spanish gets me that "ha encontrado una coincidencia ambigua" is
equivalent to the "unexpected error"

do you have a line number? and if so post the code for that line


Luis Esteban Valencia said:
A page let of work for me



I commented almost all lines but nothing

the code is this



AUXILIO! EXTREMA URGENCIA!!!
System.Reflection.AmbiguousMatchException:
Se
ha encontrado una coincidencia ambigua

Una aplicacion me dejo de funcionar y me saca ese errror el codigo es el
siguiente



<%@ Register TagPrefix="uc1" TagName="menu" Src="menu.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="consultaproducon.aspx.vb"
Inherits="SolicitudMantenimiento.consultaproducon"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>default</title>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content="Visual Basic .NET 7.1" name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content=http://schemas.microsoft.com/intellisense/ie5
name=vs_targetSchema>
</HEAD>
<body>
<form id=Form1 method=post runat="server">
<TABLE id=Table1 style="HEIGHT: 104px" cellSpacing=0 cellPadding=0
width=800
border=1>
<TBODY>
<TR>
<TD colSpan=2>
<P align=center><IMG src="cabezote-con-foto.jpg" ></P></TD></TR>
<TR>
<TD style="HEIGHT: 26px" vAlign=top align=center width="100%"
bgColor=blue
colSpan=2>
<P align=left><uc1:menu id=Menu1
runat="server"></uc1:menu></P></TD></TR>
<TR>
<TD vAlign=top>
<P align=center><asp:label id=Label1
runat="server"> said:
<P align=center><FONT face="Trebuchet MS"
<STRONG>APLICATIVO DE SOLICITUD
DE SERVICIOS DE MANTENIMIENT </STRONG></FONT></P><asp:panel
id=panellogin
runat="server" Width="100%" Height="27px">
<asp:DataGrid id=dgsolicitud runat="server" Width="800px" CellSpacing="1"
ForeColor="Black" BorderWidth="1pt" BackColor="White" Font-Size="X-Small"
Font-Names="Trebuchet MS" BorderColor="Black" AutoGenerateColumns="False"
CellPadding="3">
<HeaderStyle BackColor="Orange"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="idserviciomantenimiento"
HeaderText="Id"></asp:BoundColumn>
<asp:BoundColumn DataField="Nombre"
HeaderText="Nombre"></asp:BoundColumn>
<asp:BoundColumn DataField="Diagnostico"
HeaderText="Diagnostico"></asp:BoundColumn>
<asp:BoundColumn DataField="Estado"
HeaderText="Estado"></asp:BoundColumn>
<asp:ButtonColumn Text="Procesar" HeaderText="Procesar"
CommandName="Ejecutar" >
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
<asp:ButtonColumn Text="Finalizar" HeaderText="Finalizar"
CommandName="Finalizar">
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:ButtonColumn>
</Columns>
</asp:DataGrid></asp:panel><asp:panel id=panelanalizar
runat="server" Height="152px" Visible="False">
<TABLE id=Table2 style="HEIGHT: 219px" borderColor=black
cellSpacing=1
cellPadding=1 width=800 border=1>
<TR>
<TD align=center bgColor=orange colSpan=2 ?><FONT
face="Trebuchet MS"><STRONG>DETALLE DE SERVICIO DE
MANTENIMIENTO</STRONG></FONT></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label2 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Id</asp:Label></TD>
<TD>
<asp:Label id=ID runat="server" Font-Size="X-Small" Font-Names="Trebuchet
MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px; HEIGHT: 22px">
<asp:Label id=Label3 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Nombre</asp:Label></TD>
<TD style="HEIGHT: 22px">
<asp:Label id=nombre runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label4 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Centro de Costos</asp:Label></TD>
<TD>
<asp:Label id=centrodecostos runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label5 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Prioridad</asp:Label></TD>
<TD>
<asp:Label id=prioridad runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label6 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Diagnostico</asp:Label></TD>
<TD>
<asp:Label id=diagnostico runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label7 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Usuario</asp:Label></TD>
<TD>
<asp:Label id=comentariosusuario runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS"></asp:Label></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label8 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Comentarios Producon</asp:Label></TD>
<TD>
<asp:TextBox id=TextBox1 runat="server" Width="400px" Height="110px"
BorderWidth="1px" BorderColor="Black" BorderStyle="Solid"
TextMode="MultiLine">comentarios</asp:TextBox>
<asp:RequiredFieldValidator id=RequiredFieldValidator1 runat="server"
ErrorMessage="RequiredFieldValidator">* said:
R>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label9 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Inicio</asp:Label></TD>
<TD>
<asp:TextBox id=fechainicio runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator1
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechainicio"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD style="WIDTH: 262px">
<asp:Label id=Label10 runat="server" Font-Size="X-Small"
Font-Names="Trebuchet MS">Fecha Estimada Fin</asp:Label></TD>
<TD>
<asp:TextBox id=fechafin runat="server" BorderWidth="1px"
BorderColor="Black" BorderStyle="Solid"></asp:TextBox>
<asp:RegularExpressionValidator id=RegularExpressionValidator2
runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="fechafin"
ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$"
Formato dd/mm/aaaa</asp:RegularExpressionValidator></TD></TR>
<TR>
<TD align=center colSpan=2>
<asp:Button id=ejecutar runat="server" Text="Ejecutar"></asp:Button>
<asp:Button id=rechazar runat="server"
Text="Rechazar"> said:
</TABLE></form>
</body>
</HTML>


Le puse comentarios a todo y nada....

Imports System.Data.SqlClient

Public Class consultaproducon

Inherits System.Web.UI.Page

#Region " Código generado por el Diseñador de Web Forms "

'El Diseñador de Web Forms requiere esta llamada.

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection

'

'SqlConnection1

'

Me.SqlConnection1.ConnectionString = "workstation id=LUISVAL;packet
size=4096;user id=escritura;data source=med20nt;per" & _

"sist security info=False;initial catalog=seradmin; password=escritura"

End Sub

Protected WithEvents Label1 As System.Web.UI.WebControls.Label

Protected WithEvents panellogin As System.Web.UI.WebControls.Panel

Protected WithEvents panelanalizar As System.Web.UI.WebControls.Panel

Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection

Protected WithEvents dgsolicitud As System.Web.UI.WebControls.DataGrid

Protected WithEvents Label2 As System.Web.UI.WebControls.Label

Protected WithEvents Label3 As System.Web.UI.WebControls.Label

Protected WithEvents Label4 As System.Web.UI.WebControls.Label

Protected WithEvents Label5 As System.Web.UI.WebControls.Label

Protected WithEvents Label6 As System.Web.UI.WebControls.Label

Protected WithEvents Label7 As System.Web.UI.WebControls.Label

Protected WithEvents Label8 As System.Web.UI.WebControls.Label

Protected WithEvents Label9 As System.Web.UI.WebControls.Label

Protected WithEvents Label10 As System.Web.UI.WebControls.Label

Protected WithEvents ID As System.Web.UI.WebControls.Label

Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox

Protected WithEvents fechainicio As System.Web.UI.WebControls.TextBox

Protected WithEvents fechafin As System.Web.UI.WebControls.TextBox

Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator

Protected WithEvents RegularExpressionValidator1 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents RegularExpressionValidator2 As
System.Web.UI.WebControls.RegularExpressionValidator

Protected WithEvents ejecutar As System.Web.UI.WebControls.Button

Protected WithEvents rechazar As System.Web.UI.WebControls.Button

Protected WithEvents nombre As System.Web.UI.WebControls.Label

Protected WithEvents centrodecostos As System.Web.UI.WebControls.Label

Protected WithEvents prioridad As System.Web.UI.WebControls.Label

Protected WithEvents diagnostico As System.Web.UI.WebControls.Label

Protected WithEvents comentariosusuario As System.Web.UI.WebControls.Label

'NOTA: el Diseñador de Web Forms necesita la siguiente declaración del
marcador de posición.

'No se debe eliminar o mover.

Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init

'CODEGEN: el Diseñador de Web Forms requiere esta llamada de método

'No la modifique con el editor de código.

InitializeComponent()

End Sub

#End Region

Protected WithEvents menu1 As menu

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Introducir aquí el código de usuario para inicializar la página

'If Not Page.IsPostBack Then

menu1.usuario = StrReverse(Mid(StrReverse(User.Identity.Name), 1,
InStr(StrReverse(User.Identity.Name), "\") - 1))

' populatedataset()

'End If

End Sub



'Public Sub populatedataset()

' Dim myds As DataSet = New DataSet

' Dim myadapter As SqlDataAdapter = New SqlDataAdapter("select * from
vistaSolicitudServicioMantenimiento", SqlConnection1)

' Try

' SqlConnection1.Open()

' myadapter.Fill(myds, "vistaSolicitudServicioMantenimiento")

' dgsolicitud.DataSource =
myds.Tables("vistaSolicitudServicioMantenimiento").DefaultView

' dgsolicitud.DataBind()

' Catch ex As Exception

' Label1.Text = ex.Message

' End Try

'End Sub

'Private Sub dgSolicitud_EditCommand(ByVal source As System.Object, ByVal
e
As System.Web.UI.WebControls.DataGridCommandEventArgs)

' dgsolicitud.EditItemIndex = e.Item.ItemIndex

' populatedataset()

'End Sub

'Private Sub dgSolicitud_UpdateCommand(ByVal source As System.Object,
ByVal
e As System.Web.UI.WebControls.DataGridCommandEventArgs)

' If Page.IsValid Then

' Dim estador As RadioButtonList = e.Item.FindControl("estadot")

' Dim fechai As TextBox = e.Item.FindControl("fechainiciot")

' Dim fechaf As TextBox = e.Item.FindControl("fechafint")

' Dim comentarios As TextBox = e.Item.FindControl("comentariosproducomt")

' Dim mysqlcmd As SqlCommand = New SqlCommand("uptate
intranetsolicitudmantenimiento set estado=@estado,
observaciones=@observaciones, fechaincioest=@fechainicioest,
fechafinest@fechafinest where idserviciomantenimiento=@id",
SqlConnection1)

' mysqlcmd.Parameters.Add("@id", e.Item.ItemIndex)

' mysqlcmd.Parameters.Add("@estado", estador.SelectedValue)

' mysqlcmd.Parameters.Add("@observaciones", comentarios.Text)

' mysqlcmd.Parameters.Add("@fechainicioest", fechai.Text)

' mysqlcmd.Parameters.Add("@fechafinest", fechaf.Text)

' Try

' SqlConnection1.Open()

' mysqlcmd.ExecuteNonQuery()

' Catch ex As Exception

' Label1.Text = ex.Message

' Finally

' SqlConnection1.Close()

' End Try

' End If



'End Sub



'Private Sub dgsolicitud_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgsolicitud.ItemDataBound

' If Trim(e.Item.Cells(3).Text) = "ENVIADO" Then

' e.Item.Cells(5).Text = "No puede finalizar"

' ElseIf Trim(e.Item.Cells(3).Text) = "EN EJECUCION" Then

' e.Item.Cells(4).Text = "Esta en ejecucion"

' ElseIf Trim(e.Item.Cells(3).Text) = "FINALIZO" Then

' e.Item.Cells(5).Text = ""

' e.Item.Cells(4).Text = ""

' End If

'End Sub

'Private Sub dgsolicitud_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgsolicitud.ItemCommand

' Dim idint As Int32 = e.Item.ItemIndex

' Dim rows As DataRow() =
myds.Tables("vistaSolicitudServicioMantenimiento").Select("idserviciomanteni
miento = " + idint + "")

' If e.CommandName = "Procesar" Then

' dgsolicitud.Visible = False

' panelanalizar.Visible = True

' nombre.Text = rows(0).Item(1)

' centrodecostos.Text = rows(0).Item(4)

' prioridad.Text = rows(0).Item(5)

' diagnostico.Text = rows(0).Item(7)

' comentariosusuario.Text = rows(0).Item(10)





' End If

' If e.CommandName = "Finalizar" Then





' End If



'End Sub

End Class



AUXLIO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,961
Messages
2,570,130
Members
46,689
Latest member
liammiller

Latest Threads

Top