protected override MasterVO FillObject() { EnvironmentsVO environmentVO = new EnvironmentsVO(); environmentVO.Id = Convert.ToInt32(txt_Id.Text); environmentVO.Name = txt_Name.Text; environmentVO.Description = txt_Description.Text; return(environmentVO); }
public override MasterVO BiuldVO(DataRow row) { EnvironmentsVO environment = new EnvironmentsVO(); environment.Id = Convert.ToInt32(row["id"]); environment.Name = row["name"].ToString(); environment.Description = row["description"].ToString(); return(environment); }
private void btn_Confirm_Click(object sender, EventArgs e) { if (dgv_Listing.CurrentRow != null) { EnvironmentsVO environment = new EnvironmentsVO(); environment.Id = Convert.ToInt32(dgv_Listing.CurrentRow.Cells[0].Value); environment.Name = dgv_Listing.CurrentRow.Cells[1].Value.ToString(); environment.Description = dgv_Listing.CurrentRow.Cells[2].Value.ToString(); uc_EnvironmentRegister.Instance.FillScreen(environment); this.Visible = false; } else { MessageBox.Show("Selecione uma linha válida"); } }
private void btn_Pesquisar_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_Name.Text)) { MessageBox.Show("Digite um valor válido para o nome."); } else { EnvironmentsDAO dao = new EnvironmentsDAO(); EnvironmentsVO type = new EnvironmentsVO(); type.Name = txt_Name.Text; DataTable table = dao.SQLSearch(type); dgv_Listing.DataSource = table; } }