Your SlideShare is downloading. ×
0
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Database Related Comboboxes
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Database Related Comboboxes

1,066

Published on

Adobe Flex Air ile hazırlanmış birbiriyle ilişkili çalışan combobox'lar üzerine bir örnektir.

Adobe Flex Air ile hazırlanmış birbiriyle ilişkili çalışan combobox'lar üzerine bir örnektir.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,066
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Database Related Comboboxes by Özlem YAVUZ
  • 2. Adobe Flex Combobox Bileşeni Nedir ?
  • 3. Kullanıcının birçok değer içerisinden rahatlıkla bir seçim yapmasına olanak sağlayan bir bileşendir. Kullanıcının hatasız veri girişine olanak sağlar. Combobox
  • 4. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; verticalAlign=&quot;top&quot; backgroundColor=&quot;white&quot; width=&quot;374&quot; height=&quot;204&quot;> <mx:XMLList id=&quot;projeGrubuXMLList&quot;> <kisi abbrev=&quot;CBS Yüksek Lisans&quot; name=&quot;Özlem YAVUZ &quot; /> <kisi abbrev=&quot;CBS Yüksek Lisans&quot; name=&quot;Can AYDIN &quot; /> <kisi abbrev=&quot;Ekonometri Doktora&quot; name=&quot;Ömür Deniz DALAN &quot; /> <kisi abbrev=&quot;Ekonometri Yüksek Lisans&quot; name=&quot;Lütfiye Özge ORAL &quot; /> </mx:XMLList> <mx:ComboBox id=&quot;comboBox&quot; prompt=&quot;Bir Kişi Seçiniz...&quot; dataProvider=&quot;{projeGrubuXMLList}&quot; labelField=&quot;@name&quot;/> </mx:Application> Combobox Çok Basit Bir Combobox Örneği
  • 5. Gölgelendirme Efekti Verilerek Yazı Karakteri Değiştirilmiş Combobox Örneği Combobox <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; verticalAlign=&quot;top&quot; backgroundColor=&quot;white&quot; width=&quot;392&quot; height=&quot;240&quot;> <mx:Style> .myComboBoxDropdown { dropShadowEnabled: true; shadowDistance: 3; shadowDirection: &quot;right&quot;; cornerRadius: 5; } </mx:Style> <mx:ComboBox dropdownStyleName=&quot;myComboBoxDropdown&quot; prompt=&quot;Kişi Seçiniz...&quot;> <mx:dataProvider> <mx:String>Özlem YAVUZ</mx:String> <mx:String>Can AYDIN</mx:String> <mx:String>Ömür Deniz DALAN</mx:String> <mx:String>Lüftiye Özge ORAL</mx:String> </mx:dataProvider> </mx:ComboBox> </mx:Application>
  • 6. Liste İçerisindeki Öğelerde Açıklama Bulunduran Combobox Örneği Combobox <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; verticalAlign=&quot;top&quot; backgroundColor=&quot;white&quot; > <mx:Script> <![CDATA[ import mx.utils.StringUtil; private function comboBox_labelFunc(item:Object):String { return StringUtil.substitute( &quot;{0} ({1})&quot; , item.@name, item.@abbrev); } ]]> </mx:Script> <mx:XMLList id=&quot;projeGrubuXMLList&quot;> <kisi abbrev=&quot;CBS Yüksek Lisans&quot; name=&quot;Özlem YAVUZ &quot; /> <kisi abbrev=&quot;CBS Yüksek Lisans&quot; name=&quot;Can AYDIN &quot; /> <kisi abbrev=&quot;Ekonometri Doktora&quot; name=&quot;Ömür Deniz DALAN &quot; /> <kisi abbrev=&quot;Ekonometri Yüksek Lisans&quot; name=&quot;Lütfiye Özge ORAL”/> </mx:XMLList> <mx:ComboBox id=&quot;comboBox“ prompt=&quot;Bir Kişi Seçiniz“ dataProvider=&quot;{projeGrubuXMLList}“ labelFunction=&quot;comboBox_labelFunc&quot; /> </mx:Application> Parantez İçerisindeki Öğeler Veritabanında Yer Almaz.
  • 7. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; verticalAlign=&quot;top&quot; backgroundColor=&quot;white&quot; width=&quot;414&quot; height=&quot;278&quot;> <mx:ApplicationControlBar dock=&quot;true&quot;> <mx:Label text=&quot;Combobox Genişliği:&quot; /> <mx:HSlider id=&quot;ayarCubugu&quot; minimum=&quot;50&quot; maximum=&quot;200&quot; value=&quot;80&quot; liveDragging=&quot;true&quot; labels=&quot;[50,200]&quot; tickInterval=&quot;25&quot; snapInterval=&quot;10&quot; /> </mx:ApplicationControlBar> <mx:ComboBox id=&quot;comboBox&quot; width=&quot;{ayarCubugu.value}&quot; itemRenderer=&quot;mx.controls.Label&quot;> <mx:dataProvider> <mx:Array> <mx:Object label=&quot;Tepki&quot; /> <mx:Object label=&quot;Şu Çılgın Türkler&quot; /> <mx:Object label=&quot;Da Vinci Şifresi&quot; /> <mx:Object label=&quot;Kanlı Kartal&quot; /> <mx:Object label=&quot;Melekler ve Şeytanlar&quot; /> </mx:Array> </mx:dataProvider> </mx:ComboBox> </mx:Application> Combobox Manual Olarak Combobox Genişliğini Ayarlama Örneği
  • 8. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical“ verticalAlign=&quot;top“ backgroundColor=&quot;white“ width=&quot;354“ height=&quot;230&quot;> <mx:Script> <![CDATA[ private function combobox_change(): void { comboBox.setStyle( &quot;textAlign&quot; , comboBox.selectedItem.alignment); } ]]> </mx:Script> <mx:ComboBox id=&quot;comboBox“; width=&quot;250&quot; change=&quot;combobox_change()&quot;> <mx:dataProvider> <mx:Array> <mx:Object label=&quot;Sola Yasla&quot; alignment=&quot;left&quot; /> <mx:Object label=&quot;Ortala&quot; alignment=&quot;center&quot;/> <mx:Object label=&quot;Sağa Yasla“ alignment=&quot;right&quot;/> </mx:Array> </mx:dataProvider> </mx:ComboBox> </mx:Application> Combobox Listedeki Öğelerin Konumlandırılmaları Örneği
  • 9. Combobox Liste İçerisine İcon Yerleştirme Örneği <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; verticalAlign=&quot;top&quot; backgroundColor=&quot;white&quot; width=&quot;352&quot; height=&quot;244&quot;> <mx:Script> <![CDATA[ import mx.events.FlexEvent; private function init(): void { comboBox.dropdown.iconField = &quot;icon&quot; ; } ]]> </mx:Script> <mx:ComboBox id=&quot;comboBox&quot; rowCount=&quot;4&quot; width=&quot;200&quot; themeColor=&quot;haloSilver&quot; textIndent=&quot;5&quot; prompt=&quot;Seçiniz...&quot; creationComplete=&quot;init()&quot;> <mx:dataProvider> <mx:Array> <mx:Object label=&quot;Çıkar&quot; icon=&quot;@Embed(source='images/remove.png')&quot; /> <mx:Object label=&quot;Ekle&quot; icon=&quot;@Embed(source='images/add.png')&quot; /> <mx:Object label=&quot;Ara&quot; icon=&quot;@Embed(source='images/search.png')&quot; /> </mx:Array> </mx:dataProvider> </mx:ComboBox> </mx:Application>
  • 10. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical“ verticalAlign=&quot;top“ backgroundColor=&quot;white“ width=&quot;356“ height=&quot;276&quot;> <mx:Script> <![CDATA[ import mx.effects.easing.*; ]]> </mx:Script> <mx:ComboBox id=&quot;comboBox“ prompt=&quot;Meslek Seçiniz...“ dropdownWidth=&quot;150&quot; alternatingItemColors=&quot;[0xDFDFDF, 0xEEEEEE]&quot;> <mx:dataProvider> <mx:Array> <mx:Object label=&quot;Şehir ve Bölge Planlama&quot; /> <mx:Object label=&quot;Mühendislik&quot; /> <mx:Object label=&quot;Mimarlık&quot; /> </mx:Array> </mx:dataProvider> </mx:ComboBox> </mx:Application> Combobox Listedeki Öğelerin Renklendirilmesi Örneği
  • 11. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot; verticalAlign=&quot;top&quot; backgroundColor=&quot;white&quot; width=&quot;418&quot; height=&quot;282&quot;> <mx:ComboBox id=&quot;bolum“ dataProvider=&quot;{mcs.bolum}&quot; labelField=&quot;@label“ width=&quot;200“ prompt=&quot;Bölüm Seçiniz...&quot;> </mx:ComboBox> <mx:ComboBox id=&quot;ogrenci“ dataProvider=&quot;{bolum.selectedItem.ogrenci}&quot; labelField=&quot;@label“ width=&quot;200“ prompt=&quot;Öğrenci Seçiniz...&quot;> </mx:ComboBox> <mx:XMLList id=&quot;mcs&quot; xmlns=&quot;&quot;> <ogrenciler> <bolum label=&quot;Coğrafi Bilgi Sistemleri (YL) &quot;> <ogrenci label=&quot;Özlem YAVUZ&quot;/> <ogrenci label=&quot;Can AYDIN&quot;/> </bolum> <bolum label=&quot;Ekonometri (YL) &quot;> <ogrenci label=&quot;Lütfiye Özge ORAL&quot;/> </bolum> <bolum label=&quot;Ekonometri (DR) &quot;> <ogrenci label=&quot;Ömür Deniz DALAN&quot;/> </bolum> </ogrenciler> </mx:XMLList> </mx:Application> Combobox İki Combobox’ın İlişkili Çalışması Örneği
  • 12. Combobox Üzerinde Seçili Öğeyi Veritabanında Saklama Teknikleri
  • 13. <ul><li>Label </li></ul><ul><li>İndex </li></ul><ul><li>Kendinizin Belirleyeceği Bir Değişkeni </li></ul><ul><li> veritabanında saklayabilirsiniz. </li></ul>Combobox ve Veritabanı
  • 14. <ul><li>Veritabanı Oluşturulur </li></ul>Combobox ve Veritabanı
  • 15. <ul><li>Combobox Yaratmak </li></ul><ul><li>Seçili Öğeyi Veritabanına Yazdıracak Komutu Oluşturmak </li></ul>Combobox ve Veritabanı
  • 16. Combobox Kullanarak Veritabanına Veri Yazmak
  • 17. <ul><li>Flex İki Çeşit Veritabanı Kullanmaya Olanak Saklamaktadır : </li></ul><ul><li>İnternet Üzerinde (Flex Project) </li></ul><ul><li>Bilgisayar Üzerinde (AIR Project) </li></ul><ul><li>Bilgisayar üzerinde oluşturulan veritabanına dışarıdan ulaşmak mümkün değildir. Sadece işlem yapılan bilgisayar üzerinde çalışılmaktadır. </li></ul>Veritabanı İle Çalışmak
  • 18. <ul><li>“ HTTP.Service” ve “.php” dosyaları (Flex Project) </li></ul><ul><li>Script içerisine yazılacak “SqlConnection” ve “SqlStatement” lar (AIR Project) </li></ul><ul><li>ile veritabanına bağlantı sağlanır. </li></ul>Veritabanı İle Çalışmak
  • 19. Veritabanını Combobox Kullanarak Güncellemek
  • 20. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <mx:WindowedApplication xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; creationComplete=&quot;veriTabaninaBaglan()&quot; height=&quot;474&quot; backgroundColor=&quot;white&quot; width=&quot;559&quot;> <mx:Script> <![CDATA[ private function kaydet(): void { var update:SQLStatement = new SQLStatement(); update.sqlConnection = baglanti; update.addEventListener(SQLErrorEvent.ERROR, sqlErrorFH); update.text = &quot;UPDATE universite SET okulAdi='&quot; +degistirOkulCB.selectedLabel+ &quot;', okulindex='&quot; +degistirOkulCB.selectedIndex+ &quot;', bolumAdi='&quot; +degistirBolumCB.selectedLabel+ &quot;', bolumindex='&quot; +degistirBolumCB.selectedIndex+ &quot;', ogrenciAdi='&quot; +degisogrenciTI.text+ &quot;'WHERE id='&quot; +okulDG.selectedItem.id+ &quot;'&quot; ; update.execute(); } ]]> </mx:Script> <mx:ComboBox x=&quot;178.5&quot; y=&quot;206“ id=&quot;okulCB“ dataProvider=&quot;{mcs.okul}“ labelField=&quot;@label“ prompt=&quot;Bir Okul Seçiniz“ width=&quot;200“/ > <mx:ComboBox x=&quot;178.5&quot; y=&quot;236“ id=&quot;bolumCB“ selectedIndex=&quot;-1“ dataProvider=&quot;{okulCB.selectedItem.bolum}“ labelField=&quot;@label“ prompt=&quot;Bir Bölüm Seçiniz“ width=&quot;200“/> <mx:TextInput x=&quot;178.5&quot; y=&quot;266&quot; width=&quot;200&quot; id=&quot;ogrenciTI&quot;/> <mx:DataGrid x=&quot;10&quot; y=&quot;40&quot; width=&quot;537&quot; id=&quot;okulDG&quot; itemClick=&quot;degistir()&quot;> <mx:columns> <mx:DataGridColumn headerText=&quot;Okul Adı&quot; dataField=&quot;okulAdi&quot;/> <mx:DataGridColumn headerText=&quot;Bölüm Adı&quot; dataField=&quot;bolumAdi&quot;/> <mx:DataGridColumn headerText=&quot;Öğrenci Adı&quot; dataField=&quot;ogrenciAdi&quot;/> </mx:columns> </mx:DataGrid> <mx:XMLList id=&quot;mcs&quot; xmlns=&quot;&quot;> <veriler> <okul label=&quot;DEÜ&quot;> <bolum label=&quot;Coğrafi Bilgi Sistemleri&quot;/> <bolum label=&quot;Ekonometri&quot;/> </okul> <okul label=&quot;İYTE&quot;> <bolum label=&quot;Şehir ve Bölge Planlama&quot;/> <bolum label=&quot;Mimarlık&quot;/> </okul> <okul label=&quot;EGE&quot;> <bolum label=&quot;İnşaat Mühendisliği&quot;/> <bolum label=&quot;Jeofizik Mühendisliği&quot;/> </okul> </veriler> </mx:XMLList> <mx:ComboBox x=&quot;18&quot; y=&quot;316&quot; id=&quot;degistirOkulCB“ dataProvider=&quot;{mcs.okul}“ labelField=&quot;@label“ width=&quot;200“/> <mx:ComboBox x=&quot;18&quot; y=&quot;346&quot; id=&quot;degistirBolumCB&quot; dataProvider=&quot;{degistirOkulCB.selectedItem.bolum}“ labelField=&quot;@label“ width=&quot;200“/> <mx:TextInput x=&quot;18&quot; y=&quot;376&quot; id=&quot;degisogrenciTI&quot; text=&quot;{okulDG.selectedItem.ogrenciAdi}&quot; width=&quot;200&quot;/> <mx:Button x=&quot;246&quot; y=&quot;376&quot; label=&quot;KAYDET&quot; click=&quot;kaydet()&quot;/> </mx:WindowedApplication> Combobox İle Güncellemek
  • 21. Combobox İle Güncellemek

×