protected void loadGridHotel(int npageIndex = 0)
        {
            IHotels IService = new IHotels();
            BEHotel BEHotel  = new BEHotel();

            BEHotel.codLocal   = ddlLocales.SelectedValue;
            BEHotel.codPeriodo = ddlPeriodos.SelectedValue;
            /**/
            BEHotel.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue);
            BEHotel.textPrmSearch = txtPrmSearch.Text.Trim();
            //if (chkRangeDate.Checked)
            if (ddlTipoFechaPrm.SelectedValue != "0")
            {
                BEHotel.tipoFechaPrm = Convert.ToInt32(ddlTipoFechaPrm.SelectedValue);
                BEHotel.prmDesde     = txtDesde.Text;
                BEHotel.prmHasta     = txtHasta.Text;
            }
            /**/
            gvHotels.DataSource = IService.IGetHotels(BEHotel);
            gvHotels.PageIndex  = npageIndex;
            gvHotels.DataBind();


            txtBaseImponible.Text = IService.IGetImponible(BEHotel, "1");
            txtCantDoc.Text       = IService.IGeNumeroDocumentos(BEHotel, "H");
        }
        protected void loadGridHotel(int npageIndex = 0)
        {
            ICompras IService = new ICompras();

            IHotels IServiceHotel = new IHotels();
            BEHotel BEHotel       = new BEHotel();

            BEHotel.codLocal   = ddlLocales.SelectedValue;
            BEHotel.codPeriodo = ddlPeriodos.SelectedValue;

            BECompras BE = new BECompras();

            BE.codLocal      = ddlLocales.SelectedValue;
            BE.codPeriodo    = ddlPeriodos.SelectedValue;
            BE.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue);
            BE.textPrmSearch = txtPrmSearch.Text.Trim();
            if (chkRangeDate.Checked)
            {
                BE.prmDesde = txtDesde.Text;
                BE.prmHasta = txtHasta.Text;
            }
            gvHotels.DataSource = IService.IGetCompras(BE);
            gvHotels.PageIndex  = npageIndex;
            gvHotels.DataBind();

            txtBaseImponible.Text = IServiceHotel.IGetImponible(BEHotel, "2");
            txtCantDoc.Text       = IServiceHotel.IGeNumeroDocumentos(BEHotel, "C");
            txtIGVTot.Text        = IServiceHotel.IGeIGVCompras(BEHotel);
        }
        public static string IngresaNota(BENotas obj)
        {
            IHotels IService = new IHotels();
            string  fdoc     = "";

            if (obj.fechaF.Length > 5)
            {
                fdoc = obj.fechaF.Substring(6, 4) + obj.fechaF.Substring(3, 2) + obj.fechaF.Substring(0, 2);
            }

            string stResp = IService.ISetNotaCredito(obj.SerieNC, obj.CorrNC, obj.SerieF, obj.CorrF, fdoc);

            if (stResp != null)
            {
                if (stResp.Equals("0"))
                {
                    return("No se actualizo ningun registro");
                }
                else
                if (stResp.Substring(0, 1).Equals("0"))
                {
                    return(stResp.Substring(2));
                }
                else
                {
                    return("Se actualizaron " + stResp + " registro(s).");
                }
            }
            else
            {
                return("0");
            }
        }
        public static string InsUpdHotels(BEHotel obj)
        {
            IHotels IService = new IHotels();
            string  fdoc     = obj.fechaDocumento.Substring(6, 4) + obj.fechaDocumento.Substring(3, 2) + obj.fechaDocumento.Substring(0, 2);

            obj.fechaDocumento = fdoc;

            if (obj.idHospedaje == "0")
            {
                if (obj.ingresoPais.Trim().Length > 8)
                {
                    obj.ingresoPais = obj.ingresoPais.Substring(6, 4) + obj.ingresoPais.Substring(3, 2) + obj.ingresoPais.Substring(0, 2);
                }

                if (obj.fechaIngresoHotel.Trim().Length > 8)
                {
                    obj.fechaIngresoHotel = obj.fechaIngresoHotel.Substring(6, 4) + obj.fechaIngresoHotel.Substring(3, 2) + obj.fechaIngresoHotel.Substring(0, 2);
                }

                if (obj.fechaSalidaHotel.Trim().Length > 8)
                {
                    obj.fechaSalidaHotel = obj.fechaSalidaHotel.Substring(6, 4) + obj.fechaSalidaHotel.Substring(3, 2) + obj.fechaSalidaHotel.Substring(0, 2);
                }
            }

            return(obj.idHospedaje == "0" ? IService.IInsHotels(obj) : IService.IUpdHotels(obj));
        }
        protected void btnSaveDuplicados_Click(object sender, EventArgs e)
        {
            List <BEHotel> lstBE  = new List <BEHotel>();
            List <BEHotel> lstBE2 = new List <BEHotel>();
            BEHotel        BE;
            IHotels        IService = new IHotels();

            BE             = new BEHotel();
            BE.correlativo = gvHotels.SelectedRow.Cells[2].Text;
            BE.idHospedaje = gvHotels.SelectedRow.Cells[0].Text;
            lstBE          = IService.IGetporCorrelativo(BE);
            CheckBox chk;

            foreach (GridViewRow rowItem in gvDuplicarRegistros.Rows)
            {
                BE             = new BEHotel();
                BE.idHospedaje = rowItem.Cells[1].Text;
                BE.serie       = HttpUtility.HtmlDecode(rowItem.Cells[2].Text);
                //BE.correlativo = this.lblNewCorrelativo.Text;//lblNewCorrelativo_Usar_Duplicar.Text;
                BE.correlativo       = gvHotels.SelectedRow.Cells[2].Text;
                BE.ruc               = HttpUtility.HtmlDecode(rowItem.Cells[4].Text);
                BE.agencia           = HttpUtility.HtmlDecode(rowItem.Cells[5].Text);
                BE.pasaporte         = HttpUtility.HtmlDecode(rowItem.Cells[6].Text);
                BE.apellidoPaterno   = HttpUtility.HtmlDecode(rowItem.Cells[7].Text);
                BE.paisPasaporte     = HttpUtility.HtmlDecode(rowItem.Cells[8].Text);
                BE.nombre            = HttpUtility.HtmlDecode(rowItem.Cells[9].Text);
                BE.fechaIngresoHotel = rowItem.Cells[10].Text;
                BE.fechaSalidaHotel  = rowItem.Cells[11].Text;
                BE.nroFicha          = HttpUtility.HtmlDecode(rowItem.Cells[12].Text);
                BE.unidad            = HttpUtility.HtmlDecode(rowItem.Cells[13].Text);
                BE.ingresoPais       = HttpUtility.HtmlDecode(rowItem.Cells[14].Text);
                BE.fechaDocumento    = rowItem.Cells[15].Text;
                BE.codLocal          = rowItem.Cells[16].Text;
                BE.codPeriodo        = ddlPeriodos.SelectedValue;
                BE.segundoNombre     = HttpUtility.HtmlDecode(rowItem.Cells[18].Text);
                BE.apellidoMaterno   = HttpUtility.HtmlDecode(rowItem.Cells[19].Text);
                BE.paisProcedencia   = HttpUtility.HtmlDecode(rowItem.Cells[20].Text);
                BE.flagValidacion    = "1";//rowItem.Cells[21].Text;
                lstBE.Add(BE);
                lstBE2.Add(BE);
            }


            gvViewRegistros.DataSource = lstBE;
            gvViewRegistros.DataBind();
            if (lstBE.Count > 0)
            {
                IService.IHotelsDuplicateINS(lstBE2);
            }

            //lstBE = new List<BEHotel>();
            //gvDuplicarRegistros.DataSource = lstBE;
            //gvDuplicarRegistros.DataBind();

            ClientScript.RegisterStartupScript(typeof(Page), "showPopupDuplicar", "showPopup('dvDuplicar',793);", true);
        }
        public static string DelGroupHotels(BEHotel obj)
        {
            IHotels IService = new IHotels();
            BEHotel BEHotel  = new BEHotel();

            BEHotel.codLocal    = obj.codLocal;
            BEHotel.codPeriodo  = obj.codPeriodo;
            BEHotel.correlativo = obj.correlativo;
            return(IService.IDelHotelsGroup(BEHotel));
        }
        protected void loadDocDistintos()
        {
            IHotels IService = new IHotels();
            BEHotel objBE    = new BEHotel();

            objBE.codLocal                = ddlLocales.SelectedValue;
            objBE.codPeriodo              = ddlPeriodos.SelectedValue;
            lstDocDistintos.DataSource    = IService.IGetDocDistintos(objBE);
            lstDocDistintos.DataTextField = "correlativo";
            lstDocDistintos.DataBind();
        }
        public void Bloqueo_y_Carga()
        {
            IHotels IService = new IHotels();
            BEHotel BEHotel  = new BEHotel();

            BEHotel.codLocal = ddlLocales.SelectedValue;

            txtUnidad.Text      = IService.IGetUnidad(BEHotel);
            txtUnidad.BackColor = System.Drawing.Color.LightGray;
            txtUnidad.Enabled   = false;
        }
Beispiel #9
0
 public HotelRepositoryTest()
 {
     this.iHotelLibrary                             = new Mock <IConnection <Hotel> >();
     this.iContactsLibrary                          = new Mock <IConnection <Contacts> >();
     this.iEmailReservationLibrary                  = new Mock <IConnection <EmailReservation> >();
     this.iTelephoneReservationLibrary              = new Mock <IConnection <TelephoneReservation> >();
     this.iHotelPaymentMethodRelationLibrary        = new Mock <IConnection <HotelPaymentMethodRelation> >();
     this.iHotelTaxRelationLibrary                  = new Mock <IConnection <HotelTaxRelation> >();
     this.iProfileCompletenessAggregateModelLibrary = new Mock <IConnection <ProfileCompletenessAggregateModel> >();
     this.iHotelViewLibrary                         = new Mock <IConnection <HotelView> >();
     this.hotelRepository                           = new HotelRepository(iHotelLibrary.Object, iContactsLibrary.Object, iEmailReservationLibrary.Object, iTelephoneReservationLibrary.Object,
                                                                          iHotelPaymentMethodRelationLibrary.Object, iHotelTaxRelationLibrary.Object, iProfileCompletenessAggregateModelLibrary.Object, iHotelViewLibrary.Object);
 }
        protected void btnSaveApplyRulers_Click(object sender, EventArgs e)
        {
            IHotels        IService = new IHotels();
            List <BEHotel> lstBE    = new List <BEHotel>();
            BEHotel        BEHotel  = new BEHotel();

            BEHotel.codLocal   = ddlLocales.SelectedValue;
            BEHotel.codPeriodo = ddlPeriodos.SelectedValue;
            lstBE = IService.IGetHotels(BEHotel);


            List <BEHotel> lstBE2 = new List <BEHotel>();

            lstBE2 = IService.IaplicarReglas(lstBE);
            string respuesta = IService.IUpdListHotels(lstBE2);
        }
        protected void IbtnSaveDuplicados_Click(object sender, EventArgs e)
        {
            List <BEHotel> lstBE = new List <BEHotel>();
            BEHotel        BE;
            IHotels        IService = new IHotels();
            CheckBox       chk;

            foreach (GridViewRow rowItem in gvDuplicarRegistros.Rows)
            {
                chk = (CheckBox)(rowItem.Cells[0].FindControl("RowCheckBox"));
                if (chk.Checked)
                {
                    BE                     = new BEHotel();
                    BE.idHospedaje         = rowItem.Cells[0].Text;
                    BE.serie               = rowItem.Cells[1].Text;
                    lblOldCorrelativo.Text = rowItem.Cells[2].Text;

                    BE.correlativo = rowItem.Cells[2].Text;
                    //BE.ruc = rowItem.Cells[3].Text;
                    //BE.agencia = rowItem.Cells[4].Text;
                    //BE.pasaporte = rowItem.Cells[5].Text;
                    //BE.apellidoPaterno = rowItem.Cells[6].Text;
                    //BE.paisPasaporte = rowItem.Cells[7].Text;
                    //BE.nombre = rowItem.Cells[8].Text;
                    //BE.fechaIngresoHotel = rowItem.Cells[9].Text;
                    //BE.fechaSalidaHotel = rowItem.Cells[10].Text;
                    //BE.nroFicha = rowItem.Cells[11].Text;
                    //BE.unidad = rowItem.Cells[12].Text;
                    //BE.ingresoPais = rowItem.Cells[13].Text;
                    //BE.fechaDocumento = rowItem.Cells[14].Text;
                    //BE.codLocal = rowItem.Cells[15].Text;
                    //BE.codPeriodo = ddlPeriodos.SelectedValue;
                    //BE.segundoNombre = rowItem.Cells[17].Text;
                    //BE.apellidoMaterno = rowItem.Cells[18].Text;
                    //BE.paisProcedencia = rowItem.Cells[19].Text;
                    //BE.flagValidacion = rowItem.Cells[20].Text;
                    lstBE.Add(BE);
                }
            }
            gvViewRegistros.DataSource = lstBE;
            gvViewRegistros.DataBind();
            if (lstBE.Count > 0)
            {
                IService.IHotelsDuplicateINS(lstBE);
            }
            //ClientScript.RegisterStartupScript(typeof(Page), "showPopupDuplicar", "showPopup('dvDuplicar',793);", true);
        }
        protected void btnAceptar_Click(object sender, EventArgs e)
        {
            IHotels IService = new IHotels();
            string  fdoc     = "";

            if (txtfecDoc.Text.Length > 5)
            {
                fdoc = txtfecDoc.Text.Substring(6, 4) + txtfecDoc.Text.Substring(3, 2) + txtfecDoc.Text.Substring(0, 2);
            }

            lblMsg.Text = "Se actualizaron " + IService.ISetNotaCredito(txtNumSerieNC.Text, txtNumCorrNC.Text, txtNumSerieFactura.Text, txtNumCorrFactura.Text, fdoc)
                          + " registro(s).";

            txtNumSerieNC.Text      = string.Empty;
            txtNumCorrNC.Text       = string.Empty;
            txtNumSerieFactura.Text = string.Empty;
            txtNumCorrFactura.Text  = string.Empty;
            txtfecDoc.Text          = string.Empty;
        }
Beispiel #13
0
        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);
        }
Beispiel #14
0
 public HotelsController(IHotels hotels)
 {
     _hotels = hotels;
 }
Beispiel #15
0
 public HotelManagementController(IHotels iHotel)
 {
     this.iHotel = iHotel;
 }
 public GetRecentlyRatedHotels(IHotels hotels)
 {
     _hotels = hotels;
 }
Beispiel #17
0
 public HotelsController(IHotels hotel)
 {
     _hotel = hotel;
 }
 public AddRating(IHotels hotels)
 {
     _hotels = hotels;
 }
Beispiel #19
0
 public GetHotel(IHotels hotels)
 {
     _hotels = hotels;
 }
        protected void loadGridDuplicar(int npageIndex = 0)
        {
            lblOldCorrelativo.Text = "";
            lblNewCorrelativo.Text = "";
            IHotels IService = new IHotels();
            BEHotel BE       = new BEHotel();

            BE.idHospedaje    = gvHotels.SelectedRow.Cells[0].Text;
            BE.correlativo    = gvHotels.SelectedRow.Cells[2].Text;
            BE.codLocal       = ddlLocales.SelectedValue;
            BE.codPeriodo     = ddlPeriodos.SelectedValue;
            BE.fechaDocumento = gvHotels.SelectedRow.Cells[16].Text;
            gvDuplicarRegistros.DataSource = IService.IGetHotelsAnteriores(BE);
            gvDuplicarRegistros.DataBind();
            if (gvDuplicarRegistros.Rows.Count > 0)
            {
                string fecha1 = gvDuplicarRegistros.Rows[0].Cells[15].Text;
                string fecha2 = gvHotels.SelectedRow.Cells[16].Text;
                lblOldCorrelativo.Text = gvDuplicarRegistros.Rows[0].Cells[3].Text + "  - Fecha:" + fecha1.Substring(6) + "/" + fecha1.Substring(4, 2) + "/" + fecha1.Substring(0, 4);
                //lblNewCorrelativo.Text = gvHotels.SelectedRow.Cells[2].Text + "  - Fecha:" + fecha2.Substring(6) + "/" + fecha2.Substring(4, 2) + "/" + fecha2.Substring(0, 4);
                lblNewCorrelativo.Text = gvHotels.SelectedRow.Cells[2].Text + "  - Fecha:" + fecha2;
                ////this.lblOldCorrelativo_Usar_Duplicar.Text = gvDuplicarRegistros.Rows[0].Cells[3].Text;
                ////this.lblNewCorrelativo_Usar_Duplicar.Text = gvHotels.SelectedRow.Cells[2].Text;
            }
            /**/
            BE             = new BEHotel();
            BE.correlativo = gvHotels.SelectedRow.Cells[2].Text;
            BE.idHospedaje = gvHotels.SelectedRow.Cells[0].Text;

            //foreach (BEHotel beHotel in IService.IGetporCorrelativo(BE))
            //{
            //    this.Lbl_Fecha_New.Text =beHotel.fechaDocumento ;
            //}
            //BE = IService.IGetporCorrelativo(BE);
            //this.Lbl_Fecha_New.Text=  BE.fechaDocumento;
            gvViewRegistros.DataSource = IService.IGetporCorrelativo(BE);
            gvViewRegistros.DataBind();
        }

        protected void loadDropPeriodos(Boolean loadLocal = false)
        {
            int       index    = ddlPeriodos.SelectedIndex;
            IPeriodos IService = new IPeriodos();
            //Dim obj As UserStore = DirectCast(Session.Item("SessionUser"), UserStore)
            BEUser BE = new BEUser();

            BE = (BEUser)Session["LoginUser"];
            List <BEPeriodoEmpresa> lstPeriodoEmpresa = new List <BEPeriodoEmpresa>();


            List <BEPeriodoEmpresa> AlllistaPeriodos = IService.IGetPeriodos(BE);

            cCodLocal = AlllistaPeriodos[0].codLocal;
            if (loadLocal)
            {
                loadDropLocal(cCodLocal);
            }

            cCodLocal = ddlLocales.SelectedValue;

            if (!string.IsNullOrEmpty(cCodLocal))
            {
                lstPeriodoEmpresa = AlllistaPeriodos.FindAll(
                    delegate(BEPeriodoEmpresa PE)
                {
                    return(PE.codLocal == cCodLocal);
                });
            }
            else
            {
                foreach (BEPeriodoEmpresa objPerEmp in AlllistaPeriodos)
                {
                    List <BEPeriodoEmpresa> LstPerEmpToadd = lstPeriodoEmpresa.FindAll(
                        delegate(BEPeriodoEmpresa PE)
                    {
                        return(PE.descPeriodo == objPerEmp.descPeriodo);
                    });
                    if (LstPerEmpToadd == null || LstPerEmpToadd.Count == 0)
                    {
                        lstPeriodoEmpresa.Add(objPerEmp);
                    }
                }
            }



            if (lstPeriodoEmpresa.Count > 0)
            {
                ddlPeriodos.DataSource     = lstPeriodoEmpresa;
                ddlPeriodos.DataValueField = "codPeriodoEmpresa";
                ddlPeriodos.DataTextField  = "descPeriodo";
                ddlPeriodos.DataBind();
                cCodLocal = lstPeriodoEmpresa[0].codLocal;
                if (index < lstPeriodoEmpresa.Count)
                {
                    ddlPeriodos.SelectedIndex = index;
                }
            }
        }

        protected void loadDropLocal(string cCodLocal)
        {
            ILocal  IService = new ILocal();
            BELocal BE       = new BELocal();
            BEUser  BEuser   = new BEUser();

            BEuser = (BEUser)Session["LoginUser"];
            if (BEuser.codRol == "3")
            {
                BE.codLocal = string.Empty;
            }
            else
            {
                BE.codLocal = cCodLocal;
            }
            ddlLocales.DataSource     = IService.IGetLocal(BE);
            ddlLocales.DataValueField = "codLocal";
            ddlLocales.DataTextField  = "nomLocal";
            ddlLocales.DataBind();
        }

        //protected void loadDropPais()
        //{
        //    IHotels IService = new IHotels();
        //    List<BEPais> lst = new List<BEPais>();
        //    lst = IService.GetPaises();
        //    if (lst.Count > 0)
        //    {

        //        ddlPaisPasaporte.DataSource = lst;
        //        ddlPaisPasaporte.DataValueField = "descPais";
        //        ddlPaisPasaporte.DataTextField = "descPais";
        //        ddlPaisPasaporte.DataBind();

        //        ddlPaisProcedencia.DataSource = lst;
        //        ddlPaisProcedencia.DataValueField = "descPais";
        //        ddlPaisProcedencia.DataTextField = "descPais";
        //        ddlPaisProcedencia.DataBind();
        //    }
        //}
        protected void loadDropPais()
        {
            IHotels       IService = new IHotels();
            List <BEPais> lst      = new List <BEPais>();

            lst = IService.GetPaises();
            if (lst.Count > 0)
            {
                ddlPaisPasaporte.DataSource     = lst;
                ddlPaisPasaporte.DataValueField = "codPais";
                ddlPaisPasaporte.DataTextField  = "descPais";
                ddlPaisPasaporte.DataBind();

                ddlPaisProcedencia.DataSource     = lst;
                ddlPaisProcedencia.DataValueField = "codPais";
                ddlPaisProcedencia.DataTextField  = "descPais";
                ddlPaisProcedencia.DataBind();
            }
        }

        protected string validatePeriodo()
        {
            IPeriodos i = new IPeriodos();

            return(i.IValPeriodo());
        }

        protected void loadListErrors()
        {
            IHotels        IService = new IHotels();
            List <BEHotel> lstBE    = new List <BEHotel>();
            BEHotel        BEHotel  = new BEHotel();

            BEHotel.codLocal   = ddlLocales.SelectedValue;
            BEHotel.codPeriodo = ddlPeriodos.SelectedValue;
            /**/
            BEHotel.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue);
            BEHotel.textPrmSearch = txtPrmSearch.Text.Trim();
            //if (chkRangeDate.Checked)
            if (ddlTipoFechaPrm.SelectedValue != "0")
            {
                BEHotel.prmDesde = txtDesde.Text;
                BEHotel.prmHasta = txtHasta.Text;
            }
            /**/
            lstBE = IService.IGetHotelsValidados(BEHotel);
            lstErrorList.DataSource = IService.IvalidarCaracteres(lstBE);
            lstErrorList.DataBind();
        }

        protected void applyRules()
        {
            IHotels        IService = new IHotels();
            List <BEHotel> lstBE    = new List <BEHotel>();
            BEHotel        BEHotel  = new BEHotel();

            BEHotel.codLocal   = ddlLocales.SelectedValue;
            BEHotel.codPeriodo = ddlPeriodos.SelectedValue;
            /**/
            BEHotel.tipoPrmSearch = Convert.ToInt32(ddlTipoPrm.SelectedValue);
            BEHotel.textPrmSearch = txtPrmSearch.Text.Trim();
            //if (chkRangeDate.Checked)
            if (ddlTipoFechaPrm.SelectedValue != "0")
            {
                BEHotel.prmDesde = txtDesde.Text;
                BEHotel.prmHasta = txtHasta.Text;
            }
            /**/
            lstBE = IService.IGetHotels(BEHotel);
            List <BEHotel> lstBE2 = new List <BEHotel>();

            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();*/
            //List<BEHotel> lstBE2 = new List<BEHotel>();
            //lstBE2 = IService.IaplicarReglas(lstBE);
            //string respuesta = IService.IUpdListHotels(lstBE2);
        }
        public static string DelHotels(BEHotel obj)
        {
            IHotels IService = new IHotels();

            return(IService.IDelHotels(obj));
        }
        public static string ValidaVenta(BEHotel obj)
        {
            IHotels IService = new IHotels();

            return(IService.IValUsuarioVentas(obj));
        }