void OgrenciListele()
        {
            List <EntityOgrenci> OgrList = BllOgrenci.GetAll();

            dataGridView1.DataSource = OgrList;
            this.Text = "Öğrenci Listesi";
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <EntityOgrenci> entityOgrenci = BllOgrenci.OgrListeleBll();

            Repeater1.DataSource = entityOgrenci;
            Repeater1.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int x = Convert.ToInt32(Request.QueryString["OgrId"]);
            //  Response.Write(x);

            EntityOgrenci entityOgrenci = new EntityOgrenci();

            entityOgrenci.OgrId = x;

            BllOgrenci.OgrSilBll(entityOgrenci.OgrId);
            Response.Redirect("OgrenciListesi.aspx");
        }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            EntityOgrenci ent = new EntityOgrenci();

            ent.Ad       = txtAd.Text;
            ent.Soyad    = txtSoyad.Text;
            ent.Fotograf = txtFotograf.Text;
            ent.KulupID  = Convert.ToInt16(cmbKulup.SelectedValue);
            BllOgrenci.Add(ent);
            MessageBox.Show("Öğrenci Kaydı Yapıldı", "Yeni Kayıt", MessageBoxButtons.OK, MessageBoxIcon.Information);
            OgrenciListele();
        }
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            EntityOgrenci ent = new EntityOgrenci();

            ent.Ad       = txtAd.Text;
            ent.Soyad    = txtSoyad.Text;
            ent.Fotograf = txtFotograf.Text;
            ent.KulupID  = Convert.ToInt16(cmbKulup.SelectedValue);
            ent.ID       = Convert.ToInt16(txtid.Text);
            BllOgrenci.Update(ent);
            MessageBox.Show("Öğrenci Bilgileri Güncellendi", "Bilgi Güncelleme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            OgrenciListele();
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            EntityOgrenci entityOgrenci = new EntityOgrenci();

            entityOgrenci.OgrAd     = txtOgrAd.Text;
            entityOgrenci.OgrSoyad  = txtOgrSoyad.Text;
            entityOgrenci.OgrNumara = txtOgrNo.Text;
            entityOgrenci.OgrFoto   = txtOgrFoto.Text;
            entityOgrenci.OgrSifre  = txtOgrSifre.Text;
            entityOgrenci.OgrId     = Convert.ToInt32(txtOgrId.Text);

            BllOgrenci.OgrUpdateBll(entityOgrenci);
            Response.Redirect("OgrenciListesi.aspx");
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            EntityOgrenci entityOgrenci = new EntityOgrenci

            {
                OgrAd     = txtOgrAd.Text,
                OgrSoyad  = txtOgrSoyad.Text,
                OgrNumara = txtOgrNo.Text,
                OgrFoto   = txtOgrFoto.Text,
                OgrSifre  = txtOgrSifre.Text,
            };

            BllOgrenci.OgrEkleBll(entityOgrenci);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int x = Convert.ToInt32(Request.QueryString["OgrId"]);

            txtOgrId.Text    = x.ToString();
            txtOgrId.Enabled = false;

            if (Page.IsPostBack == false)
            {
                List <EntityOgrenci> OgrList = BllOgrenci.OgrGuncelleBll(x);

                txtOgrAd.Text    = OgrList[0].OgrAd.ToString();
                txtOgrSoyad.Text = OgrList[0].OgrSoyad.ToString();
                txtOgrNo.Text    = OgrList[0].OgrNumara.ToString();
                txtOgrFoto.Text  = OgrList[0].OgrFoto.ToString();
                txtOgrSifre.Text = OgrList[0].OgrSifre.ToString();
            }
        }