Beispiel #1
0
        protected void LoadPages()
        {
            int nPageNumber = int.Parse(txtPageNumber.Text);
            int nPageSize   = int.Parse(txtPageSize.Text);

            int nTotalRecord = HandlingPackaging_Data.Count(Session["EmployeeKey"].ToInt());

            if (nTotalRecord > nPageSize * 5)
            {
                nTotalRecord = nPageSize * 5;
            }
            if (nTotalRecord > nPageSize)
            {
                PageNumbers.Visible = true;
                DataTable nTable = TNLibrary.WEB.LoadDataToToolboxWeb.LoadPageSize(nPageSize, nTotalRecord, nPageNumber);

                PageNumbers.SelectedIndex = (nPageNumber - 1) - (int.Parse(nTable.Rows[0][0].ToString()) - 1);
                PageNumbers.DataSource    = nTable;
                PageNumbers.DataBind();
            }
            else
            {
                PageNumbers.Visible = false;
            }
        }
Beispiel #2
0
        protected void LoadPages()
        {
            int nPageNumber = int.Parse(txtPageNumber.Text);
            int nPageSize   = int.Parse(txtPageSize.Text);

            int nTotalRecord = ForSale_Data.Count(Session["EmployeeKey"].ToInt());

            if (nTotalRecord > nPageSize * 5)
            {
                nTotalRecord = nPageSize * 5;
            }
            if (nTotalRecord > nPageSize)
            {
                PageNumbers.Visible = true;
                DataTable nTable = TNLibrary.WEB.LoadDataToToolboxWeb.LoadPageSize(nPageSize, nTotalRecord);

                PageNumbers.SelectedIndex = nPageNumber - 1;
                PageNumbers.DataSource    = nTable;
                PageNumbers.DataBind();
            }
            else
            {
                PageNumbers.Visible = false;
            }
        }
        protected void LoadPages()
        {
            int      nPageNumber = int.Parse(txtPageNumber.Text);
            int      nPageSize   = int.Parse(txtPageSize.Text);
            DateTime dtfrom;
            DateTime dtto;

            if (Session["dtfrom"] != null)
            {
                dtfrom = DateTime.ParseExact(Session["dtfrom"].ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                dtto   = DateTime.ParseExact(Session["dtto"].ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
            else
            {
                dtfrom = DateTime.ParseExact(txtfromDatetime.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                dtto   = DateTime.ParseExact(txttoDatetime.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
            int nTotalRecord = CooperativeSale_Data.Count(dtfrom, dtto, Session["CooperativeKey"].ToInt());

            if (nTotalRecord > nPageSize)
            {
                PageNumbers.Visible = true;
                DataTable nTable = TNLibrary.WEB.LoadDataToToolboxWeb.LoadPageSize(nPageSize, nTotalRecord, nPageNumber);

                PageNumbers.SelectedIndex = (nPageNumber - 1) - (int.Parse(nTable.Rows[0][0].ToString()) - 1);
                PageNumbers.DataSource    = nTable;
                PageNumbers.DataBind();
            }
            else
            {
                PageNumbers.Visible = false;
            }
        }
Beispiel #4
0
        protected void LoadPages()
        {
            int nPageNumber = int.Parse(txtPageNumber.Text);
            int nPageSize   = int.Parse(txtPageSize.Text);

            int nTotalRecord = 0;

            if (rdbType.SelectedValue == "1")
            {
                nTotalRecord = Fertilizer_Common_Data.Count(txtSearch.Text);
            }
            else
            {
                nTotalRecord = Pesticide_Common_Data.Count(txtSearch.Text);
            }
            if (nTotalRecord > nPageSize)
            {
                PageNumbers.Visible = true;
                DataTable nTable = TNLibrary.WEB.LoadDataToToolboxWeb.LoadPageSize(nPageSize, nTotalRecord, nPageNumber);

                PageNumbers.SelectedIndex = (nPageNumber - 1) - (int.Parse(nTable.Rows[0][0].ToString()) - 1);
                PageNumbers.DataSource    = nTable;
                PageNumbers.DataBind();
            }
            else
            {
                PageNumbers.Visible = false;
            }
        }
Beispiel #5
0
        protected void LoadPages()
        {
            int nPageNumber = int.Parse(txtPageNumber.Text);
            int nPageSize   = int.Parse(txtPageSize.Text);

            int nTotalRecord = Environments_Data.Count(txtSearch.Text);

            if (nTotalRecord > nPageSize)
            {
                PageNumbers.Visible = true;
                DataTable nTable = TNLibrary.WEB.LoadDataToToolboxWeb.LoadPageSize(nPageSize, nTotalRecord, nPageNumber);
                PageNumbers.SelectedIndex = (nPageNumber - 1) - (int.Parse(nTable.Rows[0][0].ToString()) - 1);
                PageNumbers.DataSource    = nTable;
                PageNumbers.DataBind();
            }
            else
            {
                PageNumbers.Visible = false;
            }
        }
Beispiel #6
0
        protected void LoadPages()
        {
            int nPageNumber             = int.Parse(txtPageNumber.Text);
            int nPageSize               = int.Parse(txtPageSize.Text);
            SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"];
            int nTotalRecord            = Users_Roles_Data.Count(nUserLogin.CooperativeVenturesKey, nUserLogin.GroupKey, txtSearch.Text);

            if (nTotalRecord > nPageSize)
            {
                PageNumbers.Visible = true;
                DataTable nTable = TNLibrary.WEB.LoadDataToToolboxWeb.LoadPageSize(nPageSize, nTotalRecord, nPageNumber);

                PageNumbers.SelectedIndex = (nPageNumber - 1) - (int.Parse(nTable.Rows[0][0].ToString()) - 1);
                PageNumbers.DataSource    = nTable;
                PageNumbers.DataBind();
            }
            else
            {
                PageNumbers.Visible = false;
            }
        }