private void BtnQuery_Click(object sender, EventArgs e) { int pageNum = Convert.ToInt16(txtPageNum.Text); int pageSize = Convert.ToInt16(txtPageSize.Text); dgvData.DataSource = null; Application.DoEvents(); EPoStatus poStatus = (EPoStatus)cbPoStatus.SelectedIndex; EPoSubType subType = (EPoSubType)cbPoSubType.SelectedIndex; EShipmentStatus shipmentStatus = (EShipmentStatus)cbShipmentStatus.SelectedIndex; PoLineListOutput poLine = bll.GetPoLineList(pageNum, poStatus, subType, shipmentStatus, pageSize); if (poLine != null) { totalPages = poLine.PageVO.TotalPages; lbTotalPages.Text = "/" + totalPages; txtTotalRows.Text = poLine.PageVO.TotalRows.ToString(); dgvData.DataSource = poLine.Result; } }
static void Main(string[] args) { PoBLL bll = new PoBLL(); PoLineListOutput polineList = bll.GetPoLineList(2, EPoStatus.all, EPoSubType.P, EShipmentStatus.all, 2); if (polineList != null) { Console.WriteLine("Find POs!"); Console.WriteLine("Total rows: " + polineList.PageVO.TotalRows); Console.WriteLine("Total pages: " + polineList.PageVO.TotalPages); Console.WriteLine("Page size: " + polineList.PageVO.PageSize); Console.WriteLine("Current pages: " + polineList.PageVO.CurPage); } else { Console.WriteLine("Nothing found!"); } Console.WriteLine(""); Console.WriteLine("Press any key to quit..."); Console.ReadKey(); }