Beispiel #1
0
 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;
     }
 }
Beispiel #2
0
 protected void DisPersonelDoldur(int Id)
 {
     try
     {
         EFDal       ed           = new EFDal();
         DisPersonel oDisPersonel = ed.DisPersonelDon(Id);
         lblDisPersonelId.Text = oDisPersonel.Id.ToString();
         UIdTextBox.Text       = oDisPersonel.UId.ToString();
         AdSoyadTextBox.Text   = oDisPersonel.AdSoyad;
         FaaliyetDropDownList.SelectedValue  = oDisPersonel.Faaliyet;
         BolgeKoduDropDownList.SelectedValue = oDisPersonel.BolgeKodu.ToString();
         SilindiCheckBox.Checked             = oDisPersonel.Silindi;
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
     }
 }