private void Page_Load(object sender, System.EventArgs e) { mesesAmostrar = (bool[])Session["MesesAmostrar"]; meses = (Hashtable)Session["Meses"]; IVentas ventas = VentasFactory.GetVentas(); ventas.FechaDesde = (DateTime)Session["FechaDesde"]; ventas.FechaHasta = (DateTime)Session["FechaHasta"]; if (Session["DsVentasDetalle"] == null) { int categoriaUVentaID = Utiles.Validaciones.obtieneEntero(Session["categoriaUVentaID"].ToString()); dsVentasDetalle = ventas.GetVentasClientesDetalle(categoriaUVentaID, false); Session["DsVentasDetalle"] = dsVentasDetalle; } else { dsVentasDetalle = (DsVentasDetalle)Session["DsVentasDetalle"]; } //ventas = VentasFactory.GetVentas(); //ventas.ClienteID = Convert.ToInt32(Convert.ToString(dr["EntidadID"])); dsVentasDetalleUVenta = (DsVentasDetalle)Session["DsVentasDetalleUVenta"]; //System.Data.DataRow[] drImportes = ventas.GetImportesByClienteUVenta(Convert.ToInt32(Convert.ToString(dr["UnidadVentaID"])), i).Datos.Select(""); }
protected void applyRules() { IVentas IService = new IVentas(); List <BEVentas> lstBE = new List <BEVentas>(); BEVentas BEVenta = new BEVentas(); BEVenta.codLocal = ddlLocales.SelectedValue; BEVenta.codPeriodo = ddlPeriodos.SelectedValue; /**/ BEVenta.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue); BEVenta.textPrmSearch = txtPrmSearch.Text.Trim(); if (chkRangeDate.Checked) { BEVenta.prmDesde = txtDesde.Text; BEVenta.prmHasta = txtHasta.Text; } /**/ lstBE = IService.IGetVentas(BEVenta); List <BEVentas> lstBE2 = new List <BEVentas>(); lstBE2 = IService.IaplicarReglas(lstBE); IService.IUpdListHotels(lstBE2); gvHotels.DataSource = lstBE2; gvHotels.DataBind(); /*List<BEHotel> lstBE2 = (List<BEHotel>)this.gvHotels.DataSource; * gvHotels.DataSource = IService.IInsListHotels(lstBE2); * gvHotels.DataBind();*/ }
public CajaAperturaCierreController(ICajaAperturaCierre cajaAperturaCierre, ICajas cajas, IVentas ventas, ICompras compras, IUsuarios usuarios, ITimbrados timbrados) { _cajaAperturaCierre = cajaAperturaCierre; _cajas = cajas; _ventas = ventas; _compras = compras; _usuarios = usuarios; _timbrados = timbrados; }
public VentasController(IVentas ventas, IPedidos pedidos, IProductos productos, ICajaAperturaCierre cajasAperturaCierre, ITimbrados timbrados, ISucursales sucursales, IClientes clientes) { _ventas = ventas; _pedidos = pedidos; _productos = productos; _timbrados = timbrados; _cajasAperturaCierre = cajasAperturaCierre; _sucursales = sucursales; _clientes = clientes; }
private void Page_Load(object sender, System.EventArgs e) { #region IsAuthenticated if (Session["Usuario"] != null) { usuario = (IUsuarios)Session["Usuario"]; } if (User.Identity.IsAuthenticated) { string sOpcion = "ReporteAlertaOperativaAgenciaUV"; Menu oMenu = (Menu)this.FindControl("Menu1"); this.ValidarSeguridad(oMenu, sOpcion); } agenciaID = usuario.AgenciaID; //Paso la agencia a una variable para después consultar de esa agencia especificamente IVentas ventas = VentasFactory.GetVentas(); /*validar cuando entra un vendedor*/ if (usuario.VendedorID != 0) { #region Vendedor IVendedor vendedor = VendedorFactory.GetVendedor(); vendedor.VendedorID = usuario.VendedorID; vendedor.Consultar(); #endregion } else if (usuario.AgenciaID != 0 && usuario.AgenciaID != ventas.EsAdministracion(UnidadNegocioID)) { IAgencia agencia = AgenciaFactory.GetAgencia(); agencia.AgenciaID = usuario.AgenciaID; agencia.ConsultarBasicoByAgenciaID(); busqAgencia.AgenciaID = agencia.AgenciaID.ToString(); busqAgencia.Sucursal = agencia.SucursalDGI; busqAgencia.RazonSocial = agencia.RazonSocial; ((TextBox)((Control)busqAgencia).FindControl("txtSucursal")).Enabled = false; ((TextBox)((Control)busqAgencia).FindControl("txtRazonSocial")).Enabled = false; } #endregion if (!IsPostBack) { Session["dsResultado"] = null; this.BindGrid(0, false); } }
protected void loadGridHotel(int npageIndex = 0) { IHotels IServiceHotel = new IHotels(); BEHotel BEHotel = new BEHotel(); IVentas IService = new IVentas(); BEVentas BE = new BEVentas(); BE.codLocal = ddlLocales.SelectedValue; BE.codPeriodo = ddlPeriodos.SelectedValue; BEHotel.codLocal = ddlLocales.SelectedValue; BEHotel.codPeriodo = ddlPeriodos.SelectedValue; /**/ BE.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue); //if (rdoNombre.Checked) // BE.tipoPrmSearch = 1; //if (rdoApellido.Checked) // BE.tipoPrmSearch = 2; //if (rdoFicha.Checked) // BE.tipoPrmSearch = 3; //if (rdoSerie.Checked) // BE.tipoPrmSearch = 4; //if (rdoCorrelativo.Checked) // BE.tipoPrmSearch = 5; BE.textPrmSearch = txtPrmSearch.Text.Trim(); if (chkRangeDate.Checked) { BE.prmDesde = txtDesde.Text; BE.prmHasta = txtHasta.Text; } /**/ gvHotels.DataSource = IService.IGetVentas(BE); gvHotels.PageIndex = npageIndex; gvHotels.DataBind(); txtBaseImponible.Text = IServiceHotel.IGetImponible(BEHotel, "1"); txtCantDoc.Text = IServiceHotel.IGeNumeroDocumentos(BEHotel, "V"); txtIGVTot.Text = IServiceHotel.IGeIGVVentas(BEHotel); }
protected void loadListErrors() { IVentas IService = new IVentas(); List <BEVentas> lstBE = new List <BEVentas>(); BEVentas BEVentas = new BEVentas(); BEVentas.codLocal = ddlLocales.SelectedValue; BEVentas.codPeriodo = ddlPeriodos.SelectedValue; /**/ BEVentas.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue); BEVentas.textPrmSearch = txtPrmSearch.Text.Trim(); if (chkRangeDate.Checked) { BEVentas.prmDesde = txtDesde.Text; BEVentas.prmHasta = txtHasta.Text; } /**/ lstBE = IService.IGetVentas(BEVentas); lstErrorList.DataSource = IService.IvalidarCaracteres(lstBE); lstErrorList.DataBind(); }
public VentasController(IVentas VentasServices) { _VentasServices = VentasServices; }
public static string DelVentas(BEVentas obj) { IVentas IService = new IVentas(); return(IService.IDelVentas(obj)); }
public static string InsUpdVentas(BEVentas obj) { IVentas IService = new IVentas(); return(obj.idVentas == "0" ? IService.IInsVentas(obj) : IService.IUpdVentas(obj)); }
public RecibosController(IRecibos recibos, IVentas ventas, ICajaAperturaCierre cajasAperturaCierre) { _recibos = recibos; _ventas = ventas; _cajasAperturaCierre = cajasAperturaCierre; }
public VentaController(IVentas ventas) { this.ventas = ventas; }