Commit inicial Ventas Productivo

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-08-14 16:40:54 -07:00
commit c35cf91883
13328 changed files with 3711549 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
using static Extensiones.ModExtensiones;
public partial class OC_RepSolicitudesAnticipo : ClsPaginas
{
#region "Propiedades"
private int CveProveedor
{
get
{
return ViewState["CveProveedor"].ToEntero();
}
set
{
ViewState["CveProveedor"] = value;
}
}
private DateTime FechaI
{
get
{
return ViewState["FechaI"].ToDateTime();
}
set
{
ViewState["FechaI"] = value;
}
}
private DateTime FechaF
{
get
{
return ViewState["FechaF"].ToDateTime();
}
set
{
ViewState["FechaF"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
InicializaDatos();
}
}
protected void InicializaDatos()
{
CveProveedor = -1;
CargaProveedor();
CargaDatos();
}
protected void CargaProveedor()
{
DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
DdlProveedor.DataBind();
DdlProveedor.Items.Insert(0, new ListItem("Todos", "-1"));
DdlProveedor.SelectedValue = "-1";
}
protected void CargaDatos()
{
ClsOC ObjOC = new ClsOC();
CveProveedor = DdlProveedor.SelectedValue.ToEntero();
FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha);
FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now);
if (ObjOC.GetRepSolicitudAnticipos(UsuarioActual.CveEmpresa, CveProveedor, FechaI, FechaF, DdlEstatus.SelectedValue.ToEntero()))
{
GvSolicitudes.DataSource = ObjOC.DtResultados;
}
ObjOC.Dispose();
GvSolicitudes.DataBind();
UPDatos.Update();
}
protected void BtnConsultar_Click(object sender, EventArgs e)
{
if (DdlEstatus.SelectedValue.ToEntero() == 3)
{
GvSolicitudes.Columns[4].Visible = true;
GvSolicitudes.Columns[5].Visible = true;
GvSolicitudes.Columns[6].Visible = false;
}
else
{
GvSolicitudes.Columns[4].Visible = false;
GvSolicitudes.Columns[5].Visible = false;
GvSolicitudes.Columns[6].Visible = true;
}
CargaDatos();
}
}