Ejemplo n.º 1
0
        private void BindData(int nPageIndex)
        {
            string strWhere = string.Empty;
            int    nCount   = 0;

            if (ddlProject.SelectedValue.Trim().Length > 0)
            {
                strWhere += string.Format(" AND D.PROJECTID={0} ", ddlProject.SelectedValue);
            }
            if (txtProductName.Text.Trim().Length > 0)
            {
                strWhere += string.Format(" AND D.PRODUCTNAME='{0}' ", ValidatorHelper.SafeSql(txtProductName.Text.Trim()));
            }
            if (ddlStauts.SelectedValue.Trim().Length > 0)
            {
                strWhere += string.Format(" AND D.PRODUCTFLAG={0} ", ddlStauts.SelectedValue);
            }

            DataTable dt = ProductBusiness.GetProductList(nPageIndex, GlobalConsts.PageSize_Default, strWhere, out nCount);

            rptProductInfo.DataSource = dt;
            rptProductInfo.DataBind();
            PageBar1.PageSize    = GlobalConsts.PageSize_Default;
            PageBar1.PageIndex   = nPageIndex;
            PageBar1.RecordCount = nCount;
            PageBar1.Draw();
        }
Ejemplo n.º 2
0
        private void BindData(int nPageIndex)
        {
            string strWhere = string.Format(" AND COMPANYID={0} ", CompanyId);
            int    nCount   = 0;

            //账号名
            if (txtAccountName.Text.Trim().Length > 0)
            {
                strWhere += string.Format(" AND ACCOUNTNAME ='{0}' ", ValidatorHelper.SafeSql(txtAccountName.Text));
            }

            // 姓名

            if (txtRealName.Text.Trim().Length > 0)
            {
                strWhere += string.Format(" AND REALNAME='{0}' ", ValidatorHelper.SafeSql(txtRealName.Text));
            }

            //状态
            if (ddlAccountStatus.SelectedValue.Trim().Length > 0)
            {
                strWhere += string.Format(" AND STATUS={0} ", ddlAccountStatus.SelectedValue);
            }

            DataTable dt = AccountBusiness.GetAccountList(nPageIndex, GlobalConsts.PageSize_Default, strWhere, out nCount);

            rptAccountInfo.DataSource = dt;
            rptAccountInfo.DataBind();
            PageBar1.PageIndex   = nPageIndex;
            PageBar1.PageSize    = GlobalConsts.PageSize_Default;
            PageBar1.RecordCount = nCount;
            PageBar1.Draw();
        }
Ejemplo n.º 3
0
    private void BindData()
    {
        XiHuan_UserGoodsSearchFilter f = new XiHuan_UserGoodsSearchFilter();

        f.SelectFileds      = @" g.Id,g.Name,g.DefaultPhoto,g.ViewCount,g.CreateDate,g.OwnerId,g.OwnerName,
                            g.NewDeep,g.OnlyCityChange,g.OnlySchoolChange,g.HopeToChangeTypeId,g.HopeToChangeChildTypeId,
                            g.HopeToChangeDesc,g.ProvinceName,g.CityName,g.AreaName,g.SchoolName,g.GoodState,g.DetailUrl,g.IsChecked";
        f.GoodsName         = txtGoodName.Text;
        f.GoodsTypeId       = CommonMethod.ConvertToInt(ddlGoodType.SelectedValue, int.MaxValue);
        f.GoodsSceondTypeId = CommonMethod.ConvertToInt(ddlGoodChildType.SelectedValue, int.MaxValue);
        f.ProvinceId        = CommonMethod.ConvertToInt(ddlProvince.SelectedValue, int.MaxValue);
        f.CityId            = CommonMethod.ConvertToInt(ddlCity.SelectedValue, int.MaxValue);
        f.AreaId            = CommonMethod.ConvertToInt(ddlArea.SelectedValue, int.MaxValue);
        f.SchooId           = CommonMethod.ConvertToInt(ddlSchool.SelectedValue, int.MaxValue);
        f.NewDeep           = CommonMethod.ConvertToInt(ddlNewOldDeep.SelectedValue, int.MaxValue);
        f.IsHavePhoto       = chkHavePhoto.Checked ? 1 : int.MaxValue;
        string value = ddlTime.SelectedValue.Trim();

        if (value.Trim().Length > 0)
        {
            DateTime dtbegin = DateTime.MinValue;
            if (value.Equals("0"))
            {
                dtbegin = DateTime.Now.AddDays(-7);
            }
            if (value.Equals("1"))
            {
                dtbegin = DateTime.Now.AddMonths(-1);
            }
            if (value.Equals("2"))
            {
                dtbegin = DateTime.Now.AddMonths(-3);
            }
            f.CreateDateBegin = dtbegin;
            f.CreateDateEnd   = DateTime.Now;
        }

        f.IsChecked = 1;
        if (chkShow.Checked)
        {
            f.GoodsStateNotIn = XiHuan_UserGoodsFacade.GoodsState.交换中.ToString("d") + "," + XiHuan_UserGoodsFacade.GoodsState.交换成功.ToString("d");
        }
        f.OrderByParam = ddlOrderBy.SelectedValue + "desc ";
        f.OwnerId      = CommonMethod.ConvertToInt(Request["ownerid"], int.MaxValue);
        f.OwnerName    = txtOwnerName.Text;
        f.PageIndex    = PageBar1.PageIndex;
        int       rowcount;
        DataTable dt = XiHuan_UserGoodsFacade.SearchGoods(f, out rowcount);

        rptGoodsList.DataSource = dt;
        rptGoodsList.DataBind();
        PageBar1.RecordCount = rowcount;
        PageBar1.Draw();
    }
Ejemplo n.º 4
0
    private void BindData()
    {
        XiHuan_UserSearchFilter f = new XiHuan_UserSearchFilter();

        f.SelectFileds = " u.Id,u.UserName,u.HeadImage,u.ProvinceName,u.CityName,u.AreaName,u.SchoolName,u.RegisterDate,u.LastLoginTime,u.GoodsNumber,u.QQ,u.WangWang  ";
        f.UserName     = txtGoodName.Text;
        f.ProvinceId   = CommonMethod.ConvertToInt(ddlProvince.SelectedValue, int.MaxValue);
        f.CityId       = CommonMethod.ConvertToInt(Request["city"], int.MaxValue);
        f.AreaId       = CommonMethod.ConvertToInt(Request["ddlArea"], int.MaxValue);
        f.SchooId      = CommonMethod.ConvertToInt(Request["school"], int.MaxValue);
        f.IsHavePhoto  = chkHavePhoto.Checked ? 1 : int.MaxValue;
        f.IsStartUser  = chkStarUser.Checked ? 1 : int.MaxValue;
        f.Gender       = CommonMethod.ConvertToInt(ddlGender.SelectedValue, int.MaxValue);
        string value = ddlTime.SelectedValue.Trim();

        if (value.Trim().Length > 0)
        {
            DateTime dtbegin = DateTime.MinValue;
            if (value.Equals("0"))
            {
                dtbegin = DateTime.Now.AddDays(-7);
            }
            if (value.Equals("1"))
            {
                dtbegin = DateTime.Now.AddMonths(-1);
            }
            if (value.Equals("2"))
            {
                dtbegin = DateTime.Now.AddMonths(-3);
            }
            f.CreateDateBegin = dtbegin;
            f.CreateDateEnd   = DateTime.Now;
        }

        f.OrderByParam = ddlOrderBy.SelectedValue + " desc ";
        f.PageIndex    = PageBar1.PageIndex;
        int       rowcount = 0;
        DataTable dt       = XiHuan_UserFacade.SearchUser(f, out rowcount);

        rptGoodsList.DataSource = dt;
        rptGoodsList.DataBind();
        PageBar1.RecordCount = rowcount;
        PageBar1.Draw();
    }
Ejemplo n.º 5
0
    private void BindGoods()
    {
        XiHuan_UserGoodsSearchFilter f = new XiHuan_UserGoodsSearchFilter();
        int rowcount;

        f.SelectFileds = "g.Id,Name,OwnerName,OwnerId,DefaultPhoto,GoodState,ViewCount,CreateDate,DetailUrl,IsTJ,IsChecked ";
        if (txtGoodName.Text.Trim().Length > 0)
        {
            f.GoodsName = txtGoodName.Text;
        }
        f.PageIndex = PageBar1.PageIndex;
        f.IsChecked = chkOnlyShow.Checked ? 0 : int.MinValue;
        DataTable dt = XiHuan_UserGoodsFacade.SearchGoods(f, out rowcount);

        rptGoodsList.DataSource = dt;
        rptGoodsList.DataBind();
        PageBar1.RecordCount = rowcount;
        PageBar1.Draw();
    }
        private void BindData(int nPageIndex)
        {
            string strWhere = string.Empty;
            int    nCount   = 0;

            if (txtCompanyName.Text.Trim().Length > 0)
            {
                strWhere += string.Format(" AND COMPANYNAME LIKE '%{0}%' ", ValidatorHelper.SafeSql(txtCompanyName.Text));
            }
            if (ddlCompanyType.SelectedValue.Trim().Length > 0)
            {
                strWhere += string.Format(" AND COMPANYTYPE={0} ", ddlCompanyType.SelectedValue);
            }

            DataTable dt = CompanyBusiness.GetCompanyRelateList(nPageIndex, GlobalConsts.PageSize_Default, strWhere, out nCount);

            rptCompanyRelateInfo.DataSource = dt;
            rptCompanyRelateInfo.DataBind();
            PageBar1.PageIndex   = nPageIndex;
            PageBar1.PageSize    = GlobalConsts.PageSize_Default;
            PageBar1.RecordCount = nCount;
            PageBar1.Draw();
        }
Ejemplo n.º 7
0
        private void BindData(int nPageIndex)
        {
            string strWhere = string.Format("  AND R.COMPANYID={0} ", CompanyId);

            strWhere += string.Format(" AND R.PROJECTID={0} ", ddlProject.SelectedValue);


            int nCount = 0;

            //角色名
            if (txtRoleName.Text.Trim().Length > 0)
            {
                strWhere += string.Format(" AND R.ROLENAME ='{0}' ", ValidatorHelper.SafeSql(txtRoleName.Text));
            }

            DataTable dt = RoleBusiness.GetRoleList(nPageIndex, GlobalConsts.PageSize_Default, strWhere, out nCount);

            rptRoleInfo.DataSource = dt;
            rptRoleInfo.DataBind();
            PageBar1.PageIndex   = nPageIndex;
            PageBar1.PageSize    = GlobalConsts.PageSize_Default;
            PageBar1.RecordCount = nCount;
            PageBar1.Draw();
        }