Commit inicial Ventas Productivo
This commit is contained in:
64
Ventas/RepComisionesJAM2.aspx.cs
Normal file
64
Ventas/RepComisionesJAM2.aspx.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Ventas_RepComisionesJAM2 : ClsPaginas
|
||||
{
|
||||
#region PROPIEDADES
|
||||
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString();
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.DataBind();
|
||||
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlSubProyecto.DataBind();
|
||||
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsEsquemasComisiones ObjComisiones = new ClsEsquemasComisiones();
|
||||
|
||||
DateTime FechaI, FechaF;
|
||||
if (txtFechaI.Text != "") { FechaI = txtFechaI.Text.ToDate(); } else { FechaI = DateTime.MinValue; }
|
||||
if (txtFechaF.Text != "") { FechaF = txtFechaF.Text.ToDate(); } else { FechaF = DateTime.MaxValue; }
|
||||
|
||||
if (ObjComisiones.GetRepComisiones2(DdlVendedor.SelectedValue.ToEntero(), FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjComisiones.DtResultados;
|
||||
}
|
||||
ObjComisiones.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DBCampo("CveVendedor").ToEntero() < 1)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user