Exemplo n.º 1
0
    //--------------------------------------------------------------------------------

    private void ShowGrid()
    {
        try
        {
            Manufacturers m_Manufacturers = new Manufacturers();
            m_Manufacturers.ManufacturerName = txtSearch.Text;
            string DateFrom = txtDateFrom.Text;
            string DateTo   = txtDateTo.Text;
            int    RowCount = 0;
            List <Manufacturers> l_Manufacturers = m_Manufacturers.GetPage("", "", ddlOrderBy.SelectedValue, m_grid.PageSize, CustomPaging.PageIndex - 1, ref RowCount);

            m_grid.DataSource = l_Manufacturers;
            m_grid.DataBind();
            lblTong.Text           = RowCount.ToString();
            CustomPaging.TotalPage = (RowCount == 0) ? 1 : (RowCount % m_grid.PageSize == 0) ? RowCount / m_grid.PageSize : (RowCount - RowCount % m_grid.PageSize) / m_grid.PageSize + 1;
        }
        catch (Exception ex)
        {
            sms.utils.Log.writeLog(ex.ToString(), ((new System.Diagnostics.StackTrace()).GetFrames()[0]).GetMethod().Name);
        }
    }