usercontrol Tareas
This commit is contained in:
@@ -31,6 +31,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
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; } }
|
||||
@@ -50,6 +51,8 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CveEventoPadre = 0;
|
||||
portletvinculos.Visible = false;
|
||||
LnkAgregarCheckListVisible = true;
|
||||
LnkUpFileVisible = false;
|
||||
LnkUpUsuariosVisible = false;
|
||||
@@ -107,6 +110,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
TxtIsnewtarea.Text = "1";
|
||||
portletActividades.Visible = false;
|
||||
LnkcambiarEstatus.Visible = false;
|
||||
LnkAgregarTema.Visible = false;
|
||||
@@ -170,6 +174,11 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
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;
|
||||
@@ -181,7 +190,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
#region Permisos.Reasignar
|
||||
LnkReasignar.Visible = Permisos.Reasignar;
|
||||
#endregion
|
||||
List<ListItem> itemremove= new List<ListItem>();
|
||||
List<ListItem> itemremove = new List<ListItem>();
|
||||
foreach (ListItem item in DDlEstatus.Items)
|
||||
{
|
||||
switch (item.Value.ToEntero())
|
||||
@@ -201,15 +210,15 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
{
|
||||
itemremove.Add(item);
|
||||
//DDlEstatus.Items.Remove(item);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (ListItem item in itemremove)
|
||||
foreach (ListItem item in itemremove)
|
||||
{
|
||||
DDlEstatus.Items.Remove(item);
|
||||
}
|
||||
LnkcambiarEstatus.Visible = LnkcambiarEstatus.Visible && (Permisos.Estatus1_2_3 || Permisos.Estatus4_5);
|
||||
LnkcambiarEstatus.Visible = LnkcambiarEstatus.Visible && (Permisos.Estatus1_2_3 || Permisos.Estatus4_5);
|
||||
|
||||
UpAcciones.Update();
|
||||
UpTitulo.Update();
|
||||
@@ -343,7 +352,17 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
}
|
||||
LtlPara.Text = StrPara.ToString();
|
||||
LtlDeUser.Text = StrDeUser.ToString();
|
||||
LtlCCPara.Text = StrCCPara.ToString();
|
||||
int longitud = StrCCPara.ToString().Length;
|
||||
if (longitud > 0)
|
||||
{
|
||||
LtlCCPara.Text = StrCCPara.ToString().Substring(0, longitud - 1);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlCCPara.Text = "";
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -371,6 +390,8 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
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()));
|
||||
@@ -383,11 +404,83 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
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}", drow["FechaIng"]);
|
||||
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))
|
||||
{
|
||||
@@ -402,6 +495,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.Getcheklist(RCveEvento))
|
||||
{
|
||||
GVcheklist.DataSource = ObjOI_E.DtResultados;
|
||||
@@ -715,38 +814,45 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
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 (RCveEvento > 0)
|
||||
if (TxtActividad.Text.Trim().Length > 0)
|
||||
{
|
||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||
if (RCveEvento > 0)
|
||||
{
|
||||
if (objOI.Addcheklist(RCveEvento, TxtActividad.Text, UsuarioActual.CveUsuario))
|
||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||
{
|
||||
Alert("Se agregó la actividad", ModExtensiones.TipoMensaje.ToastInformacion);
|
||||
if (objOI.Getcheklist(RCveEvento))
|
||||
if (objOI.Addcheklist(RCveEvento, TxtActividad.Text, UsuarioActual.CveUsuario))
|
||||
{
|
||||
GVcheklist.DataSource = objOI.DtResultados;
|
||||
GVcheklist.DataBind();
|
||||
cargaActividades(objOI);
|
||||
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();
|
||||
}
|
||||
}
|
||||
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)
|
||||
@@ -793,8 +899,9 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
//if (DdlEventoEstatus.SelectedValue.ToEntero == 3 | DdlEventoEstatus.SelectedValue.ToEntero == 1)
|
||||
// EnviarCorreoCambioEstatus(false);
|
||||
//CargaDatos();
|
||||
string mensaje = string.Format("Se cambio el Estatus de \"{0}\" a \"{1}\"", DdlEventoEstatus.SelectedItem.Text, DDlEstatus.SelectedItem.Text);
|
||||
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);
|
||||
@@ -1561,4 +1668,9 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
protected void DDlEstatus_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
pnlTerminarPadre.Visible = (DDlEstatus.SelectedValue.ToEntero() > 3 && CveEventoPadre > 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user