terminando dos nuevos moduloa falta funcion de imprimir
This commit is contained in:
@@ -1356,6 +1356,109 @@ Public Class ClsOIEventos
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "Circular"
|
||||||
|
Public Function GetCircular(CveEmpresa As Integer, Optional CveCircular As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1") As Boolean
|
||||||
|
|
||||||
|
FechaI = If(FechaI = "-1", Today.AddYears(-1).ToString, FechaI)
|
||||||
|
FechaF = If(FechaF = "-1", Today.AddYears(1).ToString, FechaF)
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OI_CircularesGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveCircular", SqlDbType.Int).Value = CveCircular
|
||||||
|
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al consultar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AddCircular(Asunto As String, Circular As String, CorreosInternos As String, FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer, Optional CorreosExternos As String = "-1") As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OI_CircularesAdd")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Asunto", SqlDbType.VarChar).Value = Asunto
|
||||||
|
.Add("@Circular", SqlDbType.VarChar).Value = Circular
|
||||||
|
.Add("@CorreosInternos", SqlDbType.VarChar).Value = CorreosInternos
|
||||||
|
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||||
|
.Add("@CorreosExternos", SqlDbType.VarChar).Value = CorreosExternos
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateCircular(CveCircular As Integer, Asunto As String, Circular As String, CorreosInternos As String, CorreosExternos As String, CveUsuario As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OI_CircularesUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCircular", SqlDbType.Int).Value = CveCircular
|
||||||
|
.Add("@Asunto", SqlDbType.VarChar).Value = Asunto
|
||||||
|
.Add("@Circular", SqlDbType.VarChar).Value = Circular
|
||||||
|
.Add("@CorreosInternos", SqlDbType.VarChar).Value = CorreosInternos
|
||||||
|
.Add("@CorreosExternos", SqlDbType.VarChar).Value = CorreosExternos
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function DeleteCircular(CveCircular As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OI_CircularesRemove")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCircular", SqlDbType.Int).Value = CveCircular
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -3976,6 +3976,8 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
||||||
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
||||||
PaginaDict.Add("/Ventas/RepTopClientesVentas.aspx".ToUpper(), 755)
|
PaginaDict.Add("/Ventas/RepTopClientesVentas.aspx".ToUpper(), 755)
|
||||||
|
PaginaDict.Add("/OI/Circular.aspx".ToUpper(), 756)
|
||||||
|
PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 757)
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
75
OI/Circular.aspx
Normal file
75
OI/Circular.aspx
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<%@ Page Title="OI Circular" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Circular.aspx.vb" Inherits="OI_Circular" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Circular
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="LnkAgregar" runat="server" NavigateUrl="/OI/CircularDetalle.aspx?CveCircular=-1"> Agregar Circular</asp:HyperLink>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpFiltros">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 45px; position: relative;">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||||
|
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption magindate">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate text-right">Fecha Inicial: </div>
|
||||||
|
<div class="col-md-3 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaMes" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate text-right">Fecha Final: </div>
|
||||||
|
<div class="col-md-3 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="LinkButton1" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCircular,Asunto,Usuario" EmptyDataText="No se encontraron Motivo de Baja Registrados"
|
||||||
|
ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:HyperLinkField HeaderText="Asunto" datatextfield="Asunto" datanavigateurlfields="CveCircular" datanavigateurlformatstring="/OI/CircularDetalle.aspx?CveCircular={0}" />
|
||||||
|
<asp:HyperLinkField HeaderText="Usuario" datatextfield="Usuario" datanavigateurlfields="CveCircular" datanavigateurlformatstring="/OI/CircularDetalle.aspx?CveCircular={0}" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
32
OI/Circular.aspx.vb
Normal file
32
OI/Circular.aspx.vb
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports System.Linq
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class OI_Circular
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
IniciarFiltros()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub IniciarFiltros()
|
||||||
|
Dim FechaI As DateTime = New DateTime(Today.Year, Today.Month, 1)
|
||||||
|
Dim FechaF As DateTime = New DateTime(Today.Year, Today.Month, 1).AddMonths(1).AddDays(-1)
|
||||||
|
TxtFechaI.Text = FechaI.ToString()
|
||||||
|
TxtFechaF.Text = FechaF.ToString
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
Dim ObjOI As New ClsOIEventos
|
||||||
|
If ObjOI.GetCircular(UsuarioActual.CveEmpresa, -1, TxtFechaI.Text, TxtFechaF.Text) Then
|
||||||
|
GvDatos.DataSource = ObjOI.DtResultados
|
||||||
|
End If
|
||||||
|
ObjOI.Dispose()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub btConsultar_Click() Handles btConsultar.Click
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
97
OI/CircularDetalle.aspx
Normal file
97
OI/CircularDetalle.aspx
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<%@ Page Title="OI Circular" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CircularDetalle.aspx.vb" Inherits="OI_CircularDetalle" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Circular Detalle
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAgregar" runat="server"> Agregar Circular</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 473px;">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<%--<span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span>--%>
|
||||||
|
<%--<asp:LinkButton ID="LnkAgregarCliente" runat="server" AlternateText="Agregar Cliente" Text="<i class='fa fa-plus-square'></i>" />--%>
|
||||||
|
<%--<asp:TextBox ID="TxtCodigo" runat="server" AutoPostBack="true" BorderStyle="None" Width="65px"></asp:TextBox>--%>
|
||||||
|
<%--<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
|
<asp:HiddenField ID="HdnIndices" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
|
<asp:Button ID="BtnBuscarCliente" runat="server" ClientIDMode="Static" Text="Buscar Cliente" Style="display: none;" class="btn btn-primary" />--%>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||||
|
<div class="form-body">
|
||||||
|
<div class="col-md-1" style="width: 100%">
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<asp:Label runat="server" ID="LblAsunto">Asunto:</asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<asp:TextBox runat="server" ID="TxtAsunto"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<asp:Label runat="server" ID="LblCorreo">Para:</asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<textarea runat="server" id="TxtCorreo" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<asp:Label runat="server" ID="LblCorreoExtra">Correos Adicionales:</asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<textarea runat="server" id="TxtCorreoAdicional" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<asp:Label runat="server" ID="LblCircular">Circular:</asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="width: 50%">
|
||||||
|
<textarea runat="server" id="TxtCircular" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row" style="text-align: center">
|
||||||
|
<asp:Button ID="BtnGuardar" runat="server" CssClass="btn btn-primary" Text="Guardar" Visible="true" ValidationGroup="GrpGuardar" />
|
||||||
|
<asp:Button ID="BtnEliminar" runat="server" CssClass="btn btn-danger" Text="Eliminar" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
79
OI/CircularDetalle.aspx.vb
Normal file
79
OI/CircularDetalle.aspx.vb
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports System.Linq
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class OI_CircularDetalle
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property CveCircular As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CveCircular").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveCircular") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargarCve()
|
||||||
|
ConfigurarBotones()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargarCve()
|
||||||
|
Dim PreCveCircular As String = Request.Params("CveCircular").ToString
|
||||||
|
If IsNumeric(PreCveCircular) Then
|
||||||
|
CveCircular = PreCveCircular.ToEntero
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ConfigurarBotones()
|
||||||
|
If CveCircular > 0 Then
|
||||||
|
BtnGuardar.Text = "Guardar"
|
||||||
|
BtnEliminar.Visible = True
|
||||||
|
Else
|
||||||
|
BtnGuardar.Text = "Actualizar"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
If CveCircular > 0 Then
|
||||||
|
Dim ObjOI As New ClsOIEventos
|
||||||
|
If ObjOI.GetCircular(UsuarioActual.CveEmpresa, CveCircular) Then
|
||||||
|
Dim Circular As DataRow = ObjOI.DtResultados(0)
|
||||||
|
|
||||||
|
TxtAsunto.Text = Circular.Item("Asunto")
|
||||||
|
TxtCorreo.Value = Circular.Item("CorreosInternos")
|
||||||
|
TxtCorreoAdicional.Value = Circular.Item("CorreosExternos")
|
||||||
|
TxtCircular.Value = Circular.Item("Circular")
|
||||||
|
|
||||||
|
UpCliente.Update()
|
||||||
|
End If
|
||||||
|
ObjOI.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnGuardar_Click() Handles BtnGuardar.Click
|
||||||
|
Dim ObjOI As New ClsOIEventos
|
||||||
|
If CveCircular > 0 Then
|
||||||
|
If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Value, TxtCorreo.Value, TxtCorreoAdicional.Value, UsuarioActual.CveUsuario) Then
|
||||||
|
Alert("Actualizado correctamente")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim CorreoExtra As String = If(TxtCorreoAdicional.Value = "", "-1", TxtCorreoAdicional.Value)
|
||||||
|
If ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Value, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CorreoExtra) Then
|
||||||
|
Alert("Ingresado correctamente")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnEliminar_Click() Handles BtnEliminar.Click
|
||||||
|
Dim ObjOI As New ClsOIEventos
|
||||||
|
If ObjOI.DeleteCircular(CveCircular) Then
|
||||||
|
Response.Redirect("~/OI/CircularDetalle.aspx?CveCircular=-1")
|
||||||
|
End If
|
||||||
|
ObjOI.Dispose()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Reference in New Issue
Block a user