Пример #1
0
        private void Button1_Click_1(object sender, EventArgs e)
        {
            if (Session.Online)
            {
                Post np = new Post();
                np.ShowDialog();

                y             = 5;
                panel4.Height = 180;
                panel4.Controls.Clear();
                int i = 0;
                foreach (var item in classes.ServiceList.selectAll())
                {
                    if (i > 8)
                    {
                        break;
                    }
                    postcard a = new postcard(item.Tipo, item.Detalhes, item.Valor, item.Id, item.Sugestoes, item.Visualizacoes, item.Like, item.Avaliacao, item.Ativo, item.Image);
                    a.Location    = new Point(0, (y));
                    y             = y + a.Height + 5;
                    panel4.Height = panel4.Height + 180;
                    panel4.Controls.Add(a);
                    i++;
                }
            }
            else
            {
                MessageBox.Show("É nessessario estar logado para cadastrar um serviço");
            }
        }
Пример #2
0
        private void Formservicos_Load(object sender, EventArgs e)
        {
            panel4.Height = 180;
            int i = 0;

            foreach (var item in classes.ServiceList.selectAll())
            {
                if (i > 8)
                {
                    break;
                }
                postcard a = new postcard(item.Tipo, item.Detalhes, item.Valor, item.Id, item.Sugestoes, item.Visualizacoes, item.Like, item.Avaliacao, item.Ativo, item.Image);
                a.Location    = new Point(0, (y));
                y             = y + a.Height + 5;
                panel4.Height = panel4.Height + 180;
                panel4.Controls.Add(a);
                i++;
            }
        }