facturassat
This commit is contained in:
@@ -4,11 +4,62 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Ventas_RepConciliacionSat : System.Web.UI.Page
|
||||
public partial class Ventas_RepConciliacionSat : ClsPaginas
|
||||
{
|
||||
const string rqFechaInicio = "FechaInicio";
|
||||
const string rqFechaFin = "FechaFin";
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
DateTime fecha;
|
||||
DateTime fechaInicio = DateTime.Now;
|
||||
DateTime fechaFin = DateTime.Now;
|
||||
if (fechaInicio.Day < 5) { fechaInicio = fechaInicio.AddMonths(-1); }
|
||||
fechaInicio = fechaInicio.AddDays(1 - fechaInicio.DayOfYear);
|
||||
fechaFin = fechaInicio.AddYears(1).AddDays(-1);
|
||||
if (Request[rqFechaInicio] != null) { DateTime.TryParse(Request[rqFechaInicio], out fecha); fechaInicio = fecha.Year > 1900 ? fecha : fechaInicio; }
|
||||
if (Request[rqFechaFin] != null) { DateTime.TryParse(Request[rqFechaFin], out fecha); fechaFin = fecha.Year > 1900 ? fecha : fechaFin; }
|
||||
txtFechaI.Text = string.Format("{0:dd/MM/yyyy}", fechaInicio);
|
||||
txtFechaF.Text = string.Format("{0:dd/MM/yyyy}", fechaFin);
|
||||
|
||||
|
||||
}
|
||||
CargaRepConciliacionSatGET();
|
||||
}
|
||||
|
||||
|
||||
protected void CargaRepConciliacionSatGET()
|
||||
{
|
||||
string RtipoDocto, RfechaI, RfechaF;
|
||||
RtipoDocto = "I";
|
||||
RfechaI = txtFechaI.Text.ToDateTime().ToString();
|
||||
RfechaF = txtFechaF.Text.ToDateTime().ToString();
|
||||
using (ClsGenerales ObjRepC = new ClsGenerales())
|
||||
{
|
||||
ObjRepC.RepConciliacionSatGET(UsuarioActual.CveEmpresa, RtipoDocto, RfechaI, RfechaF);
|
||||
GVRepConciliacionSatGET.DataSource = ObjRepC.DtResultados;
|
||||
ObjRepC.Dispose();
|
||||
|
||||
}
|
||||
GVRepConciliacionSatGET.DataBind();
|
||||
upDatosRepC.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaRepConciliacionSatGET();
|
||||
}
|
||||
|
||||
protected void GVRepConciliacionSatGET_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.CssClass = string.Format("Grupo{0}", e.Row.DBCampo("GRUPOCve"));
|
||||
e.Row.Attributes.Add("ganio", string.Format("{0}", e.Row.DBCampo("anio")));
|
||||
e.Row.Attributes.Add("gMes", string.Format("{0}", e.Row.DBCampo("Mes")));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user