protected void btnKaydet_Click(object sender, EventArgs e) { using (sfKalDataEntities ent = new sfKalDataEntities()) { DisPersonel oDisPersonel = new DisPersonel(); oDisPersonel.UId = Guid.NewGuid(); oDisPersonel.AdSoyad = AdSoyadTextBox.Text.Trim(); oDisPersonel.Faaliyet = FaaliyetDropDownList.SelectedValue; oDisPersonel.BolgeKodu = short.Parse(BolgeKoduDropDownList.SelectedValue); oDisPersonel.Silindi = SilindiCheckBox.Checked; ent.AddToDisPersonel(oDisPersonel); ent.SaveChanges(); BindData(); divEdit.Visible = false; } }