diff --git a/OI/MinutaDetalle.aspx b/OI/MinutaDetalle.aspx
index 3741aaf64..eb0affbd6 100644
--- a/OI/MinutaDetalle.aspx
+++ b/OI/MinutaDetalle.aspx
@@ -139,13 +139,20 @@
+
+
Guardar
Enviar Minuta
-
Terminar y Enviar Minuta
+
Terminar y Enviar Minuta
+
@@ -696,6 +703,37 @@
+
+
@@ -925,14 +963,69 @@
// https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData
alert(editor.getData());
}
+ function AgendarSiguienteReunion() {
+ $('.LnkTerminarMinuta').confirmation({
+ title: '¿Agendar Siguiente Reunión?',
+ btnOkClass: 'btn btn-sm btn-danger',
+ btnOkLabel: 'No',
+ btnOkIcon: '',
+ btnCancelClass: 'btn btn-sm btn-default',
+ btnCancelLabel: 'Si',
+ btnCancelIcon: 'glyphicon glyphicon-ok',
+ onCancel: function (event, element) { /*Alert('se agendo la siguiente reunion;');*/ $('#idDivAgendarMinuta').modal(); return false; /*event.preventDefault();*/ },
+ });
+ $('.LnkTerminarMinuta').removeClass('LnkTerminarMinuta');
+ //data-toggle="confirmation" data-popout="true" data-original-title="¿Agendar Siguiente Reunión?" data-btn-ok-label="No"
+ //data-btn-cancel-label="si" data-on-cancel="debugger;event.preventDefault();Alert('se agendo la siguiente reunion;')"
+ }
+ function CargaPickers() {
+ $.datetimepicker.setLocale('es');
+ $('input.ADDateTimePicker').each(function () {
+ var TThis = $(this);
+ TThis.datetimepicker({
+ dayOfWeekStart: 1,
+ lang: 'es',
+ format: 'd/m/Y H:i',
+ formatDate: 'd/m/Y H:i',
+ step: 30
+ });
+ var Div = TThis.parent()
+ var boton = document.createElement('span');
+ boton.className = "input-group-btn"
+
+ var subboton = document.createElement('a')
+ subboton.className = "btn default btnCalendar"
+ subboton.innerHTML = ""
+ subboton.addEventListener('click', function () {
+ TThis.datetimepicker('show')
+ });
+ boton.appendChild(subboton)
+
+ var agregar = true;
+ for (var i = 0; i < Div[0].children.length; i++) {
+ if (Div[0].children[i].isEqualNode(boton)) {
+ agregar = false;
+ }
+ }
+ if (agregar) {
+ Div[0].appendChild(boton);
+ }
+ //Div[0].appendChild(boton)
+
+ });
+
+
+ }
function ADSReady() {
+ CargaPickers();
SetEditor();
CargaPickers();
loadeventos();
showhideUser();
setchecklist();
+ AgendarSiguienteReunion();
}
diff --git a/OI/MinutaDetalle.aspx.cs b/OI/MinutaDetalle.aspx.cs
index 529a1d2fd..c76ab7ef3 100644
--- a/OI/MinutaDetalle.aspx.cs
+++ b/OI/MinutaDetalle.aspx.cs
@@ -98,6 +98,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
LnkEnviarMinuta.Visible = false;
TxtAsunto.Enabled = false;
TxtDescripcion.Enabled = false;
+ TxtCorreoExterno.Enabled = false;
tareanueva.CveEventoPadre = RCveEvento;
//LnkUpFileVisible = true;
//LnkUpUsuariosVisible = true;
@@ -125,7 +126,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
CveUsuarioDe = drow["CveUsuarioDe"].ToString().ToEntero();
CveUsuarioPara = drow["CveUsuarioPara"].ToString().ToEntero();
int CveEventoEstatus = drow["CveEventoEstatus"].ToString().ToEntero();
- if (CveEventoEstatus ==4)
+ if (CveEventoEstatus == 4)
{
LnkEnviarMinuta.Visible = true;
LnkSaveAcuerdos.Visible = false;
@@ -182,7 +183,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
CheckBox ChkOk = gvRow.FCCheckBox("ChkOk");
- if (CveUsuario.Contiene(LCveUsuarioCCP.ToArray()))
+ if (CveUsuario.Contiene(LCveUsuarioCCP.ToArray()))
{
ChkOk.Checked = true;
}
@@ -448,13 +449,13 @@ public partial class OI_MinutaDetalle : ClsPaginas
CheckBox ChkOk = gvRow.FCCheckBox("ChkOk");
if (ChkOk.Checked)
{
- int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
+ int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
listaCCP.Add(CveUsuario);
}
}
}
int cveUsuarioPara = DdlTareaPara.SelectedValue.ToEntero();
-
+
OITipoEventos cveTipoEvento = OITipoEventos.Tarea;
string asunto = TxtTareaAsunto.Text;
string descripcion = TxtTareaDescripcion.Text;
@@ -513,12 +514,12 @@ public partial class OI_MinutaDetalle : ClsPaginas
if (cveUsuarioDe <= 0)
{
- errorMessage = "No se selecciono el miembro 'C C Para'";
+ errorMessage = "Asegúrese de seleccionar al menos un miembro \"C C Para\"";
}
if (cveUsuarioPara <= 0)
{
- errorMessage = "No se selecciono el miembro 'Para'";
+ errorMessage = "Asegúrese de seleccionar al menos un miembro \"Para\"";
}
if (errorMessage.Length == 0)
@@ -536,7 +537,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
using (ClsOIEventos objOI = new ClsOIEventos())
{
objOI.IniciaTransacSQL();
- Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento);
+ Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento);
CveEvento = objOI.CveEvento;
Folio = objOI.Folio;
if (CveEvento == 0)
@@ -637,12 +638,12 @@ public partial class OI_MinutaDetalle : ClsPaginas
if (cveUsuarioDe <= 0)
{
- errorMessage = "No se selecciono el miembro 'C C Para'";
+ errorMessage = "Asegúrese de seleccionar al menos un miembro \"C C Para\"";
}
if (cveUsuarioPara <= 0)
{
- errorMessage = "No se selecciono el miembro 'Para'";
+ errorMessage = "Asegúrese de seleccionar al menos un miembro \"Para\"";
}
if (errorMessage.Length == 0)
@@ -1164,7 +1165,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
protected void LnkSaveAcuerdos_Click(object sender, EventArgs e)
{
- using (ClsOIEventos ObjEventos =new ClsOIEventos()) {
+ using (ClsOIEventos ObjEventos = new ClsOIEventos())
+ {
ObjEventos.UpdateEventoMinuta(TxtAsunto.Text, TxtDescripcion.Text, TxtAcuerdos.Text.Replace("< ", "<"), new DateTime(1999, 1, 1), "-1", RCveEvento);
}
}
@@ -1173,4 +1175,95 @@ public partial class OI_MinutaDetalle : ClsPaginas
{
cargarAgenda();
}
+
+ protected void BtnTerminarYAgendar_Click(object sender, EventArgs e)
+ {
+
+
+
+ string errorMessage = "";
+
+
+ int cveUsuarioDe = UsuarioActual.CveUsuario;
+ List listaCCP = new List();
+ //int cveUsuarioPara = CveUsuarioPara;
+
+ OITipoEventos cveTipoEvento = OITipoEventos.Agenda;
+ string asunto = TxtAgendaAsunto.Text;
+ string descripcion = string.Format("siguiente reunión Minuta \"{0}\"", TxtAsunto.Text);
+ int prioridad = 1;
+ int cveAgendaTipo = 4;
+ string fechaInicio = "";
+ string fechaFin = "1900/01/01 00:00";
+ if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
+ {
+ if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
+ {
+ errorMessage = "No se ingresó una fecha de inicio valida";
+
+ }
+ else
+ {
+ fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm");
+ fechaFin = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").AddHours(2).ToString("yyyy/MM/dd HH:mm");
+ }
+ }
+ else
+ {
+ fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
+ fechaFin = txtFechaI.Text.ToDateTimeExcat().AddHours(2).ToString("yyyy/MM/dd HH:mm");
+ }
+ int cveRevision = -1;
+ string archivoname = "";
+
+
+
+ int cveUsuarioIng = UsuarioActual.CveUsuario;
+ int cveEmpresa = UsuarioActual.CveEmpresa;
+ bool Continuar = true;
+ int Folio = -1;
+ int CveEvento = -1;
+
+ if (errorMessage.Length == 0)
+ {
+
+ List chkList = new List();
+ using (ClsOIEventos objOI = new ClsOIEventos())
+ {
+ objOI.IniciaTransacSQL();
+ foreach (var cveUsuarioPara in LCveUsuarioCCP)
+ {
+ if (Continuar)
+ {
+ Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEvento, null, cveAgendaTipo);
+ CveEvento = objOI.CveEvento;
+ Folio = objOI.Folio;
+ if (CveEvento == 0)
+ {
+ Continuar = false;
+ }
+ }
+ }
+ if (Continuar)
+ {
+ objOI.Commit();
+
+ }
+ else
+ {
+ objOI.RollBack();
+ Continuar = false;
+ }
+ }
+ if (Continuar && CveEvento > 0)
+ {
+
+ LnkTerminarMinuta_Click(null, null);
+ //this.Alert("Se ha agregadó la nueva agenda", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("window.open(\"/OI/TareaDetalle.aspx?CveEvento={0}\", \"_blank\");", CveEvento));
+ }
+ }
+ }
+
+
+
}
\ No newline at end of file
diff --git a/OI/TareaDetalle.aspx b/OI/TareaDetalle.aspx
index 4c24fff16..550252871 100644
--- a/OI/TareaDetalle.aspx
+++ b/OI/TareaDetalle.aspx
@@ -158,6 +158,8 @@
Actualizar Miembros
Reasignar
+
+ Agregar Vinculo
@@ -223,7 +225,7 @@