Example #1
0
        private async void CBox_Pojas_SelectedIndexChanged(object sender, EventArgs e)
        {
            SelectedPojas = CBox_Pojas.SelectedItem as Pojas;

            if (SelectedPojas != null && SelectedPojas.Id > 0)
            {
                PanelClanovi.Controls.Clear();
                var Result = await _Clanovi.GetByPojas <List <Clan> >(Parameters, SelectedPojas.Id);

                PanelClanovi.Show();
                for (int i = Result.Count; i >= 1; i--)
                {
                    ControlClanovi ctr = new ControlClanovi(Result[i - 1])
                    {
                        Dock = DockStyle.Top
                    };
                    PanelClanovi.Controls.Add(ctr);
                }

                if (Parameters.PageNumber == 1)
                {
                    PBox_Previous.Visible = false;
                    PBox_Next.Visible     = true;
                }
                else if (Parameters.PageNumber > 1)
                {
                    PBox_Previous.Visible = true;
                }
                if (Result.Count < Parameters.PageSize)
                {
                    PBox_Next.Visible = false;
                }
            }
        }
 private void CBox_Pojas_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectedPojas = CBox_Pojas.SelectedItem as Pojas;
     if (SelectedPojas != null && SelectedPojas.Id > 0)
     {
         PojasId = SelectedPojas.Id;
     }
     else
     {
         PojasId = 1;
     }
 }