Merge branch 'master' of http://adsistemasof.sytes.net:8383/SIG
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
|
||||||
|
|
||||||
|
|||||||
@@ -233,6 +233,7 @@
|
|||||||
<xs:element name="NumCuenta" msprop:Generator_ColumnVarNameInTable="columnNumCuenta" msprop:Generator_ColumnPropNameInRow="NumCuenta" msprop:Generator_ColumnPropNameInTable="NumCuentaColumn" msprop:Generator_UserColumnName="NumCuenta" type="xs:string" minOccurs="0" />
|
<xs:element name="NumCuenta" msprop:Generator_ColumnVarNameInTable="columnNumCuenta" msprop:Generator_ColumnPropNameInRow="NumCuenta" msprop:Generator_ColumnPropNameInTable="NumCuentaColumn" msprop:Generator_UserColumnName="NumCuenta" type="xs:string" minOccurs="0" />
|
||||||
<xs:element name="CveMoneda" msprop:Generator_ColumnVarNameInTable="columnCveMoneda" msprop:Generator_ColumnPropNameInRow="CveMoneda" msprop:Generator_ColumnPropNameInTable="CveMonedaColumn" msprop:Generator_UserColumnName="CveMoneda" type="xs:short" minOccurs="0" />
|
<xs:element name="CveMoneda" msprop:Generator_ColumnVarNameInTable="columnCveMoneda" msprop:Generator_ColumnPropNameInRow="CveMoneda" msprop:Generator_ColumnPropNameInTable="CveMonedaColumn" msprop:Generator_UserColumnName="CveMoneda" type="xs:short" minOccurs="0" />
|
||||||
<xs:element name="CveVenta" msprop:Generator_ColumnVarNameInTable="columnCveVenta" msprop:Generator_ColumnPropNameInRow="CveVenta" msprop:Generator_ColumnPropNameInTable="CveVentaColumn" msprop:Generator_UserColumnName="CveVenta" type="xs:short" minOccurs="0" />
|
<xs:element name="CveVenta" msprop:Generator_ColumnVarNameInTable="columnCveVenta" msprop:Generator_ColumnPropNameInRow="CveVenta" msprop:Generator_ColumnPropNameInTable="CveVentaColumn" msprop:Generator_UserColumnName="CveVenta" type="xs:short" minOccurs="0" />
|
||||||
|
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:string" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
CargaImagenes();
|
CargaImagenes();
|
||||||
|
CargaDdl();
|
||||||
|
|
||||||
UpEncabezado.Update();
|
UpEncabezado.Update();
|
||||||
UPAcercamiento.Update();
|
UPAcercamiento.Update();
|
||||||
@@ -398,8 +399,6 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
|
|
||||||
RecuperaCve();
|
RecuperaCve();
|
||||||
TxtFechaApertura.Text = DateTime.Now.ToShortDateString();
|
TxtFechaApertura.Text = DateTime.Now.ToShortDateString();
|
||||||
|
|
||||||
CargaDdl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void RecuperaCve()
|
protected void RecuperaCve()
|
||||||
@@ -420,7 +419,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
|
|
||||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
||||||
{
|
{
|
||||||
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados;
|
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", CveTipoProceso));
|
||||||
}
|
}
|
||||||
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
@@ -434,7 +433,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
//}
|
//}
|
||||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
||||||
{
|
{
|
||||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}",CveTipoProceso));
|
||||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveMedioCaptacion,MedioCaptacion, Descripcion, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng" EmptyDataText="No se han registrado Medios de Captación"
|
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveMedioCaptacion,MedioCaptacion, Descripcion, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng,CveTipoProceso, TipoProceso" EmptyDataText="No se han registrado Medios de Captación"
|
||||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -52,6 +52,11 @@
|
|||||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Tipo Proceso" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||||
@@ -87,6 +92,10 @@
|
|||||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivTipoProceso" runat="server">
|
||||||
|
<label runat="server" id="LblTipoProceso" for="<%= DdlTipoProceso.ClientID.ToString()%>">Tipo Proceso:</label><br />
|
||||||
|
<asp:DropDownList runat="server" ID="DdlTipoProceso" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveTipoProceso" DataTextField="TipoProceso"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
|||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
|
CargarModalDatos();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +72,19 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
|||||||
GVDatos.DataBind();
|
GVDatos.DataBind();
|
||||||
UPDatos.Update();
|
UPDatos.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CargarModalDatos()
|
||||||
|
{
|
||||||
|
ClsCRM ObjCRM = new ClsCRM();
|
||||||
|
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||||
|
}
|
||||||
|
ObjCRM.Dispose();
|
||||||
|
DdlTipoProceso.DataBind();
|
||||||
|
DdlTipoProceso.Items.Insert(0,new ListItem("Seleccione","-1"));
|
||||||
|
}
|
||||||
|
|
||||||
protected void limpiarCamposModal()
|
protected void limpiarCamposModal()
|
||||||
{
|
{
|
||||||
if (EsEditar == 1)
|
if (EsEditar == 1)
|
||||||
@@ -88,6 +102,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
|||||||
TxtMedioCaptacion.Text = "";
|
TxtMedioCaptacion.Text = "";
|
||||||
TxtDescripcion.Text = "";
|
TxtDescripcion.Text = "";
|
||||||
ChkEstatus.Checked = true;
|
ChkEstatus.Checked = true;
|
||||||
|
DdlTipoProceso.SelectedValue = "-1";
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -142,7 +157,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
|||||||
TxtMedioCaptacion.Text = GvRow.DataKey("MedioCaptacion").ToString();
|
TxtMedioCaptacion.Text = GvRow.DataKey("MedioCaptacion").ToString();
|
||||||
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||||
|
DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString();
|
||||||
UPModal.Update();
|
UPModal.Update();
|
||||||
|
|
||||||
this.RegistraScript("$('#DivModal').modal();");
|
this.RegistraScript("$('#DivModal').modal();");
|
||||||
@@ -160,14 +175,14 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
|||||||
|
|
||||||
if (EsEditar == 0)
|
if (EsEditar == 0)
|
||||||
{
|
{
|
||||||
if (ObjCRM.AddMedioCaptacion(MedioCaptacion, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
if (ObjCRM.AddMedioCaptacion(MedioCaptacion, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("El Medio de Captación fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("El Medio de Captación fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ObjCRM.UpdateMedioCaptacion(MedioCaptacion, Descripcion, Estatus, CveMedioCaptacion))
|
if (ObjCRM.UpdateMedioCaptacion(MedioCaptacion, Descripcion, Estatus, CveMedioCaptacion,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("El Medio de Captación fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("El Medio de Captación fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveProbabilidadAcercamiento, ProbabilidadAcercamiento, Estatus, CveEstatus, CveEmpresa, UsuarioIng, CveUsuarioIng, FechaIng"
|
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveProbabilidadAcercamiento, ProbabilidadAcercamiento, Estatus, CveEstatus, CveEmpresa, UsuarioIng, CveUsuarioIng, FechaIng,CveTipoProceso,TipoProceso"
|
||||||
EmptyDataText="No se han registrado conceptos de Probabilidades de Acercamiento" EmptyDataRowStyle-HorizontalAlign="Center"
|
EmptyDataText="No se han registrado conceptos de Probabilidades de Acercamiento" EmptyDataRowStyle-HorizontalAlign="Center"
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None"
|
CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None"
|
||||||
AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||||
@@ -53,6 +53,11 @@
|
|||||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Tipo Proceso que Ingresó" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||||
@@ -88,6 +93,10 @@
|
|||||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivTipoProceso" runat="server">
|
||||||
|
<label runat="server" id="LblTipoProceso" for="<%= DdlTipoProceso.ClientID.ToString()%>">Tipo Proceso:</label><br />
|
||||||
|
<asp:DropDownList runat="server" ID="DdlTipoProceso" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveTipoProceso" DataTextField="TipoProceso"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
|||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
|
CargarModalDatos();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +73,19 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
|||||||
GVDatos.DataBind();
|
GVDatos.DataBind();
|
||||||
UPDatos.Update();
|
UPDatos.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CargarModalDatos()
|
||||||
|
{
|
||||||
|
ClsCRM ObjCRM = new ClsCRM();
|
||||||
|
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||||
|
}
|
||||||
|
ObjCRM.Dispose();
|
||||||
|
DdlTipoProceso.DataBind();
|
||||||
|
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
}
|
||||||
|
|
||||||
protected void limpiarCamposModal()
|
protected void limpiarCamposModal()
|
||||||
{
|
{
|
||||||
if (EsEditar == 1)
|
if (EsEditar == 1)
|
||||||
@@ -86,6 +100,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
|||||||
BtnGuardar.Text = "Guardar";
|
BtnGuardar.Text = "Guardar";
|
||||||
DivEstatus.Visible = false;
|
DivEstatus.Visible = false;
|
||||||
}
|
}
|
||||||
|
DdlTipoProceso.SelectedValue = "-1";
|
||||||
TxtProbabilidadAcercamiento.Text = "";
|
TxtProbabilidadAcercamiento.Text = "";
|
||||||
//TxtDescripcion.Text = "";
|
//TxtDescripcion.Text = "";
|
||||||
ChkEstatus.Checked = true;
|
ChkEstatus.Checked = true;
|
||||||
@@ -113,7 +128,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
|||||||
TxtProbabilidadAcercamiento.Text = GvRow.DataKey("ProbabilidadAcercamiento").ToString();
|
TxtProbabilidadAcercamiento.Text = GvRow.DataKey("ProbabilidadAcercamiento").ToString();
|
||||||
//TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
//TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||||
|
DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString();
|
||||||
UPModal.Update();
|
UPModal.Update();
|
||||||
|
|
||||||
this.RegistraScript("$('#DivModal').modal();");
|
this.RegistraScript("$('#DivModal').modal();");
|
||||||
@@ -131,14 +146,14 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
|||||||
|
|
||||||
if (EsEditar == 0)
|
if (EsEditar == 0)
|
||||||
{
|
{
|
||||||
if (ObjCRM.AddProbabilidadAcercamiento(ProbabilidadAcercamiento, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
if (ObjCRM.AddProbabilidadAcercamiento(ProbabilidadAcercamiento, UsuarioActual.CveEmpresa, CveUsuarioIng,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("La Probabilidad de Acercamiento fue creada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("La Probabilidad de Acercamiento fue creada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ObjCRM.UpdateProbabilidadAcercamiento(ProbabilidadAcercamiento, Estatus, CveProbabilidadAcercamiento))
|
if (ObjCRM.UpdateProbabilidadAcercamiento(ProbabilidadAcercamiento, Estatus, CveProbabilidadAcercamiento,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("La Probabilidad de Acercamiento fue actualizada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("La Probabilidad de Acercamiento fue actualizada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,7 +589,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTipoProceso" DataTextField="TipoProceso" DataValueField="CveTipoProceso" runat="server" Width="100%" AppendDataBoundItems="true" Class="form-control input-sm select2me"></asp:DropDownList>
|
<asp:DropDownList ID="DdlTipoProceso" DataTextField="TipoProceso" DataValueField="CveTipoProceso" runat="server" Width="100%" AppendDataBoundItems="true" Class="form-control input-sm select2me" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true"></asp:DropDownList>
|
||||||
<label for="<%= DdlTipoProceso.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Proceso:</label>
|
<label for="<%= DdlTipoProceso.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Proceso:</label>
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoProceso" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Proceso''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTipoProceso" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Proceso''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -191,6 +191,32 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
ViewState["CreoCliente"] = value;
|
ViewState["CreoCliente"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DataTable DtMedioCaptacion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtMedioCaptacion"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTable DtProbabilidadAcercamiento
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
@@ -518,8 +544,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
{
|
{
|
||||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
|
DdlMedioCaptacionAcercamiento.Items.Clear();
|
||||||
DdlMedioCaptacionAcercamiento.DataSource = ObjCRM.DtResultados;
|
DdlMedioCaptacionAcercamiento.DataSource = ObjCRM.DtResultados;
|
||||||
|
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||||
DdlMedioCaptacionAcercamiento.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlMedioCaptacionAcercamiento.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
}
|
}
|
||||||
ObjCRM.Dispose();
|
ObjCRM.Dispose();
|
||||||
@@ -629,6 +656,21 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
CargaEventoBitacora();
|
CargaEventoBitacora();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DdlMedioCaptacionAcercamiento.Items.Clear();
|
||||||
|
DdlMedioCaptacionAcercamiento.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}",DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlMedioCaptacionAcercamiento.DataBind();
|
||||||
|
DdlMedioCaptacionAcercamiento.Items.Insert(0,new ListItem("Seleccione","-1"));
|
||||||
|
|
||||||
|
DdlProbabilidadAcercamiento.Items.Clear();
|
||||||
|
DdlProbabilidadAcercamiento.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlProbabilidadAcercamiento.DataBind();
|
||||||
|
DdlProbabilidadAcercamiento.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
UpAltaAcercamiento.Update();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region "ELIMINAR EMPRESA"
|
#region "ELIMINAR EMPRESA"
|
||||||
@@ -1236,7 +1278,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
{
|
{
|
||||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||||
|
|
||||||
if (ObjCRM.DtResultados.Rows.Count > 1)
|
if (ObjCRM.DtResultados.Rows.Count > 0)
|
||||||
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
|
|
||||||
DdlTipoProceso.DataBind();
|
DdlTipoProceso.DataBind();
|
||||||
@@ -1247,6 +1289,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados;
|
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados;
|
||||||
DdlProbabilidadAcercamiento.DataBind();
|
DdlProbabilidadAcercamiento.DataBind();
|
||||||
DdlProbabilidadAcercamiento.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlProbabilidadAcercamiento.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
|
|
||||||
|
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||||
@@ -1293,6 +1337,10 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ClsCRM ObjCRM = new ClsCRM();
|
||||||
|
CargaMetodosCaptacion();
|
||||||
|
InicializaAcercamientos(ObjCRM);
|
||||||
|
ObjCRM.Dispose();
|
||||||
limpiarCamposModalAcercamiento();
|
limpiarCamposModalAcercamiento();
|
||||||
this.RegistraScript("$('#DivModalAltaAcercamiento').modal();");
|
this.RegistraScript("$('#DivModalAltaAcercamiento').modal();");
|
||||||
UpAltaAcercamiento.Update();
|
UpAltaAcercamiento.Update();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="width: 140px;"><b>Tipo de Proceso:</b></td>
|
<td class="text-right" style="width: 140px;"><b>Tipo de Proceso:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" AppendDataBoundItems="true" DataTextField="TipoProceso" DataValueField="CveTipoProceso" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlTipoProceso" runat="server" AppendDataBoundItems="true" DataTextField="TipoProceso" DataValueField="CveTipoProceso" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true"></asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,46 @@ using System.Data;
|
|||||||
|
|
||||||
public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private DataTable DtMedioCaptacion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtMedioCaptacion"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTable DtProbabilidadAcercamiento
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTable DtRechazo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtRechazo"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtRechazo"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
@@ -26,8 +66,10 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
|||||||
|
|
||||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
||||||
{
|
{
|
||||||
|
DdlProbabilidad.Items.Clear();
|
||||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||||
DdlProbabilidad.Items.Insert(0, new ListItem("Todas ", "-1"));
|
DdlProbabilidad.Items.Insert(0, new ListItem("Todas ", "-1"));
|
||||||
|
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
@@ -41,14 +83,18 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
||||||
{
|
{
|
||||||
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Todos ", "-1"));
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||||
|
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjCRM.GetRechazoMotivo(UsuarioActual.CveEmpresa, 1))
|
if (ObjCRM.GetRechazoMotivo(UsuarioActual.CveEmpresa, 1))
|
||||||
{
|
{
|
||||||
|
DdlRechazoMotivo.Items.Clear();
|
||||||
DdlRechazoMotivo.DataSource = ObjCRM.DtResultados;
|
DdlRechazoMotivo.DataSource = ObjCRM.DtResultados;
|
||||||
DdlRechazoMotivo.Items.Insert(0, new ListItem("Todos ", "-1"));
|
DdlRechazoMotivo.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||||
|
DtRechazo = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||||
@@ -63,6 +109,26 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
|||||||
DdlMedioCaptacion.DataBind();
|
DdlMedioCaptacion.DataBind();
|
||||||
DdlRechazoMotivo.DataBind();
|
DdlRechazoMotivo.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DdlMedioCaptacion.Items.Clear();
|
||||||
|
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlMedioCaptacion.DataBind();
|
||||||
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
DdlProbabilidad.Items.Clear();
|
||||||
|
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlProbabilidad.DataBind();
|
||||||
|
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
DdlRechazoMotivo.Items.Clear();
|
||||||
|
DdlRechazoMotivo.DataSource = DtRechazo.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlRechazoMotivo.DataBind();
|
||||||
|
DdlRechazoMotivo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
UpFiltros.Update();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region "CARGA DATOS"
|
#region "CARGA DATOS"
|
||||||
|
|||||||
@@ -42,18 +42,24 @@ public partial class CRM_RepAcercamientos : ClsPaginas
|
|||||||
{
|
{
|
||||||
CveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
CveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
||||||
|
|
||||||
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
|
if (CveVendedor > 0)
|
||||||
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
|
|
||||||
|
|
||||||
ClsCRM ObjCRM = new ClsCRM();
|
|
||||||
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin))
|
|
||||||
{
|
{
|
||||||
GVDatos.DataSource = ObjCRM.DtResultados;
|
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
|
||||||
GVDatos.DataBind();
|
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
|
||||||
}
|
|
||||||
|
|
||||||
ObjCRM.Dispose();
|
ClsCRM ObjCRM = new ClsCRM();
|
||||||
UPDatos.Update();
|
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin))
|
||||||
|
{
|
||||||
|
GVDatos.DataSource = ObjCRM.DtResultados;
|
||||||
|
GVDatos.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjCRM.Dispose();
|
||||||
|
UPDatos.Update();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
Alert("El Campo Vendedor es requerido",ModExtensiones.TipoMensaje.MsgError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Procesos Acercamientos
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true"></asp:DropDownList>
|
||||||
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,6 +27,32 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
|||||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||||
set { ViewState["DtDatos"] = value; }
|
set { ViewState["DtDatos"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DataTable DtMedioCaptacion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtMedioCaptacion"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTable DtProbabilidadAcercamiento
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
@@ -58,11 +84,14 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
|||||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
|
DdlMedioCaptacion.Items.Clear();
|
||||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||||
|
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||||
{
|
{
|
||||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||||
|
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
ObjCRM.Dispose();
|
ObjCRM.Dispose();
|
||||||
|
|
||||||
@@ -73,6 +102,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
|||||||
DdlVendedor.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlVendedor.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||||
|
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
DdlVendedor.SelectedValue = "-1";
|
DdlVendedor.SelectedValue = "-1";
|
||||||
DdlMedioCaptacion.SelectedValue = "-1";
|
DdlMedioCaptacion.SelectedValue = "-1";
|
||||||
DdlProbabilidad.SelectedValue = "-1";
|
DdlProbabilidad.SelectedValue = "-1";
|
||||||
@@ -289,4 +319,19 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
|||||||
}
|
}
|
||||||
UPModalProd.Update();
|
UPModalProd.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DdlMedioCaptacion.Items.Clear();
|
||||||
|
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlMedioCaptacion.DataBind();
|
||||||
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
DdlProbabilidad.Items.Clear();
|
||||||
|
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlProbabilidad.DataBind();
|
||||||
|
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
upDatosRepA.Update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Rechazos Acercamientos
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -27,6 +27,32 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
|||||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||||
set { ViewState["DtDatos"] = value; }
|
set { ViewState["DtDatos"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DataTable DtMedioCaptacion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtMedioCaptacion"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTable DtProbabilidadAcercamiento
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
@@ -59,10 +85,12 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
|||||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||||
|
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||||
{
|
{
|
||||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||||
|
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||||
}
|
}
|
||||||
ObjCRM.Dispose();
|
ObjCRM.Dispose();
|
||||||
|
|
||||||
@@ -289,4 +317,19 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
|||||||
}
|
}
|
||||||
UPModalProd.Update();
|
UPModalProd.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DdlMedioCaptacion.Items.Clear();
|
||||||
|
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlMedioCaptacion.DataBind();
|
||||||
|
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
DdlProbabilidad.Items.Clear();
|
||||||
|
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||||
|
DdlProbabilidad.DataBind();
|
||||||
|
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
upDatosRepA.Update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -295,49 +295,58 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
|
Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
|
||||||
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
||||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString,
|
|
||||||
CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
|
|
||||||
|
|
||||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad <> 1 Then
|
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||||
|
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||||
|
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||||
|
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
|
||||||
|
|
||||||
Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||||
|
|
||||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
If UsuarioActual.Empresa.TipoContabilidad <> 1 Then
|
||||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
|
||||||
Dim IdAgrupador As Integer
|
|
||||||
|
|
||||||
If ObjConta2.GetAgrupadoresSAT() Then
|
Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
|
||||||
End If
|
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||||
If Id > 0 Then
|
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||||
If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
Dim IdAgrupador As Integer
|
||||||
|
|
||||||
|
If ObjConta2.GetAgrupadoresSAT() Then
|
||||||
|
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||||
|
End If
|
||||||
|
If Id > 0 Then
|
||||||
|
If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End Using
|
||||||
End Using
|
End If
|
||||||
|
|
||||||
|
Dim customerRow As Data.DataRow
|
||||||
|
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||||
|
customerRow("Nombre") = Tnombre.Text
|
||||||
|
DtDatos.AcceptChanges()
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
ArbolCuentas.DataSource = DtDatos
|
||||||
|
|
||||||
|
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||||
|
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||||
|
'updatos.Visible = False
|
||||||
|
'Guardar.Visible = False
|
||||||
|
LimpiarCampos()
|
||||||
|
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||||
|
updatos.Update()
|
||||||
|
|
||||||
|
Alert("La cuenta se guardo correctamente")
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
Dim customerRow As Data.DataRow
|
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
|
||||||
customerRow("Nombre") = Tnombre.Text
|
|
||||||
DtDatos.AcceptChanges()
|
|
||||||
|
|
||||||
CargaDatos()
|
|
||||||
ArbolCuentas.DataSource = DtDatos
|
|
||||||
|
|
||||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
|
||||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
|
||||||
'updatos.Visible = False
|
|
||||||
'Guardar.Visible = False
|
|
||||||
LimpiarCampos()
|
|
||||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
|
||||||
updatos.Update()
|
|
||||||
|
|
||||||
Alert("La cuenta se guardo correctamente")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -356,17 +365,14 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Dim CuentaEfectivo As Integer = 0
|
Dim CuentaEfectivo As Integer = 0
|
||||||
Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||||
Tcuenta.Text.Replace("-", "")
|
Tcuenta.Text.Replace("-", "")
|
||||||
|
Dim idnew As Integer = 0
|
||||||
|
|
||||||
Dim idnew As Integer = ObjConta.AddCuenta(
|
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||||
IDSelected,
|
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||||
TxtCuenta.Text.Replace("-", ""),
|
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString)
|
||||||
Tnombre.Text,
|
Else
|
||||||
DTcuenta.SelectedValue.ToString,
|
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||||
DcuentaMayor.SelectedValue.ToString.ToEntero,
|
End If
|
||||||
DdlMoneda.SelectedValue.ToEntero,
|
|
||||||
TxtDigAgrup.Text.ToEntero,
|
|
||||||
DdlAgrupadorSAT.SelectedValue.ToEntero,
|
|
||||||
TxtNomIngles.Text.ToString)
|
|
||||||
|
|
||||||
If idnew > 0 Then
|
If idnew > 0 Then
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
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
|
||||||
@@ -105,10 +105,12 @@ Partial Class Ventas_RepTopClientesVentas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CambioGrafica()
|
Private Sub CambioGrafica()
|
||||||
|
Dim DtClientesAux As New DataTable
|
||||||
|
DtClientesAux = DtClientes.FiltraParametros("CveCliente > 0")
|
||||||
Dim Dt As New DataTable()
|
Dim Dt As New DataTable()
|
||||||
Dt.Columns.Add("Cliente")
|
Dt.Columns.Add("Cliente")
|
||||||
Dt.Columns.Add("Importe")
|
Dt.Columns.Add("Importe")
|
||||||
For Each Dr As DataRow In DtClientes.Rows
|
For Each Dr As DataRow In DtClientesAux.Rows
|
||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Row = Dt.NewRow()
|
Row = Dt.NewRow()
|
||||||
Row("Cliente") = Dr("NombreComercial").ToString
|
Row("Cliente") = Dr("NombreComercial").ToString
|
||||||
|
|||||||
Reference in New Issue
Block a user