This commit is contained in:
@@ -23,6 +23,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
}
|
||||
|
||||
#region Propiedades
|
||||
public const string idUpVinculo = "idUpVinculo";
|
||||
public const string iddivAgregarMiembros = "iddivAgregarMiembros";
|
||||
public const string iddivAgregar = "divModalAgregarActividad";
|
||||
public const string iddivAgregarArchivo = "divModalAgregarArchivo";
|
||||
@@ -38,6 +39,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
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 Convinculo { get { return Convert.ToBoolean(ViewState["Convinculo"]); } set { ViewState["Convinculo"] = 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; } }
|
||||
@@ -48,7 +50,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Convinculo = false;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CveEventoPadre = 0;
|
||||
@@ -374,6 +376,9 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
{
|
||||
if (ObjOI_E.GetEventos2(RCveEvento, UsuarioActual.CveEmpresa) && ObjOI_E.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
LnkUpVinculo.Visible = true;
|
||||
LnkUpVinculo.Text = "<i class=\"fa fa-plus\"></i> Agregar Relación";
|
||||
|
||||
PnlUsuarios.Visible = true;
|
||||
portletMiembros.Visible = false;
|
||||
LnkUpFileVisible = true;
|
||||
@@ -417,6 +422,16 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
int CveProveedor = drow["CveProveedor"].ToString().ToEntero();
|
||||
int CveCompra = drow["CveCompra"].ToString().ToEntero();
|
||||
int CvePersonal = drow["CvePersonal"].ToString().ToEntero();
|
||||
|
||||
int CveActivoFijo = drow["CveActivoFijo"].ToString().ToEntero();
|
||||
int CveIE = drow["CveIE"].ToString().ToEntero();
|
||||
int CveProspecto = drow["CveProspecto"].ToString().ToEntero();
|
||||
int CveOS = drow["CveOS"].ToString().ToEntero();
|
||||
int CveOC = drow["CveOC"].ToString().ToEntero();
|
||||
int CveContrato = drow["CveContrato"].ToString().ToEntero();
|
||||
int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero();
|
||||
int CveMovimientoAlmacen = drow["CveMovimientoAlmacen"].ToString().ToEntero();
|
||||
|
||||
//int = drow[""].ToString().ToEntero();
|
||||
|
||||
string titulo = "";
|
||||
@@ -426,7 +441,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
{
|
||||
titulo = "Cliente: ";
|
||||
link = string.Format("<a href=\"/Ventas/Clientes.aspx?CveCliente={1}\" class=\"linkCorreo\">{0}</a>", drow["Cliente"], CveCliente);
|
||||
|
||||
|
||||
}
|
||||
else if (CveVenta > 0)
|
||||
{
|
||||
@@ -451,17 +466,64 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
titulo = "Personal: ";
|
||||
link = string.Format("<a href=\"/RH/Personal.aspx?CvePersonal={1}\" class=\"linkCorreo\">{0} </a>", drow["NombreCompleto"], CvePersonal);
|
||||
}
|
||||
|
||||
if(titulo.Length > 0)
|
||||
else if (CveActivoFijo > 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 = "Activo Fijo";
|
||||
link = string.Format("<a href=\"/AF/AF.aspx?CveActivoFijo={1}\" class=\"linkCorreo\">{0} </a>", drow["ActivoFijo"], CveActivoFijo);
|
||||
}
|
||||
else if (CveIE > 0)
|
||||
{
|
||||
titulo = "Bancos";
|
||||
link = string.Format("<a href=\"//Bancos/IE.aspx?CveIE={1}\" class=\"linkCorreo\">{0} </a>", drow["BancIE"], CveIE);
|
||||
}
|
||||
else if (CveProspecto > 0)
|
||||
{
|
||||
titulo = "Prospecto";
|
||||
link = string.Format("<a href=\"/Prospectos/ProspectosSIP.aspx?CveProspecto={1}\" class=\"linkCorreo\">{0} </a>", drow["Prospecto"], CveProspecto);
|
||||
}
|
||||
else if (CveOS > 0)
|
||||
{
|
||||
titulo = "Orden de servicio";
|
||||
link = string.Format("<a href=\"/OS/OrdenesServicios.aspx?OS={1}\" class=\"linkCorreo\">{0} </a>", drow["OrdenServicio"], CveOS);
|
||||
}
|
||||
else if (CveOC > 0)
|
||||
{
|
||||
titulo = "Orden de Compra";
|
||||
link = string.Format("<a href=\"/OC/OC.aspx?OC={1}\" class=\"linkCorreo\">{0} </a>", drow["OrdenCompra"], CveOC);
|
||||
}
|
||||
else if (CveContrato > 0)
|
||||
{
|
||||
titulo = "Contrato";
|
||||
link = string.Format("<a href=\"/Contratos/Contrato.aspx?CveContrato={1}\" class=\"linkCorreo\">{0} </a>", drow["Contrato"], CveContrato);
|
||||
}
|
||||
else if (CveSubProyecto > 0)
|
||||
{
|
||||
titulo = "Sub Proyecto";
|
||||
link = string.Format("<a href=\"/?={1}\" class=\"linkCorreo\">{0} </a>", drow["SubProyecto"], CveSubProyecto);
|
||||
}
|
||||
else if (CveMovimientoAlmacen > 0)
|
||||
{
|
||||
titulo = "Almacen";
|
||||
link = string.Format("<a href=\"/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}\" class=\"linkCorreo\">{0} </a>", drow["MovAlmacen"], CveMovimientoAlmacen);
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
Convinculo = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LnkUpVinculo.Text = "<i class=\"fa fa-pencil\"></i> Actualizar Relación";
|
||||
}
|
||||
titulo = "";
|
||||
link = "";//EP.[CveTipoEvento] CveTipoEventoPadre,EP.Asunto AS AsuntoPadre
|
||||
switch (drow["CveTipoEventoPadre"].ToString().ToEntero())
|
||||
{
|
||||
case (int)OITipoEventos.Proyecto:
|
||||
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;
|
||||
@@ -495,12 +557,12 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
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.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;
|
||||
@@ -609,7 +671,7 @@ public partial class OI_TareaDetalle : 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)
|
||||
@@ -938,7 +1000,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
{
|
||||
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Tema agregada con éxito.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
Alert("Tema Agregada con éxito.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
|
||||
TxtTema.Text = "";
|
||||
set_GlobalDTOIRevision(-1, objoi.DtResultados);
|
||||
@@ -1286,7 +1348,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
|
||||
if (cveUsuarioPara <= 0)
|
||||
{
|
||||
errorMessage = "No se selecciono el miembro 'Para'";
|
||||
errorMessage = "Asegúrese de seleccionar al menos un miembro \"Para\"";
|
||||
|
||||
}
|
||||
if (cveUsuarioPara == cveUsuarioDe)
|
||||
@@ -1671,6 +1733,66 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
|
||||
protected void DDlEstatus_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
pnlTerminarPadre.Visible = (DDlEstatus.SelectedValue.ToEntero() > 3 && CveEventoPadre > 0);
|
||||
pnlTerminarPadre.Visible = ((DDlEstatus.SelectedValue.ToEntero() == 3 || DDlEstatus.SelectedValue.ToEntero() == 4) && CveEventoPadre > 0);
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkUpVinculo_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript(string.Format("$('#{0}').modal();", idUpVinculo));
|
||||
}
|
||||
|
||||
protected void DdlViculos_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int CveVinculo = DdlViculos.SelectedValue.ToEntero();
|
||||
PnlActivoFijo.Visible = (CveVinculo == 1);
|
||||
PnlCliente.Visible = (CveVinculo == 2);
|
||||
PnlPersonal.Visible = (CveVinculo == 3);
|
||||
PnlProveedor.Visible = (CveVinculo == 4);
|
||||
if (PnlActivoFijo.Visible)
|
||||
{
|
||||
;
|
||||
using ( ClsAF ObjAF = new ClsAF())
|
||||
{
|
||||
|
||||
if (ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", DateTime.Now.Year, -1, -1,-1,-1, "-1",-1))
|
||||
{
|
||||
GvActividades.DataSource = ObjAF.DtResultados;
|
||||
GvActividades.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (PnlCliente.Visible)
|
||||
{
|
||||
|
||||
using (ClsClientes ObjClientes = new ClsClientes())
|
||||
{
|
||||
if (ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
GvClientes.DataSource = ObjClientes.DtResultados;
|
||||
GvClientes.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PnlPersonal.Visible)
|
||||
{
|
||||
|
||||
}
|
||||
if (PnlProveedor.Visible)
|
||||
{
|
||||
|
||||
}
|
||||
UpVinculoModal.Update();
|
||||
}
|
||||
|
||||
protected void LnkUpVinculoAF_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkUpVinculoCliente_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user