Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
<span style="color: #800000"><strong>Kısa Tanım:</strong></span>
<span style="color: #1e4e79"> </span>
Tablo içerisindeki kolonlarda renklendirme işleminde en düşük fiyatın renklendirmesi örneği anlatılmıştır.
 
<span style="color: #800000"><strong>Açıklama:</strong></span>
<span style="color: #1e4e79"> </span>
<span style="color: #1e4e79">Bu özellikle genelde satın alma siparişlerinde tercih edilmekte olup, tedarikçilerden fiyatların gelmesi sonucu tek tabloda en düşük fiyatın renklendirilerek daha hızlı bir şekilde teklif aşamasını ilerletmemizi amaçlamaktadır.</span> <span style="color: #1e4e79">Ayrıca tedarikçi seçimi kolonunda da en düşük fiyata ait  tedarikçinin otomatik seçilmesi sağlanmıştır. Bu örnekte hem hücre renklendirme hem kolon isimlendirme, hem de en düşük ya da yüksek değeri bulma ile ilgili bilgi bulabilirsiniz.  Kodlar form yüklendiğinde kısmına yazılmıştır.</span> 
\\
<span style="color: #800000"><strong>Kod Örneği:</strong></span>
\\
<span style="color: #008000">//---------------<span style="text-decoration: line-through; ">ORNEK DATA OLUŞTURULMASI</span>----------------------------------------------------</span>Teklifler.<span style="color: #191970"><strong>SetColumnLabelText</strong></span>(<span style="color: #0000ff">"Teklifler__col1"</span>,<span style="color: #0000ff">"A Firması"</span>);Teklifler.<span style="color: #191970"><strong>SetColumnLabelText</strong></span>(<span style="color: #0000ff">"Teklifler__col2"</span>,<span style="color: #0000ff">"B Firması"</span>);Teklifler.<span style="color: #191970"><strong>SetColumnLabelText</strong></span>(<span style="color: #0000ff">"Teklifler__col3"</span>,<span style="color: #0000ff">"C Firması"</span>);Teklifler.<span style="color: #191970"><strong>SetColumnLabelText</strong></span>(<span style="color: #0000ff">"Teklifler__col4"</span>,<span style="color: #0000ff">"D Firması"</span>); <span style="color: #ff0000">string</span> tedarikci=<span style="color: #0000ff">""</span>; <span style="color: #0000ff"><strong>for</strong></span> (<span style="color: #ff0000"><strong>int</strong></span> i = <span style="color: #00008b">0</span>; i <<span style="color: #00008b">5</span>; i++)\{    tedarikci=i==<span style="color: #00008b">0</span>?<span style="color: #0000ff">"A Firması"</span>:i==<span style="color: #00008b">1</span>?<span style="color: #0000ff">"B Firması"</span>:i==<span style="color: #00008b">2</span>?<span style="color: #0000ff">"C Firması"</span>:i==<span style="color: #00008b">3</span>?<span style="color: #0000ff">"C Firması"</span>:i==<span style="color: #00008b">4</span>?<span style="color: #0000ff">"D Firması"</span>:<span style="color: #0000ff">""</span>;    System.Random rnd = <span style="color: #008b8b"><strong>new</strong></span> System.<span style="color: #191970"><strong>Random</strong></span>(Guid.<span style="color: #191970"><strong>NewGuid</strong></span>().<span style="color: #191970"><strong>GetHashCode</strong></span>());    System.Collections.Generic.Dictionary<<span style="color: #ff0000">string</span>, <span style="color: #ff0000">object</span>> OrnekData = <span style="color: #008b8b"><strong>new</strong></span> System.Collections.Generic.Dictionary<<span style="color: #ff0000">string</span>, <span style="color: #ff0000">object</span>>();    OrnekData.<span style="color: #191970"><strong>Add</strong></span>(<span style="color: #0000ff">"Tedarikci"</span>,tedarikci);    OrnekData.<span style="color: #191970"><strong>Add</strong></span>(Teklifler_Columns.col1, rnd.<span style="color: #191970"><strong>Next</strong></span>(<span style="color: #00008b">100000</span>,<span style="color: #00008b">100000000</span>));    OrnekData.<span style="color: #191970"><strong>Add</strong></span>(Teklifler_Columns.col2, rnd.<span style="color: #191970"><strong>Next</strong></span>(<span style="color: #00008b">100000</span>,<span style="color: #00008b">100000000</span>));    OrnekData.<span style="color: #191970"><strong>Add</strong></span>(Teklifler_Columns.col3, rnd.<span style="color: #191970"><strong>Next</strong></span>(<span style="color: #00008b">100000</span>,<span style="color: #00008b">100000000</span>));    OrnekData.<span style="color: #191970"><strong>Add</strong></span>(Teklifler_Columns.col4, rnd.<span style="color: #191970"><strong>Next</strong></span>(<span style="color: #00008b">100000</span>,<span style="color: #00008b">100000000</span>));    Teklifler.Content.<span style="color: #191970"><strong>AddRow</strong></span>(OrnekData);\} <span style="color: #008000">//---------------<span style="text-decoration: line-through; ">ORNEK DATA OLUŞTURULMASI</span>----------------------------------------------------</span>   <span style="color: #008000">//---------------<span style="text-decoration: line-through; ">EN DÜŞÜK DEĞERİN ALINIP RENKLENDİRİLMESİ</span>----------------------------------------------------</span>  <span style="color: #ff0000"><strong>double</strong></span> col1=<span style="color: #00008b">0</span>,col2=<span style="color: #00008b">0</span>,col3=<span style="color: #00008b">0</span>,col4=<span style="color: #00008b">0</span>; <span style="color: #ff0000"><strong>double</strong></span>\[\] liste =<span style="color: #008b8b"><strong>new</strong></span> <span style="color: #ff0000"><strong>double</strong></span>\[<span style="color: #00008b">4</span>\];   <span style="color: #0000ff"><strong>for</strong></span> (<span style="color: #ff0000"><strong>int</strong></span> i = <span style="color: #00008b">0</span>; i <Teklifler.Content.Items.Count; i++)\{    <span style="color: #008080"><strong>try</strong></span>\{col1=Teklifler.Content.Items\[i\]\[Teklifler_Columns.col1\].<span style="color: #191970"><strong>ToDouble</strong></span>();\}<span style="color: #008080"><strong>catch</strong></span>\{col1=<span style="color: #00008b">0</span>;\}    <span style="color: #008080"><strong>try</strong></span>\{col2=Teklifler.Content.Items\[i\]\[Teklifler_Columns.col2\].<span style="color: #191970"><strong>ToDouble</strong></span>();\}<span style="color: #008080"><strong>catch</strong></span>\{col2=<span style="color: #00008b">0</span>;\}    <span style="color: #008080"><strong>try</strong></span>\{col3=Teklifler.Content.Items\[i\]\[Teklifler_Columns.col3\].<span style="color: #191970"><strong>ToDouble</strong></span>();\}<span style="color: #008080"><strong>catch</strong></span>\{col3=<span style="color: #00008b">0</span>;\}     <span style="color: #008080"><strong>try</strong></span>\{col4=Teklifler.Content.Items\[i\]\[Teklifler_Columns.col4\].<span style="color: #191970"><strong>ToDouble</strong></span>();\}<span style="color: #008080"><strong>catch</strong></span>\{col4=<span style="color: #00008b">0</span>;\}    liste\[<span style="color: #00008b">0</span>\]=col1><span style="color: #00008b">0</span>?col1:<span style="color: #00008b">0</span>;    liste\[<span style="color: #00008b">1</span>\]=col2><span style="color: #00008b">0</span>?col2:<span style="color: #00008b">0</span>;    liste\[<span style="color: #00008b">2</span>\]=col3><span style="color: #00008b">0</span>?col3:<span style="color: #00008b">0</span>;    liste\[<span style="color: #00008b">3</span>\]=col4><span style="color: #00008b">0</span>?col4:<span style="color: #00008b">0</span>;        <span style="color: #ff0000"><strong>double</strong></span> m = Array.<span style="color: #191970"><strong>IndexOf</strong></span>(liste,liste.<span style="color: #191970"><strong>Where</strong></span>(x => x != <span style="color: #00008b">0</span>).<span style="color: #191970"><strong>DefaultIfEmpty</strong></span>().<span style="color: #191970"><strong>Min</strong></span>());    <span style="color: #0000ff"><strong>if</strong></span>(liste.<span style="color: #191970"><strong>Where</strong></span>(x => x != <span style="color: #00008b">0</span>).<span style="color: #191970"><strong>DefaultIfEmpty</strong></span>().<span style="color: #191970"><strong>Min</strong></span>()><span style="color: #00008b">0</span>)    \{        Teklifler.<span style="color: #191970"><strong>SetApperance</strong></span>(<span style="color: #0000ff">"Teklifler__col"</span>+(m+<span style="color: #00008b">1</span>),VariableApperance.<span style="color: #191970"><strong>Create</strong></span>(<span style="color: #0000ff">"green"</span>,<span style="color: #0000ff">"white"</span>,<span style="color: #008b8b"><strong>true</strong></span>, <span style="color: #00008b">15</span>), i);        Teklifler.<span style="color: #191970"><strong>SetValue</strong></span>(Teklifler_Columns.Tedarikci,Teklifler.<span style="color: #191970"><strong>GetColumn</strong></span>(<span style="color: #0000ff">"Teklifler__col"</span>+(m+<span style="color: #00008b">1</span>)).Label,i);    \}\}
 
<span style="color: #800000"><strong>Akış Dosyası (.xnm):</strong></span>
<span style="color: #800000"> </span>
Aşağıdaki dosyayı indirerek uygulamaya aktarabilirsiniz. İçeri aktarma işleminin nasıl yapıldığına dair bilgi için [Aktar|https://docs.logo.com.tr/display/logoflow/Dosya#Dosya-Aktar] bölümünü inceleyebilirsiniz.