Esempio n. 1
0
 public static List<Data.DataKatmani.BulunanMetin> MetinAra(string Metin)
 {
     using (Models.PoliklinikEntities5 p = new Models.PoliklinikEntities5())
     {
         List<Data.DataKatmani.BulunanMetin> sonucList = new List<Data.DataKatmani.BulunanMetin>();
         var S = p.sp_MetinAra(Metin).ToList();
         ContentPlaceHolder ContentHolder;
         _default dd=new _default();
         ListBox list;
         ContentHolder = (ContentPlaceHolder) dd.Master.FindControl("ContentPlaceHolder1");
         list =  ContentHolder.FindControlRecursive("listboxSearch") as ListBox;
         foreach (var item in S)
         {
             Data.DataKatmani.BulunanMetin sonuc = new Data.DataKatmani.BulunanMetin();
             sonuc.UrunAdi = item.UrunAdi;
             sonuc.UrunID = item.UrunID;
             sonucList.Add(sonuc);
             list.Items.Add(new ListItem(sonuc.UrunAdi, sonuc.UrunID.ToString()));
         }
         //l.DataBind();
         return sonucList;
     }
 }
Esempio n. 2
0
 public static List <Data.DataKatmani.BulunanMetin> MetinAra(string Metin)
 {
     using (Models.PoliklinikEntities5 p = new Models.PoliklinikEntities5())
     {
         List <Data.DataKatmani.BulunanMetin> sonucList = new List <Data.DataKatmani.BulunanMetin>();
         var S = p.sp_MetinAra(Metin).ToList();
         ContentPlaceHolder ContentHolder;
         _default           dd = new _default();
         ListBox            list;
         ContentHolder = (ContentPlaceHolder)dd.Master.FindControl("ContentPlaceHolder1");
         list          = ContentHolder.FindControlRecursive("listboxSearch") as ListBox;
         foreach (var item in S)
         {
             Data.DataKatmani.BulunanMetin sonuc = new Data.DataKatmani.BulunanMetin();
             sonuc.UrunAdi = item.UrunAdi;
             sonuc.UrunID  = item.UrunID;
             sonucList.Add(sonuc);
             list.Items.Add(new ListItem(sonuc.UrunAdi, sonuc.UrunID.ToString()));
         }
         //l.DataBind();
         return(sonucList);
     }
 }