Ejemplo n.º 1
0
        public void BindHomePageSearchList()
        {
            DateTime FromDate = Convert.ToDateTime("2013/01/01");
            DateTime Todate   = Convert.ToDateTime("9999/01/01");

            if (txtPageValidDateFrom.Text == "")
            {
                setupBE.PageValidDateFrom = FromDate;
            }
            else
            {
                IFormatProvider culture = new CultureInfo("es-Mx", true);
                setupBE.PageValidDateFrom = DateTime.Parse(txtPageValidDateFrom.Text, culture);
            }



            if (txtPageValidDateTo.Text == "")
            {
                setupBE.PageValidDateTo = Todate;
            }
            else
            {
                IFormatProvider culture = new CultureInfo("es-Mx", true);
                setupBE.PageValidDateTo = DateTime.Parse(txtPageValidDateTo.Text, culture);
            }

            setupBE.PageValidTimeFrom = DdlFromHrs.Text + ":" + DdlFromMns.Text;
            setupBE.PageValidTimeTo   = DdlToHrs.Text + ":" + DdlToMns.Text;
            if (txtPageHtml.Text == "")
            {
                setupBE.PageHtml = "";
            }
            else
            {
                setupBE.PageHtml = txtPageHtml.Text;
            }
            DataTable dt = new DataTable();

            if (setupBAL.SearchHomePage(setupBE, ref dt))
            {
                lblPageSize.Visible        = true;
                ddlPageSize.Visible        = true;
                LvHomePageItems.Visible    = true;
                HomePageDataPager.Visible  = true;
                ddlPageSize.Text           = HomePageDataPager.PageSize.ToString();
                LvHomePageItems.DataSource = dt;
                LvHomePageItems.DataBind();
            }
            else
            {
                lblPageSize.Visible       = false;
                ddlPageSize.Visible       = false;
                LvHomePageItems.Visible   = false;
                HomePageDataPager.Visible = false;
            }
        }
Ejemplo n.º 2
0
        private void BindHomePageList()
        {
            HomePageSetUpBAL setupBAL = new HomePageSetUpBAL();
            DataTable        dt       = new DataTable();

            if (setupBAL.ShowHomePage(ref dt))
            {
                this.LvHomePageItems.DataSource = dt;
                LvHomePageItems.DataBind();
            }
            else
            {
            }
        }