Cambios OI
This commit is contained in:
172
OI/TableroDetalle.aspx.cs
Normal file
172
OI/TableroDetalle.aspx.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class OI_TableroDetalle : ClsPaginas
|
||||
{
|
||||
|
||||
#region Propiedades
|
||||
private int RcveTablero
|
||||
{
|
||||
get { return (ViewState["RcveTablero"] == null) ? 0 : Convert.ToInt32(ViewState["RcveTablero"]); }
|
||||
set { ViewState["RcveTablero"] = value; }
|
||||
}
|
||||
|
||||
private System.Data.DataTable DtDatos
|
||||
{
|
||||
get { return (ViewState["DtDatos"] == null) ? null : (System.Data.DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
private int CcveTableroLista
|
||||
{
|
||||
get { return (ViewState["CcveTableroLista"] == null) ? 0 : Convert.ToInt32(ViewState["CcveTableroLista"]); }
|
||||
set { ViewState["CcveTableroLista"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
RcveTablero = Request["cveTablero"] == null ? 0 : Request["cveTablero"].ToString().ToEntero();
|
||||
|
||||
|
||||
if (RcveTablero > 0)
|
||||
{
|
||||
|
||||
using (ClsOIEventos ObjTabl = new ClsOIEventos())
|
||||
{
|
||||
if (ObjTabl.GetTablero(RcveTablero, -1, UsuarioActual.CveEmpresa) && ObjTabl.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
LtlTituloTablero.Text = string.Format("Tablero : {0}", ObjTabl.DtResultados.Rows[0]["Tablero"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
RcveTablero = 0;
|
||||
}
|
||||
|
||||
}
|
||||
CargaTableroLista();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void CargaTableroLista()
|
||||
{
|
||||
using (ClsOIEventos ObjTabl = new ClsOIEventos())
|
||||
{
|
||||
if (ObjTabl.GetTableroListaTrello(RcveTablero))
|
||||
{
|
||||
DtDatos = ObjTabl.DtResultados;
|
||||
RptrListas.DataSource = DtDatos.FiltraParametros("", "", new string[] { "CveTableroLista", "Lista" });
|
||||
RptrListas.DataBind();
|
||||
}
|
||||
//GVTableroLista.DataSource = ObjTabl.DtResultados;
|
||||
|
||||
}
|
||||
//GVTableroLista.DataBind();
|
||||
UpContenido.Update();
|
||||
}
|
||||
|
||||
protected void LimpiaTableroLista()
|
||||
{
|
||||
TxtTabllista.Text = "";
|
||||
UPModalTabl.Update();
|
||||
}
|
||||
protected void LnkEditarTabl_Click(object sender, EventArgs e)
|
||||
{
|
||||
LimpiaTableroLista();
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CcveTableroLista = gvRow.DataKey("CveTableroLista").ToEntero();
|
||||
int cveTablero = gvRow.DataKey("CveTablero").ToEntero();
|
||||
string lista = gvRow.DataKey("Lista");
|
||||
|
||||
TxtTabllista.Text = lista.ToString();
|
||||
this.RegistraScript("$('#DModalTableroLista').modal();");
|
||||
BtnTablADD.Visible = false;
|
||||
BtnTablEdit.Visible = true;
|
||||
UPModalTabl.Update();
|
||||
}
|
||||
protected void LnkAgregarTabl_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.RegistraScript("$('#DModalTableroLista').modal();");
|
||||
LimpiaTableroLista();
|
||||
BtnTablADD.Visible = true;
|
||||
BtnTablEdit.Visible = false;
|
||||
UPModalTabl.Update();
|
||||
}
|
||||
protected void BtnTablADD_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string lista = TxtTabllista.Text;
|
||||
ClsOIEventos ObjTabl = new ClsOIEventos();
|
||||
bool Continuar = ObjTabl.AddTableroLista(RcveTablero, lista, UsuarioActual.CveUsuario);
|
||||
ObjTabl.Dispose();
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalTableroLista').modal('hide');");
|
||||
LimpiaTableroLista();
|
||||
CargaTableroLista();
|
||||
UPModalTabl.Update();
|
||||
this.Alert("La Lista se ha agregadó",ModExtensiones.TipoMensaje.ToastInformacion);
|
||||
}
|
||||
}
|
||||
protected void BtnTablEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string lista = TxtTabllista.Text;
|
||||
ClsOIEventos ObjTabl = new ClsOIEventos();
|
||||
bool Continuar = ObjTabl.UpTableroLista(CcveTableroLista, lista);
|
||||
ObjTabl.Dispose();
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalTableroLista').modal('hide');");
|
||||
LimpiaTableroLista();
|
||||
UPModalTabl.Update();
|
||||
CargaTableroLista();
|
||||
this.Alert("La Lista Se ha actualizado");
|
||||
}
|
||||
}
|
||||
protected void LnkEliminarTabl_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CcveTableroLista = gvRow.DataKey("CveTableroLista").ToEntero();
|
||||
ClsOIEventos ObjTabl = new ClsOIEventos();
|
||||
bool Continuar = ObjTabl.RemoveTableroLista(CcveTableroLista);
|
||||
ObjTabl.Dispose();
|
||||
if (Continuar)
|
||||
{
|
||||
CargaTableroLista();
|
||||
this.Alert("El Tablero_Lista Se ha Eliminado");
|
||||
}
|
||||
}
|
||||
//Dim item As DataRowView = DirectCast(e.Item.DataItem, DataRowView)
|
||||
|
||||
protected void RptrListas_ItemDataBound(object sender, RepeaterItemEventArgs e)
|
||||
{
|
||||
System.Data.DataRowView item = (System.Data.DataRowView)e.Item.DataItem;
|
||||
string Lista = item["Lista"].ToString();
|
||||
int CveTableroLista = item["CveTableroLista"].ToString().ToEntero();
|
||||
|
||||
Repeater RptTareas = (Repeater)e.Item.FindControl("RptTareas");
|
||||
RptTareas.DataSource =DtDatos.FiltraParametros(string.Format("CveTableroLista={0} AND CveEvento>0", CveTableroLista));
|
||||
RptTareas.DataBind();
|
||||
}
|
||||
|
||||
protected void BtnCargarDatos_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaTableroLista();
|
||||
}
|
||||
|
||||
protected void BtnUpPosition_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsOIEventos eveobj = new ClsOIEventos())
|
||||
{
|
||||
eveobj.UpEventoLista(Txtcvetablerolista.Text.ToEntero(), txtCveEvento.Text.ToEntero());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user