74 lines
2.6 KiB
C#
74 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI.WebControls;
|
|
using Extensiones;
|
|
using System.Data;
|
|
using static Extensiones.ModExtensiones;
|
|
|
|
public partial class CGame_PopUpBuscarProduccion :ClsPaginas
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
((BaseMasterPage) this.Master).EsPopup = true;
|
|
TxtFechaEntregaI.Text = DateTime.Now.ToString();
|
|
TxtFechaEntregaF.Text = DateTime.Now.ToString();
|
|
CargaHuerta();
|
|
}
|
|
|
|
}
|
|
|
|
protected void CargaHuerta()
|
|
{
|
|
ClsCGame ObjCort = new ClsCGame();
|
|
if (ObjCort.GetHuerta(UsuarioActual.CveEmpresa))
|
|
{
|
|
DdlHuerta.DataSource = ObjCort.DtResultados;
|
|
DdlHuerta.Items.Insert(0, new ListItem("Todos", "-1"));
|
|
DdlHuerta.DataBind();
|
|
}
|
|
ObjCort.Dispose();
|
|
UPDatos.Update();
|
|
}
|
|
|
|
protected void Consultar_Click(object sender, EventArgs e)
|
|
{
|
|
String Folio;
|
|
if (TxtFolio.Text != "") { Folio = TxtFolio.Text; TxtFechaEntregaI.Text = MinFecha.ToShortDateString(); TxtFechaEntregaF.Text = MaxFecha.ToShortDateString(); } else { Folio = "-1"; }
|
|
ClsCGame ObjCGame = new ClsCGame();
|
|
if (ObjCGame.GetCorteGasto(UsuarioActual.CveEmpresa,-1,-1,DdlHuerta.SelectedValue.ToEntero(),TxtFechaEntregaI.Text.ToDate(),TxtFechaEntregaF.Text.ToDate(),Opcion:2,Folio:Folio))
|
|
{
|
|
GvDatos.DataSource = ObjCGame.DtResultados;
|
|
GvDatos.DataBind();
|
|
LtlTotalRegistros.Text = ObjCGame.DtResultados.Rows.Count.ToString();
|
|
if (ObjCGame.DtResultados.Rows.Count < 1)
|
|
{
|
|
Alert("No se encontraron resultados con los filtros seleccionados", TipoMensaje.MsgAdvertencia);
|
|
}
|
|
else
|
|
{
|
|
TblBusqueda.Visible = true;
|
|
}
|
|
}
|
|
ObjCGame.Dispose();
|
|
UPDatos.Update();
|
|
|
|
|
|
}
|
|
|
|
#region GridView
|
|
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
|
{
|
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
|
{
|
|
e.Row.FCLabel("LblImporte").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir("+"" + e.Row.DBCampo("CveCorteGasto") + ""+");'>", e.Row.DBCampo("Importe").FormatoNumero());
|
|
|
|
e.Row.FCLabel("LblFolio").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(" + "" + e.Row.DBCampo("CveCorteGasto") + "" + ");'>", e.Row.DBCampo("Folio"));
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
} |