From 5d867ce57f43329a65e8570172cfe58d878101d8 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 4 May 2020 15:43:47 -0700 Subject: [PATCH 1/2] una vez cambiado el tipo etapa ya no se puede volver a seleccionar --- CRM/CatEtapasProceso.aspx | 6 ++-- CRM/CatEtapasProceso.aspx.cs | 66 ++++++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/CRM/CatEtapasProceso.aspx b/CRM/CatEtapasProceso.aspx index 27ce1e6dd..fe53d4a71 100644 --- a/CRM/CatEtapasProceso.aspx +++ b/CRM/CatEtapasProceso.aspx @@ -137,11 +137,11 @@
- - + + <%-- - + --%>
diff --git a/CRM/CatEtapasProceso.aspx.cs b/CRM/CatEtapasProceso.aspx.cs index 87b190204..21f956a3a 100644 --- a/CRM/CatEtapasProceso.aspx.cs +++ b/CRM/CatEtapasProceso.aspx.cs @@ -87,7 +87,18 @@ public partial class CRM_CatEtapasProceso : ClsPaginas ViewState["CveTipoEtapaSeleccionada"] = value; } } + private DataTable DTEtapas + { + get + { + return (DataTable)ViewState["DTEtapas"]; + } + set + { + ViewState["DTEtapas"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -96,6 +107,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas { CveTipoProcesoSeleccionado = -1; CveTipoEtapaSeleccionada = -1; + cargaEtapas(); CargaTiposProceso(); CargaDatos(-1); } @@ -164,6 +176,23 @@ public partial class CRM_CatEtapasProceso : ClsPaginas UPFiltros.Update(); } + + protected void cargaEtapas() + { + DataTable Etapas = new DataTable(); + + Etapas.Columns.Add("CveTipoEtapa",typeof(int)); + Etapas.Columns.Add("TipoEtapa", typeof(string)); + + Etapas.Rows.Add(1,"Inicial"); + Etapas.Rows.Add(2, "Proceso"); + Etapas.Rows.Add(3, "Terminado"); + Etapas.Rows.Add(4, "Cancelado"); + + DTEtapas = Etapas; + DdlTipoEtapa.DataSource = Etapas; + DdlTipoEtapa.DataBind(); + } #endregion #region "ACCIONES" @@ -172,6 +201,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas EsEditar = 0; limpiarCamposModal(); DivOrden.Visible = false; + bloquearEtapasAnteriores(-1); DdlTipoProceso.SelectedValueExist(CveTipoProcesoSeleccionado); DdlTipoEtapa.SelectedValueExist(CveTipoEtapaSeleccionada); @@ -189,6 +219,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + bloquearEtapasAnteriores(GvRow.DataKey("CveTipoEtapa").ToEntero()); CveEtapaProceso = GvRow.DataKey("CveEtapaProceso").ToEntero(); DdlTipoProceso.SelectedValueExist(GvRow.DataKey("CveTipoProceso")); DdlTipoEtapa.SelectedValueExist(GvRow.DataKey("CveTipoEtapa")); @@ -206,6 +237,28 @@ public partial class CRM_CatEtapasProceso : ClsPaginas this.RegistraScript("$('#DivModal').modal();"); } + private void bloquearEtapasAnteriores(int CveTipoEtapa) + { + DataTable EtapasAux = DTEtapas.Copy(); + int indice = 0; + for(int i = 1;i < CveTipoEtapa; i++) + { + DataRow TipoEtapaRow = EtapasAux.Rows[indice]; + int CveTipoEtapaAux = TipoEtapaRow["CveTipoEtapa"].ToEntero(); + if(CveTipoEtapaAux == 2) + { + indice++; + }else + { + EtapasAux.Rows.Remove(TipoEtapaRow); + } + } + EtapasAux.AcceptChanges(); + + DdlTipoEtapa.DataSource = EtapasAux; + DdlTipoEtapa.DataBind(); + } + private bool validarInicialTerminadoCancelado(int CveTipoEtapa) { if (CveTipoEtapa == 2) @@ -230,10 +283,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas int Orden = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveEstatus = 1", CveTipoProceso)).Rows.Count + 1; Boolean Estatus = ChkEstatus.Checked; - int CveUsuarioIng = UsuarioActual.CveUsuario; - if (validarInicialTerminadoCancelado(CveTipoEtapa)) - { if (EsEditar == 0) { if (ObjCRM.AddEtapaProceso(EtapaProceso, Descripcion, CveTipoEtapa, Orden, CveTipoProceso, UsuarioActual.CveEmpresa, CveUsuarioIng)) @@ -250,10 +300,12 @@ public partial class CRM_CatEtapasProceso : ClsPaginas Alert("La Etapa fue actualizada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion); } } - }else - { - Alert(String.Format("No se pueden tener 2 etapas de tipo {0}",DdlTipoEtapa.SelectedItem),ModExtensiones.TipoMensaje.MsgAdvertencia); - } + //if (validarInicialTerminadoCancelado(CveTipoEtapa)) + //{ + //}else + //{ + // Alert(String.Format("No se pueden tener 2 etapas de tipo {0}",DdlTipoEtapa.SelectedItem),ModExtensiones.TipoMensaje.MsgAdvertencia); + //} // PRECARGAMOS LA SIGUIENTE ETAPA A AGREGAR CON LOS MISMA DATOS DE LA ETAPA QUE SE INSERTO CveTipoProcesoSeleccionado = CveTipoProceso; From 55fd3984d9fbc3f97c00817d1d766e7bcb0983e9 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 4 May 2020 19:29:54 -0700 Subject: [PATCH 2/2] nuevos reportes --- .../Grales/Formatos/RepCatEtapasProceso.rdlc | 1128 +++++++++++++++++ .../RepCatProbabilidadAcercamiento.rdlc | 869 +++++++++++++ .../Grales/Formatos/RepCatTipoProceso.rdlc | 957 ++++++++++++++ 3 files changed, 2954 insertions(+) create mode 100644 Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc create mode 100644 Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc create mode 100644 Empresas/Grales/Formatos/RepCatTipoProceso.rdlc diff --git a/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc b/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc new file mode 100644 index 000000000..c20511759 --- /dev/null +++ b/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc @@ -0,0 +1,1128 @@ + + + + + + 0.08792cm + 0cm + 20.06868cm + + + + + + + + + 2.73237cm + + + 1.92367cm + + + 3.38889cm + + + 3.59897cm + + + 2.5cm + + + 1.52576cm + + + 1.64513cm + + + 2.68521cm + + + + + 0.46771cm + + + + + true + true + + + + + Proceso + + + + + + + Textbox3 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + No. Etapa + + + + + + + Textbox5 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Etapa + + + + + + + Textbox15 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox23 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo de Etapa + + + + + + + Textbox21 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estatus + + + + + + + Textbox19 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox27 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Usuario + + + + + + + Textbox31 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!TipoProceso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Orden.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!EtapaProceso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoEtapa.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Estatus.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FechaIng.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UsuarioIng.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.36336cm + 0.06868cm + 1.06771cm + 20cm + 1 + + + + + + 0.60091in + + + + + + true + true + + + + + =Parameters!NombreEmpresa.Value + + + + + + + Textbox1 + 0.11854cm + 5.39433cm + 0.6cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE CATÁLOGO DE + + + + + + + + + ETAPAS PROCESO + + + + + + + + + + + + + + + + Textbox2 + 1.98854cm + 5.39433cm + 0.95278cm + 9.98771cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.79374cm + true + true + + + 0.11437cm + 0.10583cm + 0cm + 19.96285cm + + + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.22726cm + 18.00281cm + 0.36335cm + 2.06587cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm + + + + + + + + + 5.89659cm + + + 1.60341cm + + + 3.72586cm + + + 4.01284cm + + + 4.7613cm + + + + + 0.46771cm + + + + + true + true + + + + + Probabilidad de Acercamiento + + + + + + + Textbox3 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estatus + + + + + + + Textbox5 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox15 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Usuario + + + + + + + Textbox23 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo Proceso + + + + + + + Textbox21 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!ProbabilidadAcercamiento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Estatus.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FechaIng.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UsuarioIng.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoProceso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.36336cm + 0.06868cm + 1.06771cm + 20cm + 1 + + + + + + 0.60091in + + + + + + true + true + + + + + =Parameters!NombreEmpresa.Value + + + + + + + Textbox1 + 0.48896cm + 2.56328cm + 0.6cm + 15.44165cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE CATÁLOGO DE + + + + + + + + + PROBABILIDAD ACERCAMIENTO + + + + + + + + + + + + + + + + Textbox2 + 1.98854cm + 2.56328cm + 0.95278cm + 15.44165cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.79374cm + true + true + + + 0.11437cm + 0.10583cm + 0cm + 19.96285cm + + + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.22726cm + 18.00281cm + 0.36335cm + 2.06587cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm + + + + + + + + + 2.3743cm + + + 5.96532cm + + + 3.05758cm + + + 2.7467cm + + + 3.70732cm + + + 2.14878cm + + + + + 0.46771cm + + + + + true + true + + + + + Tipo Proceso + + + + + + + Textbox3 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox5 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + No. Etapas + + + + + + + Textbox15 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estatus + + + + + + + Textbox23 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox21 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Usuario Ing + + + + + + + Textbox19 + + + + Black + + + Black + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!TipoProceso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NoEtapas.Value + + + + + + + NoEtapas + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Estatus.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FechaIng.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UsuarioIng.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.36336cm + 0.06868cm + 1.06771cm + 20cm + 1 + + + + + + 0.60091in + + + + + + true + true + + + + + =Parameters!NombreEmpresa.Value + + + + + + + Textbox1 + 0.11854cm + 5.78222cm + 1.18208cm + 8.43036cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE CATÁLOGO DE + + + + + + + + + TIPOS PROCESOS + + + + + + + + + + + + + + + + Textbox2 + 1.67104cm + 2.56328cm + 0.95278cm + 14.72728cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.79374cm + true + true + + + 0.11437cm + 0.10583cm + 0cm + 19.96285cm + + + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.22726cm + 18.00281cm + 0.36335cm + 2.06587cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm +