Files
SIG/OI/TareaDetalle.aspx.cs
Antonio Gonzalez 194bf6024a commit por protocolo
2020-05-07 18:26:51 -07:00

1717 lines
92 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
using System.IO;
using Microsoft.Reporting.WebForms;
public partial class OI_TareaDetalle : ClsPaginas
{
private class OI_TareaDetalle_Permisos
{
public bool EntrarOI;
public bool CheckList;
public bool EdicionGeneral;
public bool Bitacora;
public bool Avance;
public bool Reasignar;
public bool Estatus1_2_3;
public bool Estatus4_5;
}
#region Propiedades
public const string iddivAgregarMiembros = "iddivAgregarMiembros";
public const string iddivAgregar = "divModalAgregarActividad";
public const string iddivAgregarArchivo = "divModalAgregarArchivo";
public const string iddivAgregarTema = "divModalAgregartema";
public const string iddivCambiarEstatus = "divModalCambiarEstatus";
public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
public int Folio { get { return ViewState["Folio"] != null ? ViewState["Folio"].ToString().ToEntero() : 0; } set { ViewState["Folio"] = value; } }
public decimal Avance { get { return ViewState["Avance"] != null ? ViewState["Avance"].ToString().ToEntero() : 0; } set { ViewState["Avance"] = value; } }
public int CveEventoPadre { get { return ViewState["CveEventoPadre"].ToString().ToEntero(); } set { ViewState["CveEventoPadre"] = value; } }
public int CveUsuarioPara { get { return ViewState["CveUsuarioPara"].ToString().ToEntero(); } set { ViewState["CveUsuarioPara"] = value; } }
public int CveUsuarioDe { get { return ViewState["CveUsuarioDe"].ToString().ToEntero(); } set { ViewState["CveUsuarioDe"] = value; } }
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
private OI_TareaDetalle_Permisos Permisos { get { return ViewState["Permisos"] == null ? null : (OI_TareaDetalle_Permisos)ViewState["Permisos"]; } set { ViewState["Permisos"] = value; } }
public bool EsNuevo { get { return Convert.ToBoolean(ViewState["EsNuevo"]); } set { ViewState["EsNuevo"] = value; } }
public bool LnkAgregarCheckListVisible { get { return Convert.ToBoolean(ViewState["LnkAgregarCheckListVisible"]); } set { ViewState["LnkAgregarCheckListVisible"] = value; } }
public bool LnkUpFileVisible { get { return Convert.ToBoolean(ViewState["LnkUpFileVisible"]); } set { ViewState["LnkUpFileVisible"] = value; } }
public bool LnkUpUsuariosVisible { get { return Convert.ToBoolean(ViewState["LnkUpUsuariosVisible"]); } set { ViewState["LnkUpUsuariosVisible"] = 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; } }
private string DeProp{get{return ViewState["DeProp"].ToString();}set{ViewState["DeProp"] = value;}}
private string ParaProp { get { return ViewState["ParaProp"].ToString(); } set { ViewState["ParaProp"] = value; } }
private string CCProp { get { return ViewState["CCProp"].ToString(); } set { ViewState["CCProp"] = value; } }
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
CveEventoPadre = 0;
portletvinculos.Visible = false;
LnkAgregarCheckListVisible = true;
LnkUpFileVisible = false;
LnkUpUsuariosVisible = false;
EsNuevo = true;
CveUsuarioPara = 0;
CveUsuarioDe = 0;
if (Request["Archivo"] != null)
{
string strArchivo = string.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ModExtensiones.Decripta(Request["Archivo"].ToString()));
if (System.IO.File.Exists(strArchivo))
{
try
{
string filename = ModExtensiones.Decripta(Request["filename"].ToString());
System.IO.FileInfo file = new System.IO.FileInfo(strArchivo);
string mimeType = "text/plain";
try { mimeType = MimeMapping.GetMimeMapping(strArchivo); }
catch (Exception) { }
// Response.Write(path)
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(filename)}");
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = mimeType;
Response.Flush();
Response.TransmitFile(file.FullName);
Response.End();
}
catch (Exception)
{
this.RegistraScript("window.close();");
}
}
else
{
this.RegistraScript("window.close();");
}
}
else
{
CargaTemas();
CargaEstatus();
cargaUsuarios();
if (Request["CveEvento"] != null)
{
RCveEvento = Request["CveEvento"].ToString().ToEntero();
}
if (RCveEvento > 0)
{
LnkAddTtemaB.Visible = false;
EsNuevo = false;
LoadTarea();
}
else
{
TxtIsnewtarea.Text = "1";
portletActividades.Visible = false;
LnkcambiarEstatus.Visible = false;
LnkAgregarTema.Visible = false;
portletEstatus.Visible = false;
LtlTitulo.Text = "Tarea Nueva";
TxtArchivo.Visible = true;
CveUsuarioDe = UsuarioActual.CveUsuario;
}
SetUsuarios();
Setpermisos();
HypArchivo.Visible = !TxtArchivo.Visible;
}
}
}
private void Setpermisos()
{
bool esmiembro = UsuarioActual.CveUsuario.Contiene(LCveUsuarioCCP.ToArray<int>());
bool esdeel = UsuarioActual.CveUsuario == CveUsuarioDe;
bool esPara = UsuarioActual.CveUsuario == CveUsuarioPara;
Permisos = new OI_TareaDetalle_Permisos
{
EntrarOI = (EsNuevo || esmiembro),
CheckList = (EsNuevo || esdeel || esPara),
EdicionGeneral = (EsNuevo || esdeel),
Bitacora = esmiembro,
Avance = esPara,
Reasignar = esPara,
Estatus1_2_3 = esPara,
Estatus4_5 = esdeel
};
#region Permisos.EntrarOI
if (!Permisos.EntrarOI)
{
Alert("No tiene permiso para entrar al evento", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
UpAcciones.Visible = Permisos.EntrarOI;
UpTitulo.Visible = Permisos.EntrarOI;
UpContenido.Visible = Permisos.EntrarOI;
if (Permisos.EntrarOI && !UsuarioActual.CveUsuario.Contiene(LcveuserVisto.ToArray<int>()))
{
using (ClsOIEventos oieve = new ClsOIEventos())
{
oieve.UpUsuarioseventosVisto(RCveEvento, UsuarioActual.CveUsuario);
LcveuserVisto.Add(UsuarioActual.CveUsuario);
}
}
#endregion
#region Permisos.CheckList
LnkSinfuncion.Visible = Permisos.CheckList;
LnkAgregarchklistitem.Visible = Permisos.CheckList;
LnkAgregarCheckList.Visible = Permisos.CheckList && LnkAgregarCheckListVisible;
GVcheklist.Columns[0].Visible = Permisos.CheckList;
GVcheklist.Columns[3].Visible = Permisos.CheckList;
#endregion
#region Permisos.EdicionGeneral
LnkGuardar.Visible = Permisos.EdicionGeneral;
TxtAsunto.Enabled = Permisos.EdicionGeneral;
TxtDescripcion.Enabled = Permisos.EdicionGeneral;
LnkUpFile.Visible = Permisos.EdicionGeneral && LnkUpFileVisible;
LnkUpUsuarios.Visible = Permisos.EdicionGeneral && LnkUpUsuariosVisible;
DdlPrioridad.Enabled = Permisos.EdicionGeneral;
DdlTema.Enabled = Permisos.EdicionGeneral;
DdlPrioridad.Enabled = Permisos.EdicionGeneral;
txtFechaF.Enabled = Permisos.EdicionGeneral;
txtFechaI.Enabled = Permisos.EdicionGeneral;
#endregion
#region Permisos.Bitacora
LnkAgregarActividad.Visible = Permisos.Bitacora;
#endregion
#region Permisos.Avance
BtnUpAvance.Visible = Permisos.Avance;
TxtAvance.Enabled = Permisos.Avance;
#endregion
#region Permisos.Reasignar
LnkReasignar.Visible = Permisos.Reasignar;
#endregion
List<ListItem> itemremove = new List<ListItem>();
foreach (ListItem item in DDlEstatus.Items)
{
switch (item.Value.ToEntero())
{
case 1:
case 2:
case 3:
if (!Permisos.Estatus1_2_3 && !item.Selected)
{
itemremove.Add(item);
//DDlEstatus.Items.Remove(item);
}
break;
case 4:
case 5:
if (!Permisos.Estatus4_5 && !item.Selected)
{
itemremove.Add(item);
//DDlEstatus.Items.Remove(item);
}
break;
}
}
foreach (ListItem item in itemremove)
{
DDlEstatus.Items.Remove(item);
}
LnkcambiarEstatus.Visible = LnkcambiarEstatus.Visible && (Permisos.Estatus1_2_3 || Permisos.Estatus4_5);
UpAcciones.Update();
UpTitulo.Update();
UpContenido.Update();
}
private void CargaTemas()
{
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
private void CargaEstatus()
{
DdlEventoEstatus.DataSource = GlobalDTOIEstatusEventos;//get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DDlEstatus.DataSource = DdlEventoEstatus.DataSource;
DdlEventoEstatus.DataBind();
DDlEstatus.DataBind();
DdlEventoEstatus.Enabled = false;
//DdlEventoEstatus.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
private void cargaUsuarios()
{
string FiltroAD = "";
DdlRoles.DataSource = get_GlobalDTRoles(UsuarioActual.CveEmpresa);
DdlRoles.DataBind();
DdlRoles.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSucursales.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
DdlSucursales.DataBind();
DdlSucursales.Items.Insert(0, new ListItem("Todos", "-1"));
GVUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa);
GVUsuarios.DataBind();
UpUsuarios.Update();
GVUsuarios.DataSource = get_GlobalDTUsuarios().FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1 {1}", UsuarioActual.CveEmpresa, FiltroAD), "Rol ASC");
GVUsuariosB.DataSource = GVUsuarios.DataSource;
GVUsuarios.DataBind();
GVUsuariosB.DataBind();
}
protected void GVUsuariosB_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string CveRol = e.Row.DBCampo("CveRol");
string CveSubProyecto = e.Row.DBCampo("CveSubProyecto");
e.Row.CssClass = "items";
//e.Row.Attributes.Add("data-rol", CveRol);
//e.Row.Attributes.Add("data-sucursal", CveRol);
}
}
protected void GVUsuarios_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string CveRol = e.Row.DBCampo("CveRol");
string CveSubProyecto = e.Row.DBCampo("CveSubProyecto");
e.Row.CssClass = "items";
e.Row.Attributes.Add("data-rol", CveRol);
e.Row.Attributes.Add("data-sucursal", CveRol);
}
}
private void SetUsuarios()
{
StringBuilder StrPara = new StringBuilder();
StringBuilder StrDeUser = new StringBuilder();
StringBuilder StrCCPara = new StringBuilder();
foreach (GridViewRow gvRow in GVUsuariosB.Rows)
{
if (gvRow.RowType == DataControlRowType.DataRow)
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
CheckBox chkpara = gvRow.FCCheckBox("ChkPara");
CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP");
chkpara.Checked = false;
chkCCpara.Checked = false;
if (EsNuevo)
{
chkpara.Enabled = true;
chkCCpara.Enabled = true;
if (CveUsuario == UsuarioActual.CveUsuario)
{
chkCCpara.Checked = true;
chkCCpara.Enabled = false;
}
}
else
{
chkpara.Enabled = false;
chkCCpara.Enabled = false;
}
string palomitavisto = "";
string palomitasinver = "<i class=\"fa fa-check\" aria-hidden=\"true\"></i>";
if (CveUsuario == UsuarioActual.CveUsuario || CveUsuario.Contiene(LcveuserVisto.ToArray<int>()))
{
palomitavisto = palomitasinver;
palomitasinver = "";
}
if ((CveUsuario == CveUsuarioPara) || (CveUsuario == CveUsuarioDe))
{
if (CveUsuario == CveUsuarioPara)
{
chkpara.Checked = true;
StrPara.AppendFormat("{3}<span class=\"linkCorreo\" data-toggle=\"tooltip\" title=\"{1}\">{2}\"{0}\"</span>", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver);
ParaProp = gvRow.DataKey("Nombre").ToString();
}
if (CveUsuario == CveUsuarioDe)
{
chkCCpara.Checked = true;
StrDeUser.AppendFormat("{3}<span class=\"linkCorreo\" data-toggle=\"tooltip\" title=\"{1}\">{2}\"{0}\"</span>", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver);
DeProp = gvRow.DataKey("Nombre").ToString();
}
}
else if (CveUsuario.Contiene(LCveUsuarioCCP.ToArray<int>()))
{
chkCCpara.Checked = true;
StrCCPara.AppendFormat("{3}<span class=\"linkCorreo cssnowrap\" data-toggle=\"tooltip\" title=\"{1}\">{2}\"{0}\"</span>; ", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver);
CCProp = gvRow.DataKey("Nombre");
}
}
}
LtlPara.Text = StrPara.ToString();
LtlDeUser.Text = StrDeUser.ToString();
int longitud = StrCCPara.ToString().Length;
if (longitud > 0)
{
LtlCCPara.Text = StrCCPara.ToString().Substring(0, longitud - 1);
}
else
{
LtlCCPara.Text = "";
}
}
public void LoadTarea()
{
GVcheklist.DataSource = new System.Data.DataTable();
using (ClsOIEventos ObjOI_E = new ClsOIEventos())
{
if (ObjOI_E.GetEventos2(RCveEvento, UsuarioActual.CveEmpresa) && ObjOI_E.DtResultados.Rows.Count > 0)
{
PnlUsuarios.Visible = true;
portletMiembros.Visible = false;
LnkUpFileVisible = true;
LnkUpUsuariosVisible = true;
System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0];
Folio = drow["Folio"].ToString().ToEntero();
Avance = drow["Avance"].ToString().ToDecimal();
TxtAsunto.Text = drow["Asunto"].ToString();
TxtDescripcion.Text = drow["Descripcion"].ToString();
DdlPrioridad.SelectedValueExist(drow["Prioridad"].ToString());
txtFechaI.Text = string.Format("{0:dd/MM/yyyy HH:mm}", drow["FechaInicio"]);
txtFechaF.Text = string.Format("{0:dd/MM/yyyy HH:mm}", drow["FechaFin"]);
DdlTema.SelectedValueExist(drow["CveRevision"].ToString());
DdlEventoEstatus.SelectedValueExist(drow["CveEventoEstatus"].ToString());
lblEstatus.Text = DdlEventoEstatus.SelectedItem.Text;
DDlEstatus.SelectedValueExist(drow["CveEventoEstatus"].ToString());
HypArchivo.Text = string.Format("{0}<br /><i class=\"fa fa-download\"></i>", drow["Archivo"].ToString());
HypArchivo.NavigateUrl = string.Format("~/OI/TareaDetalle.aspx?Archivo={0}&filename={1}", ModExtensiones.Encripta(string.Format("OIFiles\\{0}\\{1}", Folio, drow["Archivo"])), ModExtensiones.Encripta(drow["Archivo"].ToString()));
TxtArchivo.Visible = (drow["Archivo"].ToString().Length == 0);
portletArchivo.Visible = !TxtArchivo.Visible;
LnkUpFile.Text = (portletArchivo.Visible ? "<i class=\"fa fa-pencil\"></i> Actualizar archivo" : "<i class=\"fa fa-plus\"></i> Agregar archivo");
Literal3.Text = portletArchivo.Visible ? "Actualizar archivo" : "Agregar archivo";
BtnActualizarArchivo.Text = portletArchivo.Visible ? "Actualizar" : "Agregar";
CveUsuarioDe = drow["CveUsuarioDe"].ToString().ToEntero();
CveUsuarioPara = drow["CveUsuarioPara"].ToString().ToEntero();
TxtAvance.Text = string.Format("{0:##0}", drow["Avance"]);
TxtUsuarioreg.Text = string.Format("{0}", drow["NombreRegistro"]);
TxtFechaIng.Text = string.Format("{0:dd/MM/yyyy HH}:{0:mm}", drow["FechaIng"]);
//OIE.[CveEvento], OIE.[CveTipoEvento], OIE.[Folio], OIE.[Asunto], OIE.[Descripcion], OIE.[Prioridad], OIE.[CveUsuarioDe], OIE.[CveUsuarioPara],
//OIE.[CveEventoEstatus], OIE.[FechaInicio], OIE.[FechaFin], OIE.[FechaRealTermino], OIE.[CveRevision], OIE.[Archivo], OIE.[FechaIng],
//OIE.[CveUsuarioIng], OIE.[CveEmpresa], OIE.[CveUsuarioModifico], OIE.[Avance]
LtlVinculo.Text = "";
LtlVinculoLink.Text = "";
CveEventoPadre = drow["CveEventoPadre"].ToString().ToEntero();
int CveCliente = drow["CveCliente"].ToString().ToEntero();
int CveVenta = drow["CveVenta"].ToString().ToEntero();
int CveProveedor = drow["CveProveedor"].ToString().ToEntero();
int CveCompra = drow["CveCompra"].ToString().ToEntero();
int CvePersonal = drow["CvePersonal"].ToString().ToEntero();
//int = drow[""].ToString().ToEntero();
string titulo = "";
string link = "";
if (CveCliente > 0)
{
titulo = "Cliente: ";
link = string.Format("<a href=\"/Ventas/Clientes.aspx?CveCliente={1}\" class=\"linkCorreo\">{0}</a>", drow["Cliente"], CveCliente);
}
else if (CveVenta > 0)
{
titulo = "Venta: ";
link = string.Format("<a href=\"/Ventas/Ventas.aspx?CveVenta={1}\" class=\"linkCorreo\">{0} </a>", drow["Venta"], CveVenta);
}
else if (CveProveedor > 0)
{
titulo = "proveedor: ";
link = string.Format("<a href=\"/Compras/Proveedores.aspx?CveProveedor={1}\" class=\"linkCorreo\">{0} </a>", drow["Proveedor"], CveProveedor);
}
else if (CveCompra > 0)
{
titulo = "Compra: ";
link = string.Format("<a href=\"/Compras/Proveedores.aspx?CveProveedor={1}\" class=\"linkCorreo\">{0} </a>", drow["Compra"], CveCompra);
}
else if (CvePersonal > 0)
{
titulo = "Personal: ";
link = string.Format("<a href=\"/RH/Personal.aspx?CvePersonal={1}\" class=\"linkCorreo\">{0} </a>", drow["NombreCompleto"], CvePersonal);
}
if(titulo.Length > 0)
{
LtlVinculo.Text= string.Format("<div class=\"panel panel-default\" style=\"margin-bottom: 5px;\"><div class=\"panel-heading\" style=\"display: inline-block; width: 19%; border-bottom-width: 0px; margin: 0px;\"><h3 class=\"panel-title\">{0}</h3></div><div class=\"panel-body\" style=\"display: inline-block; width: 79%;\">{1}</div></div>",
titulo, link);
}
titulo = "";
link = "";//EP.[CveTipoEvento] CveTipoEventoPadre,EP.Asunto AS AsuntoPadre
switch (drow["CveTipoEventoPadre"].ToString().ToEntero())
{
case (int)OITipoEventos.Proyecto:
titulo = "Proyecto: ";
link = string.Format("<a href=\"/OI/Proyecto.aspx?CveEvento={1}\" class=\"linkCorreo\">{0} </a>", drow["AsuntoPadre"], drow["CveEventoPadre"]);
break;
case (int)OITipoEventos.Minuta:
titulo = "Minuta: ";
link = string.Format("<a href=\"/OI/MinutaDetalle.aspx?CveEvento={1}\" class=\"linkCorreo\">{0} </a>", drow["AsuntoPadre"], drow["CveEventoPadre"]);
break;
default:
break;
}
if (titulo.Length > 0)
{
LtlVinculoLink.Text = string.Format("<div class=\"panel panel-default\" style=\"margin-bottom: 5px;\"><div class=\"panel-heading\" style=\"display: inline-block; width: 19%; border-bottom-width: 0px; margin: 0px;\"><h3 class=\"panel-title\">{0}</h3></div><div class=\"panel-body\" style=\"display: inline-block; width: 79%;\">{1}</div></div>",
titulo, link);
}
//,OIE.CveCliente,OIE.CveVenta,OIE.CveProveedor,OIE.CveCompra,OIE.CvePersonal
//,C.Nombre Cliente, CONCAT(V.SerieFolio, '(', CV.Nombre, ')') Venta ,Prov.NombreComercial AS Proveedor,
//CONCAT(Comp.SerieFolio, '(', CompProv.NombreComercial, ')') Compra,RH.NombreCompleto
LtlTitulo.Text = drow["Titulo"].ToString();
if (ObjOI_E.GetEventosUsuario2(RCveEvento, UsuarioActual.CveEmpresa))
{
LCveUsuarioCCP.Clear();
foreach (System.Data.DataRow item in ObjOI_E.DtResultados.Select("CveEvento >0"))
{
int CveUsuario = item["CveUsuario"].ToString().ToEntero();
LCveUsuarioCCP.Add(CveUsuario);
if (item["Visto"].ToString().ToEntero() == 1)
{
LcveuserVisto.Add(CveUsuario);
}
}
}
if (ObjOI_E.GetEventosVinculos(RCveEvento, UsuarioActual.CveEmpresa))
{
GVVinculo.DataSource = ObjOI_E.DtResultados;
GVVinculo.DataBind();
portletvinculos.Visible = (ObjOI_E.DtResultados.Rows.Count > 0);
}
if (ObjOI_E.Getcheklist(RCveEvento))
{
GVcheklist.DataSource = ObjOI_E.DtResultados;
if (ObjOI_E.DtResultados.Rows.Count > 0)
{
portletChekList.Visible = true;
LnkAgregarCheckListVisible = false;
}
}
cargaActividades(ObjOI_E);
}
}
GVcheklist.DataBind();
}
protected void LnkGuardar_Click(object sender, EventArgs e)
{
string errorMessage = "";
if (EsNuevo)
{
int cveUsuarioDe = UsuarioActual.CveUsuario;
List<int> listaCCP = new List<int>();
int cveUsuarioPara = -1;
foreach (GridViewRow gvRow in GVUsuariosB.Rows)
{
if (gvRow.RowType == DataControlRowType.DataRow)
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
CheckBox chkpara = gvRow.FCCheckBox("ChkPara");
CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP");
if (chkpara.Checked)
{
cveUsuarioPara = CveUsuario;
}
if (chkCCpara.Checked)
{
listaCCP.Add(CveUsuario);
//cveUsuarioDe = CveUsuario;
}
}
}
//if (!cveUsuarioDe.Contiene(listaCCP.ToArray<int>()))
//{
// listaCCP.Add(cveUsuarioDe);
//}
//if (!cveUsuarioPara.Contiene(listaCCP.ToArray<int>()))
//{
// listaCCP.Add(cveUsuarioPara);
//}
OITipoEventos cveTipoEvento = OITipoEventos.Tarea;
string asunto = TxtAsunto.Text;
string descripcion = TxtDescripcion.Text;
int prioridad = DdlPrioridad.SelectedValue.ToEntero();
string fechaInicio = "";
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");
}
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
string fechaFin = "";
if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999)
{
if (txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
{
errorMessage = "No se ingresó una fecha fin valida";
}
else
{
fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy"));
}
}
else
{
fechaFin = txtFechaF.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
int cveRevision = DdlTema.SelectedValue.ToEntero();
string archivoname = "";
string rutaarchivoOri = "";
string ArchivoExtencion = "";
foreach (Archivo item in TxtArchivo.getfiles().Archivos)
{
archivoname = item.filenameO;
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
}
int cveUsuarioIng = UsuarioActual.CveUsuario;
int cveEmpresa = UsuarioActual.CveEmpresa;
bool Continuar = false;
int Folio = -1;
int CveEvento = -1;
if (cveUsuarioDe <= 0)
{
errorMessage = "No se selecciono el miembro 'C C Para'";
}
if (cveUsuarioPara <= 0)
{
errorMessage = "No se selecciono el miembro 'Para'";
}
if (errorMessage.Length == 0)
{
List<string> chkList = new List<string>();
if (CheckListNew != null)
{
foreach (System.Data.DataRow item in CheckListNew.Rows)
{
chkList.Add(item["EventoComentario"].ToString());
}
}
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);
CveEvento = objOI.CveEvento;
Folio = objOI.Folio;
if (CveEvento == 0)
{
Continuar = false;
}
if (Continuar)
{
objOI.Commit();
ObjEventosCorreo o = objOI.objCorreo;
string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
else
{
objOI.RollBack();
Continuar = false;
}
}
if (Continuar && CveEvento > 0)
{
if (rutaarchivoOri.Length > 0)
{
string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}\\", ruta, Folio);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion);
System.IO.File.Move(rutaarchivoOri, ruta);
}
this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento));
}
}
}
else
{
string asunto = TxtAsunto.Text;
string descripcion = TxtDescripcion.Text;
int prioridad = DdlPrioridad.SelectedValue.ToEntero();
string fechaInicio = "";
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");
}
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
string fechaFin = "";
if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999)
{
if (txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
{
errorMessage = "No se ingresó una fecha fin valida";
}
else
{
fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy"));
}
}
else
{
fechaFin = txtFechaF.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
int cveRevision = DdlTema.SelectedValue.ToEntero();
bool Continuar = true;
using (ClsOIEventos objOI = new ClsOIEventos())
{
objOI.IniciaTransacSQL();
Continuar = objOI.UP_Eventos2(RCveEvento, asunto, descripcion, prioridad, fechaInicio, fechaFin, cveRevision, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
if (Continuar)
{
objOI.Commit();
ObjEventosCorreo o = objOI.objCorreo;
string mailbody = MailgetBodyActualizartarea(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
else
{
objOI.RollBack();
Continuar = false;
}
}
if (Continuar)
{
using (ClsOIEventos objOI = new ClsOIEventos())
{
cargaActividades(objOI);
}
this.Alert("Se actualizó la tarea", ModExtensiones.TipoMensaje.MsgInformacion);
}
}
if (errorMessage.Length > 0)
{
this.Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
private void cargaActividades(ClsOIEventos ObjOI)
{
GvActividades.DataSource = null;
if (ObjOI.GetEventosComentarios(RCveEvento))
{
GvActividades.DataSource = ObjOI.DtResultados;
}
GvActividades.DataBind();
UpActividades.Update();
}
protected void LnkEliminarchek_Click(object sender, EventArgs e)
{
GridViewRow gvrow = (GridViewRow)((LinkButton)sender).NamingContainer;
if (EsNuevo)
{
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))
{
Alert("Se ha eliminadó la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
if (objOI.Getcheklist(RCveEvento))
{
GVcheklist.DataSource = objOI.DtResultados;
GVcheklist.DataBind();
cargaActividades(objOI);
}
}
}
}
}
protected void LnkAgregarCheckList_Click(object sender, EventArgs e)
{
portletChekList.Visible = true;
LnkAgregarCheckListVisible = false;
if (RCveEvento > 0)
{
}
else
{
GVcheklist.Columns[0].Visible = false;
CheckListNew = new System.Data.DataTable();
//CveEventoCheckList,CveEvento,CveTipoEvento,EventoComentario,Estatus,CveUsuario,Usuario,FechaIng
CheckListNew.Columns.Add("CveEventoCheckList", typeof(int));
CheckListNew.Columns.Add("CveEvento", typeof(int));
CheckListNew.Columns.Add("CveTipoEvento", typeof(int));
CheckListNew.Columns.Add("EventoComentario", typeof(String));
CheckListNew.Columns.Add("Estatus", typeof(bool));
CheckListNew.Columns.Add("CveUsuario", typeof(int));
CheckListNew.Columns.Add("Usuario", typeof(string));
CheckListNew.Columns.Add("FechaIng", typeof(DateTime));
}
TxtActividad.Focus();
RegistraScript("$('#C_portletChekList .expand').removeClass('expand').addClass('collapse');$('#C_portletChekList .portlet-body').show();");
UpChkList.Update();
}
protected void LnkAgregarchklistitem_Click(object sender, EventArgs e)
{
if (TxtActividad.Text.Trim().Length > 0)
{
if (RCveEvento > 0)
{
using (ClsOIEventos objOI = new ClsOIEventos())
{
if (objOI.Addcheklist(RCveEvento, TxtActividad.Text, UsuarioActual.CveUsuario))
{
Alert("Se agregó la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
if (objOI.Getcheklist(RCveEvento))
{
GVcheklist.DataSource = objOI.DtResultados;
GVcheklist.DataBind();
cargaActividades(objOI);
}
}
}
}
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 LnkSinfuncion_Click(object sender, EventArgs e)
{
// es para mandar llamar el ChkEstatus_CheckedChanged
}
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))
{
Alert("Se actualizó el estatus de la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
if (objOI.Getcheklist(RCveEvento))
{
GVcheklist.DataSource = objOI.DtResultados;
GVcheklist.DataBind();
cargaActividades(objOI);
ObjEventosCorreo o = objOI.objCorreo;
string mailbody = MailgetBodyTareaCheckList(o.Actividad, o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
}
}
}
protected void BtnCambiarEstatus_Click(object sender, EventArgs e)
{
int CveEstatus = DDlEstatus.SelectedValue.ToEntero();
if ((Permisos.Estatus1_2_3 && CveEstatus.Contiene(new int[] { 1, 2, 3 })) || (Permisos.Estatus4_5 && CveEstatus.Contiene(new int[] { 4, 5 })))
{
using (ClsOIEventos objOI = new ClsOIEventos())
{
if (objOI.UpdateEstatusEvento2(CveEstatus, -1, RCveEvento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
//CargaEstatusEventos(DdlEventoEstatus.SelectedValue.ToEntero);
//if (DdlEventoEstatus.SelectedValue.ToEntero == 3 | DdlEventoEstatus.SelectedValue.ToEntero == 1)
// EnviarCorreoCambioEstatus(false);
//CargaDatos();
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();
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus));
Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion);
cargaActividades(objOI);
ObjEventosCorreo o = objOI.objCorreo;
string mailbody = MailgetBodyActualizarEstado(o.Estatus, o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
}
}
else
{
Alert(string.Format("No tiene permiso para cambiar al estatus '{0}'", DDlEstatus.SelectedItem.Text), ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
protected void LnkcambiarEstatus_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivCambiarEstatus));
}
protected void LnkAgregarTema_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema));
}
protected void BtnAgregarTema_Click(object sender, EventArgs e)
{
using (ClsOIEventos objoi = new ClsOIEventos())
{
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
Alert("Tema agregada con éxito.", ModExtensiones.TipoMensaje.MsgInformacion);
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
TxtTema.Text = "";
set_GlobalDTOIRevision(-1, objoi.DtResultados);
CargaTemas();
UpContenido.Update();
}
else { Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError); }
}
}
protected void LnkAgregarActividad_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregar));
}
protected void BtnAgregarComentario_Click(object sender, EventArgs e)
{
string Comentario = TxtComentario.Text;
int CveComentario = 0;
string archivoname = "";
string rutaarchivoOri = "";
string ArchivoExtencion = "";
foreach (Archivo item in Txtfilecomentario.getfiles().Archivos)
{
archivoname = item.filenameO;
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
}
using (ClsOIEventos objoi = new ClsOIEventos())
{
CveComentario = objoi.AddEventoComentario2(RCveEvento, Comentario, archivoname, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
if (CveComentario > 0)
{
cargaActividades(objoi);
ObjEventosCorreo o = objoi.objCorreo;
string mailbody = MailgetBodyTareaComentario(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
}
Txtfilecomentario.Text = "";
if (CveComentario > 0)
{
if (rutaarchivoOri.Length > 0)
{
string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}\\", ruta, Folio);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}{2}", ruta, CveComentario, archivoname);//, ArchivoExtencion);
System.IO.File.Move(rutaarchivoOri, ruta);
}
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregar));
this.Alert("Comentario agregadó", ModExtensiones.TipoMensaje.ToastInformacion);
//this.Alert("Se ha agregado la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento));
}
TxtComentario.Text = "";
}
protected void GvActividades_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
HyperLink HplA = e.Row.FCHyperLink("HplA");
string archivoname = e.Row.DBCampo("Archivo");
string CveComentario = e.Row.DBCampo("CveEventoComentario");
HplA.Visible = archivoname != "";
if (HplA.Visible)
{
HplA.NavigateUrl = string.Format("~/OI/TareaDetalle.aspx?Archivo={0}&filename={1}", ModExtensiones.Encripta(string.Format("OIFiles\\{0}\\{1}", Folio, archivoname)), ModExtensiones.Encripta(archivoname));
}
}
//Visible='<%# Eval("Archivo").ToString() != "" %>' data-archivo ='<%# string.Format("",Eval("CveEventoComentario").ToString()) %>'
//string.Format("~/OI/TareaDetalle.aspx?Archivo={0}&filename={1}", ModExtensiones.Encripta(string.Format("OIFiles\\{0}\\{1}", Folio, drow["Archivo"])), ModExtensiones.Encripta(drow["Archivo"].ToString()))
}
protected void LnkUpFile_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarArchivo));
}
protected void BtnActualizarArchivo_Click(object sender, EventArgs e)
{
string archivoname = "";
string rutaarchivoOri = "";
string ArchivoExtencion = "";
foreach (Archivo item in txtActualizarArchivo.getfiles().Archivos)
{
archivoname = item.filenameO;
ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
}
string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}\\", ruta, Folio);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
string rutafin = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion);
int index = 0;
while (System.IO.File.Exists(rutafin))
{
archivoname = string.Format("{0}{1}", index++, archivoname);
rutafin = string.Format("{0}{1}", ruta, archivoname);
}
System.IO.File.Move(rutaarchivoOri, rutafin);
bool continuar = false;
using (ClsOIEventos objoi = new ClsOIEventos())
{
continuar = objoi.AddUPEventoArchivo(RCveEvento, archivoname, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjEventosCorreo o = objoi.objCorreo;
string mailbody = MailgetBodyActualizararchivo(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
if (continuar)
{
LoadTarea();
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarArchivo));
this.Alert("Archivo Actualizadó", ModExtensiones.TipoMensaje.ToastInformacion);
}
UpContenido.Update();
UpAcciones.Update();
}
protected void BtnUpAvance_Click(object sender, EventArgs e)
{
bool continuar = false;
using (ClsOIEventos objoi = new ClsOIEventos())
{
continuar = objoi.UPEventoAAvance(RCveEvento, TxtAvance.Text.ToDecimal(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
if (continuar)
{
if (objoi.DtResultados.Rows.Count > 0)
{
LtlTitulo.Text = objoi.DtResultados.Rows[0]["Titulo"].ToString();
}
cargaActividades(objoi);
ObjEventosCorreo o = objoi.objCorreo;
string mailbody = MailgetBodyActualizarAvance(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
}
if (continuar)
{
this.Alert("Avance Actualizadó", ModExtensiones.TipoMensaje.ToastInformacion);
}
UpTitulo.Update();
}
protected void LnkAddTtemaB_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema));
}
protected void LnkReasignar_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros));
LtlTituloUsuarios.Text = "Reasignar Tarea";
BtnUpMiembros.Visible = false;
BtnReasignarTarea.Visible = true;
foreach (GridViewRow gvRow in GVUsuarios.Rows)
{
if (gvRow.RowType == DataControlRowType.DataRow)
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
gvRow.FCCheckBox("ChkPara").Checked = false;
CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP");
chkCCpara.Checked = false;
if (CveUsuario == CveUsuarioPara)
{
chkCCpara.Checked = true;
chkCCpara.Enabled = false;
}
}
}
UpUsuarios.Update();
}
protected void LnkUpUsuarios_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros));
LtlTituloUsuarios.Text = "Actualizar miembros";
BtnUpMiembros.Visible = true;
BtnReasignarTarea.Visible = false;
foreach (GridViewRow gvRow in GVUsuarios.Rows)
{
if (gvRow.RowType == DataControlRowType.DataRow)
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
CheckBox chkpara = gvRow.FCCheckBox("ChkPara");
CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP");
chkpara.Checked = false;
chkCCpara.Checked = false;
chkCCpara.Enabled = true;
chkpara.Enabled = true;
if ((CveUsuario == CveUsuarioPara) || (CveUsuario == CveUsuarioDe))
{
if (CveUsuario == CveUsuarioPara)
{
chkpara.Checked = true;
}
if (CveUsuario == CveUsuarioDe)
{
chkCCpara.Checked = true;
}
}
else if (CveUsuario.Contiene(LCveUsuarioCCP.ToArray<int>()))
{
chkCCpara.Checked = true;
}
}
}
UpUsuarios.Update();
}
protected void BtnUpMiembros_Click(object sender, EventArgs e)
{
List<int> listaCCP = new List<int>();
int _cveUsuarioPara = -1;
foreach (GridViewRow gvRow in GVUsuarios.Rows)
{
if (gvRow.RowType == DataControlRowType.DataRow)
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
CheckBox chkpara = gvRow.FCCheckBox("ChkPara");
CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP");
if (chkpara.Checked)
{
_cveUsuarioPara = CveUsuario;
}
if (chkCCpara.Checked)
{
listaCCP.Add(CveUsuario);
//cveUsuarioDe = CveUsuario;
}
}
}
bool continuar = false;
using (ClsOIEventos oieve = new ClsOIEventos())
{
continuar = oieve.UpEventoMiembros(RCveEvento, _cveUsuarioPara, listaCCP, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
if (continuar)
{
cargaActividades(oieve);
}
}
if (continuar)
{
LCveUsuarioCCP = listaCCP;
this.CveUsuarioPara = _cveUsuarioPara;
SetUsuarios();
Setpermisos();
}
UpContenido.Update();
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarMiembros));
}
protected void BtnReasignarTarea_Click(object sender, EventArgs e)
{
string errorMessage = "";
if (!EsNuevo)
{
int cveUsuarioDe = UsuarioActual.CveUsuario;
List<int> listaCCP = new List<int>();
int cveUsuarioPara = -1;
foreach (GridViewRow gvRow in GVUsuarios.Rows)
{
if (gvRow.RowType == DataControlRowType.DataRow)
{
int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero();
CheckBox chkpara = gvRow.FCCheckBox("ChkPara");
CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP");
if (chkpara.Checked)
{
cveUsuarioPara = CveUsuario;
}
if (chkCCpara.Checked)
{
listaCCP.Add(CveUsuario);
//cveUsuarioDe = CveUsuario;
}
}
}
OITipoEventos cveTipoEvento = OITipoEventos.Tarea;
string asunto = TxtAsunto.Text;
string descripcion = TxtDescripcion.Text;
int prioridad = DdlPrioridad.SelectedValue.ToEntero();
string fechaInicio = "";
if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm");
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
string fechaFin = "";
if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999)
{
fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy"));
}
else
{
fechaFin = txtFechaF.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
int cveRevision = DdlTema.SelectedValue.ToEntero();
string archivoname = "";
//string rutaarchivoOri = "";
int cveUsuarioIng = UsuarioActual.CveUsuario;
int cveEmpresa = UsuarioActual.CveEmpresa;
bool Continuar = false;
int Folio = -1;
int CveEvento = -1;
if (cveUsuarioPara <= 0)
{
errorMessage = "No se selecciono el miembro 'Para'";
}
if (cveUsuarioPara == cveUsuarioDe)
{
errorMessage = "Debe reasignar la tarea a otro usuario ";
}
if (errorMessage.Length > 0)
{
Alert(errorMessage, ModExtensiones.TipoMensaje.MsgAdvertencia);
}
else
{
List<string> chkList = new List<string>();
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);
CveEvento = objOI.CveEvento;
Folio = objOI.Folio;
if (CveEvento == 0)
{
Continuar = false;
}
if (Continuar)
{
objOI.Commit();
ObjEventosCorreo o = objOI.objCorreo;
string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
else
{
objOI.RollBack();
Continuar = false;
}
}
}
if (Continuar && CveEvento > 0)
{
this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/TareaDetalle.aspx?CveEvento={0}\");", CveEvento));
}
}
}
#region "Correos"
public void EnviarCorreo(Empresa ObjEmpresa, string Asunto, string body, string Para, string ArrayCC)
{
string a = string.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC);
a.GuardaLog();
ClsSisMail Mail = new ClsSisMail();
List<ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>();
ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail();
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail);
Mail = null;
}
private string GetDominio()
{
return HttpContext.Current.Request.Url.ToString().Replace(HttpContext.Current.Request.Url.PathAndQuery, "");
}
private string getImg()
{
return "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAPEA8PDxASDw8PFRAPDw8QFQ8PFQ8PFREXFhYVFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OFhAQFy0lHh8tLSsrLi0rLS0rLS0tLS0rLS0tLS0tLS0tLy0tLS0tLSstLSstLS0tLS0tKy0tLS0tLf/AABEIAMIBAwMBEQACEQEDEQH/xAAbAAEAAQUBAAAAAAAAAAAAAAAAAwECBAYHBf/EAEIQAAIBAgEFDAgEBQQDAAAAAAABAgMRBBIhMUFRBQYTFDJhcXKBkaGxByIzUlOywdEjQpLSQ2KCo8IkY4PwNKLh/8QAGgEBAAIDAQAAAAAAAAAAAAAAAAEFAwQGAv/EAC8RAQACAQMDAgQHAAIDAAAAAAABAgMEBRESITFBURMyYXEiI0KBkaGxM8EUQ1L/2gAMAwEAAhEDEQA/AO4gAAAAAAAAAFsppaWl0tICN4qn78P1R+4FOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gOOUviQ/VH7gVWLp/Eh+qP3AujWi9EovoaYEgAAAAAAAAAAAAAAAAAAo2BjuvKXs0re/K9uxawK8Wvy5SlzXyU+xAVhhKcdEI91wL+Cj7q7kBXg1sXcgHBrYu5AODWxdyAcGti7kAyFsXcgGRHYu5AODWxdyAZC2LuQDg1sXcgHBrYu5AODjsXcgLZUIPTGPcgI1g4Lkpw54NxAPhI/wC5HWs0ZLo1MCWlVUtGrSnmafOtQEgAAAAAAAAAAAAADYGKlwud+z1R0ZdnpfNzAZNgAAAAAhxOKp0llVJxgtsmke60taeKxyx3y0pHNp4eLit9lCOamp1XtismPfKxuU2/Jbz2V2XdsV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AAAAAAAAAAAAAAAAAAAAAAB//9k=";
}
private string MailgetBodyNuevatarea(int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" NUEVA TAREA ASIGNADA");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
private string MailgetBodyActualizartarea(int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" TAREA ACTUALIZADA");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
private string MailgetBodyActualizararchivo(int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" TAREA ACTUALIZADA(Nuevo Archivo)");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
private string MailgetBodyActualizarAvance(int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" TAREA ACTUALIZADA(Avance)");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
private string MailgetBodyTareaComentario(int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" NUEVO COMENTARIO EN TAREA");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
private string MailgetBodyTareaCheckList(string Actividad, int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" TAREA (@Actividad@)");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Actividad@", Actividad).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
private string MailgetBodyActualizarEstado(string Estatus, int Folio, string Link, string Asunto, string Descripcion, string Fechai, string Fechaf, string Prioridad, string Tema)
{
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("<div style=\"text-align: center;\">");
strSQL.AppendLine(" <div style=\"display: inline-block; width: 600px; text-align: left;\">");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #eee; font-size: 16px; font-weight: bold;\">SIG Notificaciones</div>");
strSQL.AppendFormat(" <div style=\"padding: 10px 10px; text-align: center;\"><img style=\"padding-bottom: 5px 10px;\" src=\"{0}\" alt=\"\" width=\"106\" height=\"79\" /><br /> ", getImg());
strSQL.AppendLine(" TAREA NUEVO ESTADO (@Estatus@)");
strSQL.AppendLine(" <div ><a href=\"@Link@\" style=\"padding: 10px 20px; text-align: center; color: #666;\">Folio : @Folio@ </a></div>");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" <table style=\"width: 100%\">");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Asunto</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Asunto@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Descripción</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Descripcion@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Inicio</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechai@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Fecha Fin</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Fechaf@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Prioridad</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Prioridad@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" <tr>");
strSQL.AppendLine(" <td style=\"width: 20%\">Tema</td>");
strSQL.AppendLine(" <td style=\"width: 80%\"><pre>@Tema@</pre></td>");
strSQL.AppendLine(" </tr>");
strSQL.AppendLine(" </table> ");
strSQL.AppendLine(" <div style=\"padding: 10px 10px;margin: 20px 0px; text-align: center; background-color: #dddddd;\"></div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine(" <div style=\"padding: 25px 10px; background-color: #044767; color: #044767; font-size: 16px;\">SIG Notificaciones</div>");
strSQL.AppendLine(" </div>");
strSQL.AppendLine("</div>");
return strSQL.ToString().Replace("@Estatus@", Estatus).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
}
#endregion
protected void DDlEstatus_SelectedIndexChanged(object sender, EventArgs e)
{
pnlTerminarPadre.Visible = (DDlEstatus.SelectedValue.ToEntero() > 3 && CveEventoPadre > 0);
}
protected void LnkPDF_Click(object sender, EventArgs e)
{
FileInfo Imagen = new FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> param = new List<ReportParameter>();
if (Imagen.Exists)
{
param.Add(new ReportParameter("Logo",logouri));
}else
{
param.Add(new ReportParameter("Logo", ""));
}
param.Add(new ReportParameter("NombreEmpresa",UsuarioActual.Empresa.Empresa));
param.Add(new ReportParameter("Asunto", TxtAsunto.Text));
param.Add(new ReportParameter("Descripcion", TxtDescripcion.Text));
param.Add(new ReportParameter("De", DeProp));
param.Add(new ReportParameter("Para", ParaProp));
param.Add(new ReportParameter("CCPara", CCProp));
param.Add(new ReportParameter("FechaInicio", txtFechaI.Text));
param.Add(new ReportParameter("FechaFin", txtFechaF.Text));
param.Add(new ReportParameter("Prioridad", DdlPrioridad.SelectedItem.Text));
param.Add(new ReportParameter("Tema", DdlTema.SelectedItem.Text));
param.Add(new ReportParameter("Estatus", lblEstatus.Text));
param.Add(new ReportParameter("FechaRegistro", TxtFechaIng.Text));
param.Add(new ReportParameter("Registro", TxtUsuarioreg.Text));
param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
ImprimirPDF("Empresas/Grales/Formatos/TareaDetalle.rdlc",new System.Data.DataTable(),param,"Tarea Detalle");
}
}