- Fecha Inicio:
-
- Fecha Fin:
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
:
+
-
-
@@ -113,174 +97,53 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/OI/RepIndicadoresEMD.aspx.vb b/OI/RepIndicadoresEMD.aspx.vb
index 366cd4397..3113521fc 100644
--- a/OI/RepIndicadoresEMD.aspx.vb
+++ b/OI/RepIndicadoresEMD.aspx.vb
@@ -2,6 +2,8 @@
Option Strict On
Imports System.Data
+Imports CrystalDecisions.Shared.Json
+Imports DocumentFormat.OpenXml.Vml.Office
Imports Extensiones
@@ -24,99 +26,206 @@ Partial Class OI_RepIndicadoresEMD
If Not Page.IsPostBack Then
Dim FechaInicial As Date = New Date(10)
-
- txtFechaI.Text = Now.FirstDayOfMonth.ToString("dd/MM/yyyy")
- txtFechaF.Text = Now.ToString("dd/MM/yyyy")
CargaCombos()
CargaDatos()
End If
End Sub
-
Private Sub CargaCombos()
- 'If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
- ' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue))
- 'Else
- DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
- 'End If
- DdlVendedor.DataBind()
- DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
-
-
- DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
- DdlMedico.DataBind()
- DdlMedico.Items.Insert(0, New ListItem("Todos", "-1"))
-
- DdlUsuarioAtendio.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
- DdlUsuarioAtendio.DataBind()
- DdlUsuarioAtendio.Items.Insert(0, New ListItem("Todos", "-1"))
-
+ CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="Todos")
End Sub
+
+ Private Function CrearTablaDatos() As DataTable
+ Dim DTDatos As New DataTable
+
+ DTDatos.Columns.Add("Numero", GetType(Integer))
+ DTDatos.Columns.Add("Indicador", GetType(String))
+ DTDatos.Columns.Add("Comentarios", GetType(String))
+ DTDatos.Columns.Add("ACARREO SAN JOSE A QUILA", GetType(String))
+ DTDatos.Columns.Add("PIPER MERIDIAN M500", GetType(String))
+ DTDatos.Columns.Add("PRESA JALES PEÑA COLORADA", GetType(String))
+ DTDatos.Columns.Add("MINA LA CRUZ", GetType(String))
+ DTDatos.Columns.Add("TOGUI -UBER", GetType(String))
+ DTDatos.Columns.Add("SAN IGNACIO", GetType(String))
+ DTDatos.Columns.Add("Porcentaje", GetType(String))
+ 'DTDatos.Columns.Add("", GetType(String))
+ DTDatos.AcceptChanges()
+
+ Dim nRow1 As DataRow = DTDatos.NewRow
+ Dim nRow2 As DataRow = DTDatos.NewRow
+ Dim nRow3 As DataRow = DTDatos.NewRow
+ Dim nRow4 As DataRow = DTDatos.NewRow
+ Dim nRow5 As DataRow = DTDatos.NewRow
+ Dim nRow6 As DataRow = DTDatos.NewRow
+ Dim nRow7 As DataRow = DTDatos.NewRow
+ Dim nRow8 As DataRow = DTDatos.NewRow
+ Dim nRow9 As DataRow = DTDatos.NewRow
+ Dim nRow10 As DataRow = DTDatos.NewRow
+
+
+
+ 'ACARREO SAN JOSE A QUILA
+ 'PIPER MERIDIAN M500
+ 'PRESA JALES PEÑA COLORADA
+ 'MINA LA CRUZ
+ 'TOGUI -UBER
+ 'SAN IGNACIO
+
+ nRow1("Numero") = "1"
+ nRow1("Indicador") = "Programación de bolsa aprobada en tiempo"
+ nRow1("Comentarios") = "Si programaron en tiempo según la tarea"
+ nRow1("ACARREO SAN JOSE A QUILA") = "1"
+ nRow1("PIPER MERIDIAN M500") = "1"
+ nRow1("PRESA JALES PEÑA COLORADA") = "1"
+ nRow1("MINA LA CRUZ") = "0"
+ nRow1("TOGUI -UBER") = "1"
+ nRow1("SAN IGNACIO") = "1"
+ nRow1("Porcentaje") = "67%"
+
+ nRow2("Numero") = "2"
+ nRow2("Indicador") = "Solicitudes fuera de presupuesto"
+ nRow2("Comentarios") = "Hacer cambios a presupuestos"
+ nRow2("ACARREO SAN JOSE A QUILA") = "1"
+ nRow2("PIPER MERIDIAN M500") = "0"
+ nRow2("PRESA JALES PEÑA COLORADA") = "0"
+ nRow2("MINA LA CRUZ") = "0"
+ nRow2("TOGUI -UBER") = "1"
+ nRow2("SAN IGNACIO") = "1"
+ nRow2("Porcentaje") = "67%"
+
+ nRow3("Numero") = "3"
+ nRow3("Indicador") = "Viáticos dentro de presupuesto"
+ nRow3("Comentarios") = "Si se salió de lo gastado en el rubro de viáticos"
+ nRow3("ACARREO SAN JOSE A QUILA") = ""
+ nRow3("PIPER MERIDIAN M500") = ""
+ nRow3("PRESA JALES PEÑA COLORADA") = ""
+ nRow3("MINA LA CRUZ") = ""
+ nRow3("TOGUI -UBER") = ""
+ nRow3("SAN IGNACIO") = ""
+ nRow3("Porcentaje") = ""
+
+ nRow4("Numero") = "4"
+ nRow4("Indicador") = "Viáticos no deducibles"
+ nRow4("Comentarios") = "Viáticos no deducibles"
+ nRow4("ACARREO SAN JOSE A QUILA") = ""
+ nRow4("PIPER MERIDIAN M500") = ""
+ nRow4("PRESA JALES PEÑA COLORADA") = ""
+ nRow4("MINA LA CRUZ") = ""
+ nRow4("TOGUI -UBER") = ""
+ nRow4("SAN IGNACIO") = ""
+ nRow4("Porcentaje") = ""
+
+ nRow5("Numero") = "5"
+ nRow5("Indicador") = "Utilidad operativa"
+ nRow5("Comentarios") = "Ing-Egs"
+ nRow5("ACARREO SAN JOSE A QUILA") = ""
+ nRow5("PIPER MERIDIAN M500") = ""
+ nRow5("PRESA JALES PEÑA COLORADA") = ""
+ nRow5("MINA LA CRUZ") = ""
+ nRow5("TOGUI -UBER") = ""
+ nRow5("SAN IGNACIO") = ""
+ nRow5("Porcentaje") = ""
+
+ nRow6("Numero") = "11"
+ nRow6("Indicador") = "Factura ligada a orden de compra en SIG"
+ nRow6("Comentarios") = "Relación"
+ nRow6("ACARREO SAN JOSE A QUILA") = ""
+ nRow6("PIPER MERIDIAN M500") = ""
+ nRow6("PRESA JALES PEÑA COLORADA") = ""
+ nRow6("MINA LA CRUZ") = ""
+ nRow6("TOGUI -UBER") = ""
+ nRow6("SAN IGNACIO") = ""
+ nRow6("Porcentaje") = ""
+
+ nRow7("Numero") = "12"
+ nRow7("Indicador") = "Cumplimiento del programa de mantenimientos preventivos"
+ nRow7("Comentarios") = ""
+ nRow7("ACARREO SAN JOSE A QUILA") = "ND"
+ nRow7("PIPER MERIDIAN M500") = "ND"
+ nRow7("PRESA JALES PEÑA COLORADA") = "ND"
+ nRow7("MINA LA CRUZ") = "ND"
+ nRow7("TOGUI -UBER") = "ND"
+ nRow7("SAN IGNACIO") = "ND"
+ nRow7("Porcentaje") = "50%"
+
+ nRow8("Numero") = "13"
+ nRow8("Indicador") = "Relación entre mantenimiento preventivo y correctivo"
+ nRow8("Comentarios") = ""
+ nRow8("ACARREO SAN JOSE A QUILA") = "ND"
+ nRow8("PIPER MERIDIAN M500") = "ND"
+ nRow8("PRESA JALES PEÑA COLORADA") = "ND"
+ nRow8("MINA LA CRUZ") = "ND"
+ nRow8("TOGUI -UBER") = "ND"
+ nRow8("SAN IGNACIO") = "ND"
+ nRow8("Porcentaje") = "50%"
+
+ nRow9("Numero") = "14"
+ nRow9("Indicador") = "Consumo de combustible"
+ nRow9("Comentarios") = ""
+ nRow9("ACARREO SAN JOSE A QUILA") = "ND"
+ nRow9("PIPER MERIDIAN M500") = "ND"
+ nRow9("PRESA JALES PEÑA COLORADA") = "ND"
+ nRow9("MINA LA CRUZ") = "ND"
+ nRow9("TOGUI -UBER") = "ND"
+ nRow9("SAN IGNACIO") = "ND"
+ nRow9("Porcentaje") = "50%"
+
+ nRow10("Numero") = "15"
+ nRow10("Indicador") = "Relación de entradas de almacén contra órdenes de compra"
+ nRow10("Comentarios") = "Relación"
+ nRow10("ACARREO SAN JOSE A QUILA") = ""
+ nRow10("PIPER MERIDIAN M500") = ""
+ nRow10("PRESA JALES PEÑA COLORADA") = ""
+ nRow10("MINA LA CRUZ") = ""
+ nRow10("TOGUI -UBER") = ""
+ nRow10("SAN IGNACIO") = ""
+ nRow10("Porcentaje") = ""
+
+
+ DTDatos.Rows.Add(nRow1)
+ DTDatos.Rows.Add(nRow2)
+ DTDatos.Rows.Add(nRow3)
+ DTDatos.Rows.Add(nRow4)
+ DTDatos.Rows.Add(nRow5)
+ DTDatos.Rows.Add(nRow6)
+ DTDatos.Rows.Add(nRow7)
+ DTDatos.Rows.Add(nRow8)
+ DTDatos.Rows.Add(nRow9)
+ DTDatos.Rows.Add(nRow10)
+
+ DTDatos.AcceptChanges()
+ Return DTDatos
+
+ End Function
+
Public Sub CargaDatos()
LnkExportar.Visible = False
- Dim ObjVentas As New ClsVentas
-
- If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 1) Then
- GvDatos.DataSource = ObjVentas.DtResultados
-
- If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
- LnkExportar.Visible = True
- End If
- Else
- GvDatos.DataSource = Nothing
- End If
-
- ObjVentas.Dispose()
-
+ GvDatos.DataSource = CrearTablaDatos()
GvDatos.DataBind()
+ 'LnkExportar.Visible = True
+ 'GvDatos.DataBind()
+
+ If GvDatos.Rows.Count > 0 Then
+ LnkExportar.Visible = True
+ End If
UpDatos.Update()
End Sub
- Public Sub CargaDatosEspeciales()
-
- LnkExportar.Visible = False
-
- Dim ObjVentas As New ClsVentas
-
- If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 2) Then
- GvDatosEspeciales.DataSource = ObjVentas.DtResultados
-
- If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
- LnkExportar.Visible = True
- End If
- Else
- GvDatosEspeciales.DataSource = Nothing
- End If
-
- ObjVentas.Dispose()
-
- GvDatosEspeciales.DataBind()
-
- UpDatosEspeciales.Update()
-
- End Sub
-
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
-
- If Tabs.ActiveTabIndex = 0 Then
- CargaDatos()
- Else
- CargaDatosEspeciales()
- End If
-
+ CargaDatos()
End Sub
#Region "EXCEL"
@@ -125,16 +234,13 @@ Partial Class OI_RepIndicadoresEMD
Dim SbFiltros As New StringBuilder()
- SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
+ SbFiltros.AppendFormat($"Ejercicio: {DdlEjercicio.SelectedItem.Text} Periodo: {DdlPeriodo.SelectedItem.Text}|")
- If Tabs.ActiveTabIndex = 0 Then
- GvDatos.Columns(10).Visible = False
- GvDatos.ExportToExcelGembox("Comisiones", UsuarioActual, "Comisiones", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
- GvDatos.Columns(10).Visible = True
- Else
- GvDatosEspeciales.ExportToExcelGembox("Comisiones", UsuarioActual, "Comisiones Especiales", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
- End If
+ ' GvDatos.Columns(10).Visible = False
+ GvDatos.ExportToExcelGembox("IndicadoresEMD", UsuarioActual, "Indicadores EMD", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
+ ' GvDatos.Columns(10).Visible = True
+
End Sub
@@ -145,107 +251,10 @@ Partial Class OI_RepIndicadoresEMD
#End Region
- Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs)
- CargaComisiones()
- RegistraScript("$('#DvModalComisiones').modal('show');")
- End Sub
-
- Private Sub CargaComisiones()
- DTDatos = New DataTable
- GvComisiones.DataSource = Nothing
-
- Dim objVentas As New ClsVentas
-
- If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
- GvComisiones.DataSource = objVentas.DtResultados
- DTDatos = objVentas.DtResultados
- End If
-
- objVentas.Dispose()
-
- GvComisiones.DataBind()
-
- UpDvModalComisiones.Update()
-
- End Sub
- Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs)
-
- Dim objVentas As New ClsVentas
- objVentas.IniciaTransacSQL()
-
- Dim TieneError As Boolean = False
-
- For Each GvRow As GridViewRow In GvComisiones.Rows
-
- Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
- Dim ComisionMedicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionMedico", $"CvePS = {CvePS} ").ToDecimal
- Dim ComisionVendedorDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionVendedor", $"CvePS = {CvePS} ").ToDecimal
- Dim ComisionTecnicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionTecnico", $"CvePS = {CvePS} ").ToDecimal
- Dim ComisionGerenteDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionGerente", $"CvePS = {CvePS} ").ToDecimal
-
- Dim ComisionMedicoGV As Decimal = GvRow.FCTextBox("TxtComisionMedico").Text.ToDecimal
- Dim ComisionGerenteGV As Decimal = (GvRow.FCTextBox("TxtComisionGerente").Text.ToDecimal / 100).RoundSQL(4)
- Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(4)
- Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(4)
-
-
- If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then
- If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then
- TieneError = True
- End If
- End If
-
- Next
-
- If TieneError Then
- objVentas.RollBack()
- Else
- objVentas.Commit()
- Alert("Comisiones Actualizadas correctamente")
- End If
-
- objVentas.Dispose()
-
- End Sub
-
- Protected Sub GvComisiones_RowDataBound(sender As Object, e As GridViewRowEventArgs)
-
- If e.Row.RowType = DataControlRowType.DataRow Then
-
- 'ComisionMedico,ComisionGerente,ComisionVendedor,ComisionTecnico"
-
- If e.Row.DataKey("ComisionMedico").ToDecimal = 0 Then
- e.Row.FCTextBox("TxtComisionMedico").Text = ""
- Else
- e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00")
- End If
-
-
- If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then
- e.Row.FCTextBox("TxtComisionGerente").Text = ""
- Else
- e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00")
- End If
-
-
- If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then
- e.Row.FCTextBox("TxtComisionVendedor").Text = ""
- Else
- e.Row.FCTextBox("TxtComisionVendedor").Text = (e.Row.DataKey("ComisionVendedor").ToDecimal * 100).ToString("###.00")
- End If
-
- If e.Row.DataKey("ComisionTecnico").ToDecimal = 0 Then
- e.Row.FCTextBox("TxtComisionTecnico").Text = ""
- Else
- e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00")
- End If
- End If
-
- End Sub
End Class
diff --git a/OI/TareaDetalle.aspx.cs b/OI/TareaDetalle.aspx.cs
index 277819ec0..52732abc1 100644
--- a/OI/TareaDetalle.aspx.cs
+++ b/OI/TareaDetalle.aspx.cs
@@ -51,6 +51,12 @@ public partial class OI_TareaDetalle : ClsPaginas
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; } }
+
+ public int CveIndicador { get { return ViewState["CveIndicador"].ToString().ToEntero(); } set { ViewState["CveIndicador"] = value; } }
+ public int Indicador { get { return ViewState["Indicador"].ToString().ToEntero(); } set { ViewState["Indicador"] = value; } }
+ public int ValorIndicador { get { return ViewState["ValorIndicador"].ToString().ToEntero(); } set { ViewState["ValorIndicador"] = value; } }
+ public int CveSubProyectoIndicador { get { return ViewState["CveSubProyectoIndicador"].ToString().ToEntero(); } set { ViewState["CveSubProyectoIndicador"] = value; } }
+
#endregion
protected void Page_Load(object sender, EventArgs e)
{
@@ -72,6 +78,12 @@ public partial class OI_TareaDetalle : ClsPaginas
EsNuevo = true;
CveUsuarioPara = 0;
CveUsuarioDe = 0;
+
+ CveIndicador = -1;
+ Indicador = -1;
+ ValorIndicador = -1;
+ CveSubProyectoIndicador = -1;
+
if (Request["Archivo"] != null)
{
string strArchivo = string.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ModExtensiones.Decripta(Request["Archivo"].ToString()));
@@ -458,6 +470,11 @@ public partial class OI_TareaDetalle : ClsPaginas
//OIE.[CveEventoEstatus], OIE.[FechaInicio], OIE.[FechaFin], OIE.[FechaRealTermino], OIE.[CveRevision], OIE.[Archivo], OIE.[FechaIng],
//OIE.[CveUsuarioIng], OIE.[CveEmpresa], OIE.[CveUsuarioModifico], OIE.[Avance]
+ CveIndicador = drow["CveIndicador"].ToString().ToEntero();
+ Indicador = drow["Indicador"].ToString().ToEntero();
+ ValorIndicador = drow["ValorIndicador"].ToString().ToEntero();
+ CveSubProyectoIndicador = drow["CveSubProyectoIndicador"].ToString().ToEntero();
+
LtlVinculo.Text = "";
LtlVinculoLink.Text = "";
CveEventoPadre = drow["CveEventoPadre"].ToString().ToEntero();
@@ -1021,8 +1038,15 @@ public partial class OI_TareaDetalle : ClsPaginas
using (ClsOIEventos objOI = new ClsOIEventos())
{
+ objOI.IniciaTransacSQL();
+ bool ProcesoOK = false;
if (objOI.UpdateEstatusEvento2(CveEstatus, -1, RCveEvento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtComentarioTerminarpadre.Text))
+ {
+ ProcesoOK = true;
+ }
+
+ if (ProcesoOK)
{
ObjEventosCorreo o = objOI.objCorreo;
if (CveEstatus >= 3)
@@ -1033,31 +1057,22 @@ public partial class OI_TareaDetalle : ClsPaginas
{
pnlfecharealtermino.Visible = false;
}
- //CargaEstatusEventos(DdlEventoEstatus.SelectedValue.ToEntero);
- //if (DdlEventoEstatus.SelectedValue.ToEntero == 3 | DdlEventoEstatus.SelectedValue.ToEntero == 1)
- // EnviarCorreoCambioEstatus(false);
- //CargaDatos();
if (CveEstatus == 4)
{
TxtAvance.Text = "100";
LblPorcentaje.Text = string.Format("{0:##0.##}", "100".ToDecimal());
- }
- string mensaje = string.Format("Se cambió el Estatus de \"{0}\" a \"{1}\"", DdlEventoEstatus.SelectedItem.Text, DDlEstatus.SelectedItem.Text);
- DdlEventoEstatus.SelectedValueExist(DDlEstatus.SelectedValue);
- lblEstatus.Text = DdlEventoEstatus.SelectedItem.Text;
- UpEstatus.Update();
- RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus));
- Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion);
- cargaActividades(objOI);
+ }
string Nombrede = "";
string Nombrepara = "";
+
System.Data.DataTable dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa);
if (dt.Rows.Count > 0)
{
Nombrede = dt.Rows[0]["Nombre"].ToString();
}
+
dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa);
if (dt.Rows.Count > 0)
{
@@ -1068,10 +1083,46 @@ public partial class OI_TareaDetalle : ClsPaginas
DateTime FFin = txtFechaF.Text.ToDateTimeExcat();
if (o != null)
{
- string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, fInicio,FFin, o.Prioridad, o.Tema, Nombrede, Nombrepara, string.Format("Tarea Estatus Actualizado ({0})", o.Estatus));
+ string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, fInicio, FFin, o.Prioridad, o.Tema, Nombrede, Nombrepara, string.Format("Tarea Estatus Actualizado ({0})", o.Estatus));
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
+ }
+ if (ProcesoOK && CveIndicador > 0 && (DDlEstatus.SelectedValue.ToEntero() == 3 || DDlEstatus.SelectedValue.ToEntero() == 4)){
+ if(Indicador == 1)
+ {
+ int Valor = 0;
+ int dias = (int) (txtFechaF.Text.ToDate() - NowADS()).TotalDays;
+ if (dias >= -2)
+ {
+ Valor = 1;
+ }
+
+ if (!objOI.UpdateIndicador(CveIndicador, Valor, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
+ {
+ ProcesoOK = false;
+ }
+ }
+ }
+
+ if (ProcesoOK){
+
+ cargaActividades(objOI);
+
+ objOI.Commit();
+
+ string mensaje = string.Format("Se cambió el Estatus de \"{0}\" a \"{1}\"", DdlEventoEstatus.SelectedItem.Text, DDlEstatus.SelectedItem.Text);
+ DdlEventoEstatus.SelectedValueExist(DDlEstatus.SelectedValue);
+ lblEstatus.Text = DdlEventoEstatus.SelectedItem.Text;
+ UpEstatus.Update();
+ RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus));
+
+ Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion);
+
+
+ }
+ else{
+ objOI.RollBack();
}
}
diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx
index 2d01f9a80..86deadc43 100644
--- a/Transportes/RepContratos.aspx
+++ b/Transportes/RepContratos.aspx
@@ -269,7 +269,7 @@