diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb
index 6d9a760da..4b96a1d4c 100644
--- a/App_Code/ClsOIEventos.vb
+++ b/App_Code/ClsOIEventos.vb
@@ -1189,12 +1189,13 @@ Public Class ClsOIEventos
#Region "CRUD_cheklist"
- Public Function Getcheklist(cveEvento As Int32) As Boolean
+ Public Function Getcheklist(cveEvento As Int32, Optional CveAcercamiento As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_cheklistGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@cveEvento", SqlDbType.Int).Value = cveEvento
+ .Add("@CveAcercamiento", SqlDbType.Int).Value = CveAcercamiento
End With
Try
SqlAdapter.Fill(Data)
@@ -1204,13 +1205,14 @@ Public Class ClsOIEventos
End Try
Return retorno
End Function
- Public Function Addcheklist(cveEvento As Int32, eventoComentario As String, cveUsuario As Int32) As Boolean
+ Public Function Addcheklist(cveEvento As Int32, eventoComentario As String, cveUsuario As Int32, Optional CveAcercamiento As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_cheklistAdd", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@cveEvento", SqlDbType.Int).Value = cveEvento
.Add("@eventoComentario", SqlDbType.VarChar).Value = eventoComentario
.Add("@cveUsuario", SqlDbType.Int).Value = cveUsuario
+ .Add("@CveAcercamiento", SqlDbType.Int).Value = CveAcercamiento
End With
Try
SqlAdapter.Fill(Data)
@@ -1220,7 +1222,7 @@ Public Class ClsOIEventos
End Try
Return retorno
End Function
- Public Function Upcheklist(cveEventoCheckList As Int32, cveEvento As Int32, eventoComentario As String, estatus As Boolean, cveUsuario As Int32, CveEmpresa As Int32) As Boolean
+ Public Function Upcheklist(cveEventoCheckList As Int32, cveEvento As Int32, eventoComentario As String, estatus As Boolean, cveUsuario As Int32, CveEmpresa As Int32, Optional CveAcercamiento As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_cheklistUp", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -1230,6 +1232,7 @@ Public Class ClsOIEventos
.Add("@estatus", SqlDbType.Bit).Value = estatus
.Add("@cveUsuario", SqlDbType.Int).Value = cveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveAcercamiento", SqlDbType.Int).Value = CveAcercamiento
End With
Dim separador As String = ""
@@ -1272,13 +1275,14 @@ Public Class ClsOIEventos
End If
Return retorno
End Function
- Public Function Removecheklist(cveEventoCheckList As Int32, cveEvento As Int32, cveUsuario As Int32) As Boolean
+ Public Function Removecheklist(cveEventoCheckList As Int32, cveEvento As Int32, cveUsuario As Int32, Optional CveAcercamiento As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_cheklistRemove", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@cveEventoCheckList", SqlDbType.Int).Value = cveEventoCheckList
.Add("@cveEvento", SqlDbType.Int).Value = cveEvento
.Add("@cveUsuario", SqlDbType.Int).Value = cveUsuario
+ .Add("@CveAcercamiento", SqlDbType.Int).Value = CveAcercamiento
End With
Try
SqlAdapter.Fill(Data)
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index a75ea1a03..4c8df82ed 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -5462,7 +5462,7 @@ Partial Class Bancos_IE
Else
- Alert("El documento no ha sido eliminado.", TipoMensaje.MsgAdvertencia)
+ Alert($"El documento no ha sido eliminado. {If(UsuarioActual.CveRol = 1, MsgEliminar, "")}", TipoMensaje.MsgAdvertencia)
If ObjAC IsNot Nothing Then ObjAC.RollBack()
diff --git a/Bin/ADSNetLibrary.dll b/Bin/ADSNetLibrary.dll
index 71043c620..8071a9a71 100644
Binary files a/Bin/ADSNetLibrary.dll and b/Bin/ADSNetLibrary.dll differ
diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx
index eafaf2f5c..c1345f8ca 100644
--- a/CRM/Acercamiento.aspx
+++ b/CRM/Acercamiento.aspx
@@ -498,6 +498,7 @@
+
+
+
+
+
+
+
+
+
+
+ <%--
--%>
+
Agregar
+ <%--
Agregar--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%----%>
+
+
+
+ <%--
--%>
+
+
+
+
+ <%----%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<%--END DATOS DE EMPRESA CRM --%>
diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs
index b1778e7cd..97a6fe078 100644
--- a/CRM/Acercamiento.aspx.cs
+++ b/CRM/Acercamiento.aspx.cs
@@ -5,11 +5,14 @@ using ADSNetLibrary.SIGAPI.Models.Ventas.Request;
using ADSNetLibrary.SIGAPI.Services;
using ADSNetLibrary.SIGAPI.Services.CRM;
using ADSNetLibrary.SIGAPI.Services.Encuestas;
+using DocumentFormat.OpenXml.Drawing.Diagrams;
using Extensiones;
+using FormulaEvaluator;
using MoreLinq;
using System;
using System.Collections.Generic;
using System.Data;
+using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
@@ -266,6 +269,10 @@ public partial class CRM_Acercamiento : ClsPaginas
ViewState["TieneCotizacion"] = value;
}
}
+
+ //public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
+ public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } }
+ public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } }
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -300,6 +307,8 @@ public partial class CRM_Acercamiento : ClsPaginas
DivMensajeDatosTecnicos.Visible = false;
}
}
+
+ CargaCheckLis();
}
CargarPS();
}
@@ -334,7 +343,7 @@ public partial class CRM_Acercamiento : ClsPaginas
TxtNombreAcercamiento.Text = objAcercamiento.Result[0].NombreAcercamiento;
TxtDescripcion.Text = objAcercamiento.Result[0].Descripcion;
TxtFechaApertura.Text = objAcercamiento.Result[0].FechaApertura.ToDateTime().ToShortDateString();
- TxtFechaCierre.Text = (objAcercamiento.Result[0].FechaCierre.ToString() == "") || objAcercamiento.Result[0].FechaCierre.ToString().ToDate() == ModExtensiones.MinFecha ? "" : objAcercamiento.Result[0].FechaCierre.ToDateTime().ToShortDateString();
+ TxtFechaCierre.Text = (objAcercamiento.Result[0].FechaCierre.ToString() == "") || objAcercamiento.Result[0].FechaCierre.ToString().ToDate() == ModExtensiones.MinFecha ? "" : objAcercamiento.Result[0].FechaCierre.ToDateTime().ToShortDateString();
TxtImporte.Text = String.Format("{0:C2}", objAcercamiento.Result[0].Importe.ToEntero());
TxtComision.Text = String.Format("{0:C2}", objAcercamiento.Result[0].Comision.ToEntero());
DdlProbabilidadAcercamiento.SelectedValueExist(objAcercamiento.Result[0].CveProbabilidadAcercamiento);
@@ -1814,4 +1823,135 @@ public partial class CRM_Acercamiento : ClsPaginas
}
#endregion
+
+
+
+ #region "CHECK LIST"
+
+
+ private void CargaCheckLis()
+ {
+ using (ClsOIEventos objOI = new ClsOIEventos())
+ {
+ if (objOI.Getcheklist(-1, CveAcercamiento: CveAcercamiento))
+ {
+ GVcheklist.DataSource = objOI.DtResultados;
+ GVcheklist.DataBind();
+ }
+ }
+
+ UpChkList.Update();
+ }
+
+ protected void LnkAgregarchklistitem_Click(object sender, EventArgs e)
+ {
+ if (TxtActividad.Text.Trim().Length > 0)
+ {
+ if (CveAcercamiento > 0)
+ {
+ using (ClsOIEventos objOI = new ClsOIEventos())
+ {
+ if (objOI.Addcheklist(-1, TxtActividad.Text, UsuarioActual.CveUsuario, CveAcercamiento: CveAcercamiento))
+ {
+ Alert("Se agregó la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
+ if (objOI.Getcheklist(-1, CveAcercamiento: CveAcercamiento))
+ {
+ GVcheklist.DataSource = objOI.DtResultados;
+ GVcheklist.DataBind();
+ }
+ }
+ }
+ }
+ else
+ {
+ System.Data.DataRow drow = CheckListNew.NewRow();
+ drow["CveEventoCheckList"] = chklistitemindex++;
+ drow["EventoComentario"] = TxtActividad.Text;
+ drow["Estatus"] = false;
+ //CveEventoCheckList,CveEvento,CveTipoEvento,EventoComentario,Estatus,CveUsuario,Usuario,FechaIng
+ CheckListNew.Rows.Add(drow);
+ GVcheklist.DataSource = CheckListNew;
+ GVcheklist.DataBind();
+ }
+ }
+ TxtActividad.Focus();
+ TxtActividad.Text = "";
+ }
+
+
+ protected void ChkEstatus_CheckedChanged(object sender, EventArgs e)
+ {
+ CheckBox chk = (CheckBox)sender;
+ GridViewRow gvrow = (GridViewRow)chk.NamingContainer;
+ using (ClsOIEventos objOI = new ClsOIEventos())
+ {
+ if (objOI.Upcheklist(gvrow.DataKey("CveEventoCheckList").ToEntero(), gvrow.DataKey("CveEvento").ToEntero(), gvrow.DataKey("EventoComentario"), chk.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
+ CveAcercamiento: CveAcercamiento))
+ {
+ //ObjEventosCorreo o = objOI.objCorreo;
+ Alert("Se actualizó el estatus de la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
+ if (objOI.Getcheklist(-1, CveAcercamiento: CveAcercamiento))
+ {
+ GVcheklist.DataSource = objOI.DtResultados;
+ GVcheklist.DataBind();
+ }
+ }
+ }
+ }
+
+
+ protected void LnkEliminarchek_Click(object sender, EventArgs e)
+ {
+ GridViewRow gvrow = (GridViewRow)((LinkButton)sender).NamingContainer;
+
+ if(!(CveAcercamiento > 0))
+ {
+ CheckListNew = CheckListNew.FiltraParametros(string.Format("CveEventoCheckList <> {0}", gvrow.DataKey("CveEventoCheckList")));
+ GVcheklist.DataSource = CheckListNew;
+ GVcheklist.DataBind();
+ }
+ else
+ {
+ using (ClsOIEventos objOI = new ClsOIEventos())
+ {
+ if (objOI.Removecheklist(gvrow.DataKey("CveEventoCheckList").ToEntero(), gvrow.DataKey("CveEvento").ToEntero(), UsuarioActual.CveUsuario, CveAcercamiento: CveAcercamiento))
+ {
+ Alert("Se ha eliminadó la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
+ if (objOI.Getcheklist(-1, CveAcercamiento))
+ {
+ GVcheklist.DataSource = objOI.DtResultados;
+ GVcheklist.DataBind();
+ }
+ }
+ }
+ }
+ }
+
+ protected void LnkSinfuncion_Click(object sender, EventArgs e)
+ {
+ // es para mandar llamar el ChkEstatus_CheckedChanged
+ }
+
+
+
+ //private bool GuardaCheckList(SqlTransaction transaction, int CveAcercamientoNuevo)
+ //{
+ // bool respuesta = true;
+
+ // ClsOIEventos objOI = new ClsOIEventos(transaction);
+
+ // foreach (GridViewRow GvRow in GVcheklist.Rows)
+ // {
+ // if (!objOI.Addcheklist(-1, TxtActividad.Text, UsuarioActual.CveUsuario, CveAcercamiento: CveAcercamiento))
+ // {
+ // respuesta = false;
+ // break;
+ // }
+ // }
+
+ // return respuesta;
+ //}
+
+ #endregion
+
}
\ No newline at end of file
diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx
index a805e84da..c01d3a2ed 100644
--- a/CRM/EmpresaCRM.aspx
+++ b/CRM/EmpresaCRM.aspx
@@ -402,7 +402,7 @@
-
@@ -411,7 +411,9 @@
-
+
+
+
diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs
index 40ab53418..6747ded25 100644
--- a/CRM/EmpresaCRM.aspx.cs
+++ b/CRM/EmpresaCRM.aspx.cs
@@ -1789,7 +1789,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
#region "COTIZACIONES"
protected void CargaCotizaciones()
{
- ClsVentas ObjVentas = new ClsVentas();
+
IVentaService ventaService = new VentaService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString);
RequestVentas requestVentas = new RequestVentas(UsuarioActual.CveEmpresa, TipoDocto: "Cot", CveEmpresaCRM: CveEmpresaCRM, CveUsuarioConsulta: UsuarioActual.CveUsuario);
var objVentas = ventaService.GetVentas(requestVentas);
@@ -1802,7 +1802,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
//{
// GvCotizacion.DataSource = ObjVentas.DtResultados;
//}
- ObjVentas.Dispose();
+
GvCotizacion.DataBind();
UpCotizacion.Update();
}
@@ -1815,6 +1815,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
{
e.Row.FCLabel("lblEstatus").Text = String.Format("{0}", e.Row.DataKey("EstatusFactura"));
}
+
+ if(e.Row.DataKey("Total").ToDecimal() != 0)
+ {
+ e.Row.Cells[5].Text = e.Row.DataKey("Total").ToDecimal().ToString("###,###,###.00");
+ }
}
}
#endregion
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index aae7589be..f00294a54 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -6185,6 +6185,12 @@ Partial Class Ventas
DdlVendedor.Enabled = False
LbAgregar.Enabled = True
End If
+
+
+ ThTiempoEntrega.Visible = True
+ ThTiempoEntrega2.Visible = True
+ GvPS.Columns(5).Visible = True
+
End If
ObjCRM.Dispose()
End Sub
@@ -7820,7 +7826,7 @@ Partial Class Ventas
End If
'Si es Cotizacíon
- If e.Row.DBCampo("TipoDocto") = "Cot" Then
+ If e.Row.DBCampo("TipoDocto") = "Cot" Or CveEmpresaCRM > 0 Then
ThTiempoEntrega.Visible = True
ThTiempoEntrega2.Visible = True
GvPS.Columns(5).Visible = True
diff --git a/vwd.webinfo b/vwd.webinfo
index 74e16e7d3..fad050abd 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -574,6 +574,12 @@
+
+
+
+
+
+