Commit inicial Ventas Productivo
This commit is contained in:
72
CGame/EstadoCuentaDetalle.aspx.cs
Normal file
72
CGame/EstadoCuentaDetalle.aspx.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
public partial class CGame_EstadoCuentaDetalle : ClsPaginas
|
||||
{
|
||||
#region PROPIEDADES
|
||||
|
||||
private int CveHuerta
|
||||
{
|
||||
get { return (ViewState["CveHuerta"] == null) ? 0 : Convert.ToInt32(ViewState["CveHuerta"]); }
|
||||
set { ViewState["CveHuerta"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CveHuerta = Request["CveHuerta"] == null ? 0 : Request["CveHuerta"].ToString().ToEntero();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsCGame ObjCGame = new ClsCGame();
|
||||
if (ObjCGame.GetIngresosEgresos(UsuarioActual.CveEmpresa, CveHuerta))
|
||||
{
|
||||
if (ObjCGame.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
LblHuerta.Text = ObjCGame.DtResultados.Rows[0]["Huerta"].ToString();
|
||||
HLTotGastosCorte.Text = ObjCGame.DtResultados.Rows[0]["TotGastosCorte"].ToString().FormatoNumero();
|
||||
HLTotHuertaEmpaque.Text = ObjCGame.DtResultados.Rows[0]["TotHuertaEmpaque"].ToString().FormatoNumero();
|
||||
HLTotEmpaque.Text = ObjCGame.DtResultados.Rows[0]["TotEmpaque"].ToString().FormatoNumero();
|
||||
HLTotPreEnfriado.Text = ObjCGame.DtResultados.Rows[0]["TotPreEnfriado"].ToString().FormatoNumero();
|
||||
HLTotMateriales.Text = ObjCGame.DtResultados.Rows[0]["TotMateriales"].ToString().FormatoNumero();
|
||||
HLTotEmpaqueUSA.Text = ObjCGame.DtResultados.Rows[0]["TotEmpaqueUSA"].ToString().FormatoNumero();
|
||||
HLTotOtrosGastos.Text = ObjCGame.DtResultados.Rows[0]["TotOtrosGastos"].ToString().FormatoNumero();
|
||||
LblTotEgresos.Text = ObjCGame.DtResultados.Rows[0]["TotEgresos"].ToString().FormatoNumero();
|
||||
|
||||
HLTotGastosCorte.NavigateUrl = String.Format("/CGame/RepCorteGasto.aspx?CveHuerta={0}&Modalidad={1}", CveHuerta,1);
|
||||
HLTotHuertaEmpaque.NavigateUrl = String.Format("/CGame/Fletes.aspx?CveHuerta={0}&Tipo={1}", CveHuerta,1);
|
||||
HLTotEmpaque.NavigateUrl = String.Format("/CGame/EntradaMateriaPrima.aspx?CveHuerta={0}", CveHuerta);
|
||||
HLTotPreEnfriado.NavigateUrl = String.Format("/CGame/RepEmpaque.aspx?CveHuerta={0}&Modalidad={1}", CveHuerta, 2);
|
||||
HLTotMateriales.NavigateUrl = String.Format("/CGame/RepEmpaque.aspx?CveHuerta={0}&Modalidad={1}", CveHuerta,1);
|
||||
HLTotEmpaqueUSA.NavigateUrl = String.Format("/CGame/Fletes.aspx?CveHuerta={0}&Tipo={1}", CveHuerta, 2);
|
||||
HLTotOtrosGastos.NavigateUrl = String.Format("/CGame/RepCorteGasto.aspx?CveHuerta={0}&Modalidad={1}", CveHuerta,2);
|
||||
|
||||
LblPesoTotal.Text = ObjCGame.DtResultados.Rows[0]["TotPeso"].ToString().FormatoNumero();
|
||||
LblPrimera.Text = ObjCGame.DtResultados.Rows[0]["TotPrimera"].ToString().FormatoNumero();
|
||||
LblPorcentajePrimera.Text = ObjCGame.DtResultados.Rows[0]["PorcentajePrimera"].ToString().FormatoNumero();
|
||||
LblSegunda.Text = ObjCGame.DtResultados.Rows[0]["TotSegunda"].ToString().FormatoNumero();
|
||||
LblPorcentajeSegunda.Text = ObjCGame.DtResultados.Rows[0]["PorcentajeSegunda"].ToString().FormatoNumero();
|
||||
LblMerma.Text = ObjCGame.DtResultados.Rows[0]["TotMerma"].ToString().FormatoNumero();
|
||||
LblPorcentajeMerma.Text = ObjCGame.DtResultados.Rows[0]["PorcentajeMerma"].ToString().FormatoNumero();
|
||||
LblPiso.Text = ObjCGame.DtResultados.Rows[0]["TotEnPiso"].ToString().FormatoNumero();
|
||||
LblPorcentajeEnPiso.Text = ObjCGame.DtResultados.Rows[0]["PorcentajeEnPiso"].ToString().FormatoNumero();
|
||||
|
||||
}
|
||||
ObjCGame.Dispose();
|
||||
UpEgresos.Update();
|
||||
UpIndicadores.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user