protected void LoadItems()
 {
     if (!HasEditPermission)
     {
         dgMyBids.Columns[dgMyBids.Columns.Count - 1].Visible = false;
     }
     if (AllBids)
     {
         dgMyBids.VirtualItemCount = Convert.ToInt32(BidController.GetCountAllBidByCustomerTypeAndBidType(customerType, bidType, BidLeave));
     }
     else
     {
         dgMyBids.VirtualItemCount = Convert.ToInt32(BidController.GetCountBidByCustomerIdAndBidType(CustomerId, customerType, bidType));
     }
     if (dgMyBids.VirtualItemCount == 0)
     {
         phHasItems.Visible   = false;
         phHasNoItems.Visible = true;
         lblNoItems.Text      = BidString.GetText(@"MessageNoBidsFound");
     }
     else
     {
         phHasItems.Visible   = true;
         phHasNoItems.Visible = false;
         if (dgMyBids.PageSize * dgMyBids.CurrentPageIndex > dgMyBids.VirtualItemCount)
         {
             dgMyBids.CurrentPageIndex         = 0;
             hfCurrentPageIndex_dgMyBids.Value = dgMyBids.CurrentPageIndex.ToString();
         }
         if (AllBids)
         {
             List <BidUI> coll = BidController.GetAllBidByCustomerTypeAndBidType(customerType, bidType, BidLeave, dgMyBids.PageSize, dgMyBids.CurrentPageIndex);
             BindList(coll);
         }
         else
         {
             List <BidUI> coll = BidController.GetAllBidByCustomerIdAndBidType(CustomerId, customerType, bidType, dgMyBids.PageSize, dgMyBids.CurrentPageIndex);
             BindList(coll);
         }
     }
 }