示例#1
0
        private void btnAll_Click(object sender, EventArgs e)
        {
            ClearForm1();

            List <TurmaDTO> lista = new TurmaBLL().GetAllData();

            Grid.GridViewDataBind(lista.ToDataTable(), gridMessage);
        }
示例#2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            var param = new TurmaDTO();

            if (cmbSearchType.SelectedItem.ToString() == "Nome da Turma")
            {
                param.nomeTurma = txtSearch.Text;
            }
            else if (cmbSearchType.SelectedItem.ToString() == "Código da Turma")
            {
                if (txtSearch.Text != string.Empty)
                {
                    param.idTurma = Convert.ToInt32(txtSearch.Text);
                }
            }

            List <TurmaDTO> lista = new TurmaBLL().GetDataWithParam(param);

            Grid.GridViewDataBind(lista.ToDataTable(), gridMessage);
        }
示例#3
0
        public void CarregaGrid()
        {
            List <TurmaDTO> lista = new TurmaBLL().GetAllData();

            Grid.GridViewDataBind(lista.ToDataTable(), gridMessage);
        }