This commit is contained in:
@@ -12,6 +12,7 @@ public partial class OI_UnoaUno : ClsPaginas
|
||||
#region Propiedades
|
||||
public const string idDivModalSeguir = "idDivModalSeguir";
|
||||
public const string idDivModalSiguiendoA = "idDivModalSiguiendoA";
|
||||
//public const string idDivModalSiguiendoX = "idDivModalSiguiendoX";
|
||||
private int CcveUnoaUnoPregunta
|
||||
{
|
||||
get { return (ViewState["CcveUnoaUnoPregunta"] == null) ? 0 : Convert.ToInt32(ViewState["CcveUnoaUnoPregunta"]); }
|
||||
@@ -73,7 +74,7 @@ public partial class OI_UnoaUno : ClsPaginas
|
||||
ObjPA_O.Dispose();
|
||||
}
|
||||
GVPA_OI_UnoAUnoTableroGet.DataBind();
|
||||
if (GVPA_OI_UnoAUnoTableroGet.Rows.Count > 0)
|
||||
if (GVPA_OI_UnoAUnoTableroGet.Rows.Count > 0 && TxtCFecha.Text.ToDate().ToString("yyyy/MM/dd") == DateTime.Now.ToString("yyyy/MM/dd"))
|
||||
{
|
||||
LnkGuardar.Visible = true;
|
||||
}
|
||||
@@ -556,21 +557,111 @@ public partial class OI_UnoaUno : ClsPaginas
|
||||
UpSeguirA.Update();
|
||||
}
|
||||
|
||||
|
||||
private int SeguirCveUsuario
|
||||
{
|
||||
get { return (ViewState["SeguirCveUsuario"] == null) ? 0 : Convert.ToInt32(ViewState["SeguirCveUsuario"]); }
|
||||
set { ViewState["SeguirCveUsuario"] = value; }
|
||||
}
|
||||
private int SeguidoPorCve
|
||||
{
|
||||
get { return (ViewState["SeguidoPorCve"] == null) ? 0 : Convert.ToInt32(ViewState["SeguidoPorCve"]); }
|
||||
set { ViewState["SeguidoPorCve"] = value; }
|
||||
}
|
||||
private string SeguirFechaback
|
||||
{
|
||||
get { return (ViewState["SeguirFechaback"] == null) ? "" : ViewState["SeguirFechaback"].ToString(); }
|
||||
set { ViewState["SeguirFechaback"] = value; }
|
||||
}
|
||||
private string SeguirFechanext
|
||||
{
|
||||
get { return (ViewState["SeguirFechanext"] == null) ? "" : ViewState["SeguirFechanext"].ToString(); }
|
||||
set { ViewState["SeguirFechanext"] = value; }
|
||||
}
|
||||
protected void SiguiendoAUser_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
int CveUsuario = gvRow.DataKey("CveUsuario").ToEntero();
|
||||
SeguirCveUsuario = gvRow.DataKey("CveUsuario").ToEntero();
|
||||
SeguidoPorCve = UsuarioActual.CveUsuario;
|
||||
string Nombre = gvRow.DataKey("Nombre");
|
||||
LtlTitulosiguiendoA.Text = Nombre;
|
||||
string strFecha = gvRow.DataKey("Fecha");
|
||||
LtlTitulosiguiendoA.Text = string.Format("Siguiendo A: {0}", Nombre);
|
||||
DateTime Fecha;
|
||||
if (strFecha.Length > 0)
|
||||
{
|
||||
Fecha = strFecha.ToDateTime();
|
||||
strFecha = Fecha.ToString("yyyy/MM/dd");
|
||||
}
|
||||
cargarseguira(strFecha);
|
||||
}
|
||||
private void cargarseguira(string strFecha)
|
||||
{
|
||||
SeguirFechaback = "";
|
||||
SeguirFechanext = "";
|
||||
string fecha = "Sin respuestas capturadas";
|
||||
gvPregResSiguiendoA.DataSource = null;
|
||||
using (ClsOIEventos ObjUnoa = new ClsOIEventos())
|
||||
{
|
||||
ObjUnoa.GetUnoAUnoSiguiendoA(UsuarioActual.CveUsuario, CveUsuario, UsuarioActual.CveEmpresa);
|
||||
if( ObjUnoa.GetUnoAUnoSiguiendoA(SeguidoPorCve, SeguirCveUsuario, UsuarioActual.CveEmpresa, strFecha) && ObjUnoa.DtResultados.Rows.Count >0)
|
||||
{
|
||||
SeguirFechaback = ObjUnoa.DtResultados.MAX("FechaBack").Length > 0 ? ObjUnoa.DtResultados.MAX("FechaBack").ToDateTime().ToString("yyyy/MM/dd") : "";
|
||||
SeguirFechanext = ObjUnoa.DtResultados.MAX("FechaNext").Length > 0 ? ObjUnoa.DtResultados.MAX("FechaNext").ToDateTime().ToString("yyyy/MM/dd") : "";
|
||||
fecha = (ObjUnoa.DtResultados.MAX("Fecha").Length >0 ? ObjUnoa.DtResultados.MAX("Fecha").ToDateTime().ToString("dd/MM/yyyy") : fecha);
|
||||
}
|
||||
gvPregResSiguiendoA.DataSource = ObjUnoa.DtResultados;
|
||||
}
|
||||
gvPregResSiguiendoA.DataBind();
|
||||
RegistraScript(string.Format("$('#{0}').modal();", idDivModalSiguiendoA));
|
||||
|
||||
lnkAtras.Visible = (SeguirFechaback.Length > 0);
|
||||
LnkAdelante.Visible = (SeguirFechanext.Length > 0);
|
||||
TxtFechaSeguir.Text = fecha;
|
||||
UpModalSiguiendoA.Update();
|
||||
|
||||
}
|
||||
protected void lnkAtras_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
cargarseguira(SeguirFechaback);
|
||||
}
|
||||
|
||||
protected void LnkAdelante_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
cargarseguira(SeguirFechanext);
|
||||
}
|
||||
|
||||
protected void SeguidoX_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
SeguirCveUsuario = UsuarioActual.CveUsuario;
|
||||
SeguidoPorCve = gvRow.DataKey("CveUsuarioSeguidor").ToEntero();
|
||||
string Nombre = gvRow.DataKey("NombreSeguidor");
|
||||
LtlTitulosiguiendoA.Text = string.Format("Seguido por: {0}", Nombre);
|
||||
cargarseguira("");
|
||||
//string strFecha = "";
|
||||
|
||||
//LtlTituloSeguidox.Text = Nombre;
|
||||
//gvSeguidoPorpreguntas.DataSource = null;
|
||||
//using (ClsOIEventos ObjUnoa = new ClsOIEventos())
|
||||
//{
|
||||
// if (ObjUnoa.GetUnoAUnoSiguiendoA(SeguirCveUsuario, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, strFecha) && ObjUnoa.DtResultados.Rows.Count > 0)
|
||||
// {
|
||||
// }
|
||||
// gvSeguidoPorpreguntas.DataSource = ObjUnoa.DtResultados;
|
||||
//}
|
||||
//gvSeguidoPorpreguntas.DataBind();
|
||||
//RegistraScript(string.Format("$('#{0}').modal();", idDivModalSiguiendoX));
|
||||
|
||||
//UpModalSiguiendox.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkFechaSeguir_Click(object sender, EventArgs e)
|
||||
{
|
||||
string fechaold = TxtFechaSeguir.Text;
|
||||
string strFecha =TxtFechaSeguir.Text.ToDateTime().ToString("yyyy/MM/dd");
|
||||
|
||||
cargarseguira(strFecha);
|
||||
TxtFechaSeguir.Text = fechaold;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user