/// <summary> /// metodo que preenche os campos na edição de uma sala /// </summary> /// <param name="e"></param> private void PreencherCampos(DirectEventArgs e) { SalaSelecionada = new SalaBO().SelectById(e.ExtraParams["id"].ToInt32()); txtNome.Text = SalaSelecionada.Nome; hdfSetor.Value = SalaSelecionada.Setor != null ? SalaSelecionada.Setor.Id.ToString() : ""; ddfSetor.Text = SalaSelecionada.Setor != null ? SalaSelecionada.Setor.Nome : "[Nenhum]"; }
/// <summary> /// metodo que limpa os campos do form de cadastro de salas /// </summary> private void LimparCampos() { SalaSelecionada = null; txtNome.Clear(); hdfSetor.Value = String.Empty; ddfSetor.Text = "[Nenhum]"; }