ClsBancos pago electronico Folio Duolicado
This commit is contained in:
@@ -138,6 +138,9 @@
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LblFolio"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server" >
|
||||
<asp:ListItem Value="1">Baja</asp:ListItem>
|
||||
@@ -289,7 +292,7 @@
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemStyle Width="300px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="Observaciones" Text='<%# Eval("Observaciones") %>' Width="300px" MaxLength="200"></asp:TextBox>
|
||||
<asp:TextBox runat="server" ID="TxtObservaciones" Text='<%# Eval("Observaciones") %>' Width="300px" MaxLength="200"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -317,7 +320,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCheckList" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvCheckList_RowDataBound"
|
||||
DataKeyNames="CveOrdenTrabajoCheckList,CveCheckListActividad,CheckListActividadGrupo,Observaciones,Estatus,Terminado"
|
||||
DataKeyNames="CveOrdenTrabajoCheckList,CveCheckListActividad,CheckListActividadGrupo,Estatus,Terminado"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
|
||||
@@ -33,14 +33,21 @@ Partial Class AF_OrdenTrabajo
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
|
||||
If Request("CveOrdenTrabajo") IsNot Nothing Then
|
||||
CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
|
||||
|
||||
DVFechaFin.Visible = True
|
||||
Tab.Visible = True
|
||||
|
||||
CargaDatos()
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -95,10 +102,7 @@ Partial Class AF_OrdenTrabajo
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
' CargaDatos()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -107,6 +111,40 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetOrdenesTrabajo(CveOrdenTrabajo, -1, -1, -1, -1, -1, MinFecha, MaxFecha, Nothing, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjAF.DtResultados IsNot Nothing AndAlso ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
LblFolio.Text = $"Folio OT: {ObjAF.DtResultados(0)("Folio").ToString}"
|
||||
|
||||
DdlSubProyecto.SelectedValueExist(ObjAF.DtResultados(0)("CveSubProyecto").ToString)
|
||||
DdlAF.SelectedValueExist(ObjAF.DtResultados(0)("CveAF").ToString)
|
||||
DdlTipoServicio.SelectedValueExist(ObjAF.DtResultados(0)("CveTipoServicio").ToString)
|
||||
TxtServicio.Text = ObjAF.DtResultados(0)("Servicio").ToString
|
||||
DdlPrioridad.SelectedValueExist(ObjAF.DtResultados(0)("Prioridad").ToString)
|
||||
txtFechaI.Text = ObjAF.DtResultados(0)("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
If ObjAF.DtResultados(0)("FechaFin").ToString.Length > 0 Then
|
||||
txtFechaF.Text = ObjAF.DtResultados(0)("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
'txtFechaFinReal.Text ""
|
||||
DdlOrdenesTrabajoEstatus.SelectedValueExist(ObjAF.DtResultados(0)("CveEstatusOT").ToString)
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("No se encontro la orden de rtabajo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
CargaMaterial()
|
||||
CargaActividades()
|
||||
CargaCheckList()
|
||||
@@ -152,6 +190,71 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Else
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
|
||||
Dim FechaFinal As Date = MaxFecha
|
||||
Dim FechaFinReal As Date = MaxFecha
|
||||
|
||||
|
||||
If txtFechaF.Text.ToDate > MinFecha Then
|
||||
FechaFinal = txtFechaF.Text.ToDate
|
||||
End If
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajo(CveOrdenTrabajo, DdlTipoServicio.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, TxtServicio.Text.Trim, DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, txtFechaI.Text.ToDate, FechaFinal, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GvRow As GridViewRow In GvActividades.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim TxtObservaciones As TextBox = GvRow.FCTextBox("TxtObservaciones")
|
||||
Dim CveOrdenTrabajoActividad As Integer = GvRow.DataKey("CveOrdenTrabajoActividad").ToEntero
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajoActividades(CveOrdenTrabajoActividad, "-1", If(Chk.Checked, 1, 0), TxtObservaciones.Text, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GvRow As GridViewRow In GvCheckList.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim TxtObservaciones As TextBox = GvRow.FCTextBox("TxtObservaciones")
|
||||
Dim CveOrdenTrabajoCheckList As Integer = GvRow.DataKey("CveOrdenTrabajoCheckList").ToEntero
|
||||
Dim RBL As RadioButtonList = GvRow.FCRadioButtonList("RDLSINOND")
|
||||
Dim Estatus As Integer = 0
|
||||
|
||||
If RBL.SelectedValue.ToEntero > 0 Then
|
||||
Estatus = RBL.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
If CveOrdenTrabajoCheckList > 0 Then
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajoCheckList(CveOrdenTrabajoCheckList, "-1", If(Chk.Checked, 1, 0), TxtObservaciones.Text, Estatus, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjAF.Commit()
|
||||
Alert($"Orden de trabajo actualizada correctamente.")
|
||||
Else
|
||||
ObjAF.RollBack()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -161,165 +264,6 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
|
||||
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
'Public Sub ExportToExcelG(Gv1 As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional filtros As String = "")
|
||||
|
||||
|
||||
|
||||
' For Each GvRow As GridViewRow In Gv1.Rows
|
||||
|
||||
' Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
' For IDX_LIMPIAR = 1 To 15
|
||||
' GvRow.Cells(IDX_LIMPIAR).Text = GvRow.FCTextBox($"TxtMetrica{IDX_LIMPIAR}").Text
|
||||
' Next
|
||||
|
||||
' If GvRow.FCDropDownList("DDLPersonal").SelectedValue.ToEntero > 0 Then
|
||||
' GvRow.Cells(16).Text = GvRow.FCDropDownList("DDLPersonal").SelectedItem.Text
|
||||
' Else
|
||||
' GvRow.Cells(16).Text = ""
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' Dim sw1 As New StringWriter()
|
||||
' Dim htw1 As New HtmlTextWriter(sw1)
|
||||
' Gv1.RenderControl(htw1)
|
||||
|
||||
' Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||
' Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
|
||||
|
||||
' htmlStream1.Position = 0
|
||||
' Dim sr1 As New StreamReader(htmlStream1)
|
||||
' Dim myStr1 = sr1.ReadToEnd()
|
||||
|
||||
' sr1.Dispose()
|
||||
' htmlStream1.Dispose()
|
||||
' sw1.Dispose()
|
||||
|
||||
' Dim HtmlCompleto As String = myStr1
|
||||
|
||||
|
||||
' HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
|
||||
|
||||
' Dim asd As String = ""
|
||||
|
||||
|
||||
' Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
|
||||
|
||||
' GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet())
|
||||
|
||||
' Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||
|
||||
' excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
|
||||
|
||||
' If Usuario IsNot Nothing Then
|
||||
' Dim TotalRowHeader As Integer = 8
|
||||
' Dim TotalRowFooter As Integer = 2
|
||||
|
||||
' Dim worksheet = excel.Worksheets(0)
|
||||
' worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||
' Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||
' celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||
|
||||
' Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||
' RangoNombreEmpresa.Merged = True
|
||||
' RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||
' RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||
' RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||
' RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
' RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
' Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||
' RangoFiltros.Merged = True
|
||||
' RangoFiltros.Value = filtros
|
||||
' RangoFiltros.Style.Font.Size = 15 * 20
|
||||
' RangoFiltros.Style.Font.Name = "Calibri Light"
|
||||
' RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
' RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
' Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||
' RangoTitulo.Merged = True
|
||||
' RangoTitulo.Value = Titulo
|
||||
' RangoTitulo.Style.Font.Size = 20 * 20
|
||||
' RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||
' RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
' RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
' For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
' worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||
' worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
' worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
' worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
' worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
|
||||
|
||||
|
||||
' If i > 0 Then
|
||||
' Try
|
||||
' worksheet.Columns(i).AutoFit(1)
|
||||
' Catch ex As Exception
|
||||
' End Try
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
' Dim IndexEndTable As Integer = Gv1.Rows.Count + 4 + TotalRowHeader + TotalRowFooter
|
||||
|
||||
' worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió"
|
||||
' worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
|
||||
|
||||
' worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
|
||||
' worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
|
||||
' If Imagen.Exists Then
|
||||
' Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||
' Using sr As New StreamReader(Ruta)
|
||||
' Dim ms As New MemoryStream()
|
||||
' sr.BaseStream.CopyTo(ms)
|
||||
' worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||
' End Using
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
|
||||
' Dim memoryStream As New MemoryStream()
|
||||
' excel.Save(memoryStream, SaveOptions.XlsxDefault)
|
||||
' ReporteBytes = memoryStream.ToArray()
|
||||
' memoryStream.Dispose()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
'Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
' Response.ContentType = "application/force-download"
|
||||
' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx")
|
||||
' Response.BinaryWrite(ReporteBytes)
|
||||
' Response.End()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
'Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "FOLIOS"
|
||||
|
||||
@@ -435,6 +379,17 @@ Partial Class AF_OrdenTrabajo
|
||||
End Sub
|
||||
Protected Sub GvActividades_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Chk As CheckBox = e.Row.FCCheckBox("Chk")
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("Terminado")) Then
|
||||
Chk.Checked = True
|
||||
Else
|
||||
Chk.Checked = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub GvCheckList_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
@@ -447,13 +402,15 @@ Partial Class AF_OrdenTrabajo
|
||||
If e.Row.DataKey("CveOrdenTrabajoCheckList").ToEntero = 0 Then
|
||||
|
||||
e.Row.FCLiteral("LtlNROW").Text = e.Row.DataKey("CheckListActividadGrupo").ToString
|
||||
|
||||
e.Row.Attributes.Add("style", "background-color:#DDD")
|
||||
|
||||
Chk.Visible = False
|
||||
RDLSINOND.Visible = False
|
||||
TxtObservaciones.Visible = False
|
||||
Else
|
||||
Dim Estatus As String = e.Row.DataKey("Estatus")
|
||||
|
||||
RDLSINOND.SelectedValuesIfExist(Estatus)
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("Terminado")) Then
|
||||
Chk.Checked = True
|
||||
@@ -464,9 +421,6 @@ Partial Class AF_OrdenTrabajo
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user