protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         var sonuc = personel_veritabani.TumPersonelleriListele();
         if (sonuc.basariliMi)
         {
             DrpPersonel.DataSource     = sonuc.Veri.ToList();
             DrpPersonel.DataTextField  = "adsoyad";
             DrpPersonel.DataValueField = "tc";
             DrpPersonel.DataBind();
             DrpPersonel.Items.Insert(0, new ListItem("Sorumlu Personel Seçiniz (Varsayılan << Ben >>)", "0"));
         }
         Listele();
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                var urunler  = (from x in db.TBLURUNLER select new { x.URUNAD, x.URUNID, x.DURUM }).Where(p => p.DURUM == true).ToList();
                var ktgr     = (from y in db.TBLKATEGORI select new { y.KATEGORIAD, y.KATEGORIID }).ToList();
                var musteri  = (from z in db.TBLMUSTERI select new { Musteri = (z.MUSTERIAD + " " + z.MUSTERISOYAD), z.MUSTERIID }).ToList();
                var personel = (from x in db.TBLPERSONEL select new { x.PERSONELADSOYAD, x.PERSONELID }).ToList();;
                DrpUrun.DataTextField  = "URUNAD";
                DrpUrun.DataValueField = "URUNID";
                DrpUrun.DataSource     = urunler;
                DrpUrun.DataBind();

                DrpMusteri.DataTextField  = "Musteri";
                DrpMusteri.DataValueField = "MUSTERIID";
                DrpMusteri.DataSource     = musteri;
                DrpMusteri.DataBind();

                DrpPersonel.DataTextField  = "PERSONELADSOYAD";
                DrpPersonel.DataValueField = "PERSONELID";
                DrpPersonel.DataSource     = personel;
                DrpPersonel.DataBind();
            }
        }