using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class CadastroInstituicao : System.Web.UI.Page { private int vID = 0; protected void Page_Load(object sender, EventArgs e) { string valor = Request.QueryString["Parametro"]; if (!Page.IsPostBack) { ASPxFormLayout1.Enabled = false; Instituicao Inst = new Instituicao(); cbbinstituicao.DataSource = Inst.GetAll(); cbbinstituicao.DataBind(); Curso Cur = new Curso(); cbbcurso.DataSource = Cur.GetAll(); cbbcurso.DataBind(); Nivel Niv = new Nivel(); cbbnivel.DataSource = Niv.GetAll(); cbbnivel.DataBind(); Estudante Cad = new Estudante(); Cad.GetId(Request.QueryString["Id"].ToString()); cbbinstituicao.SelectedItem = cbbinstituicao.Items.FindByValue(Cad.instituicao); cbbcurso.SelectedItem = cbbcurso.Items.FindByValue(Cad.curso); cbbnivel.SelectedItem = cbbnivel.Items.FindByValue(Cad.nivel); cbbsexo.Value =Cad.sexo; txtnome.Text = Cad.nome ; txtcpf.Text = Cad.cpf ; txtrg.Text = Cad.rg ; txtemail.Text = Cad.email; dtpnascimento.Date = Convert.ToDateTime(Cad.nascimento.ToString()); txtrua.Text = Cad.rua; txtnr.Text = Cad.nr; txtbairro.Text = Cad.bairro; txtcomplemento.Text = Cad.complemento; txtcep.Text = Cad.cep ; txtcidade.Text = Cad.cidade; cbbuf.Text = Cad.uf; txtfone1.Text = Cad.fone1 ; txtfone2.Text = Cad.fone2 ; txtfone3.Text = Cad.fone3 ; vID = Convert.ToInt32(Request.QueryString["Id"].ToString()); imgfoto.ImageUrl = "~/Fotos/" + vID.ToString() + ".jpg"; } } protected void ASPxFormLayout1_E3_Click(object sender, EventArgs e) { } protected void ASPxFormLayout1_E4_Click(object sender, EventArgs e) { } protected void uplfoto_FileUploadComplete(object sender, DevExpress.Web.FileUploadCompleteEventArgs e) { //} } }