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>
Akış içerisindeki XmlSerialize() +yapılmamış+ tablo bilgilerini farklı bir tabloya aktarma işlemidir.
 
<span style="color: #800000"><strong>Açıklama:</strong></span>
<span style="color: #1e4e79"> </span>
<span style="color: #1e4e79">Akış içerisinde bulunan tablolardaki verilerin raporlanması talep edildiğinde tablo satır bilgilerine sql' den ulaşabilmeniz için tabloların büyük metin değişkenlerine XmlSerialize() yöntemi ile atılması gerekmektedir. Fakat bu işlem yapılmamış ya da daha sonra yapılmış ise eski akışlardaki tablo satırları verilerini almak için bu kodlama yöntemi kullanılabilmektedir.</span> <span style="color: #1e4e79">Tablo verilerinin alındığı örnek akış,</span>  [https://docs.logo.com.tr/display/logoflow/06.+e-Fatura|https://docs.logo.com.tr/display/logoflow/06.+e-Fatura] <span style="color: #1e4e79">adresinden alınmıştır. Akış içerisindeki Açılır pencereden örnek efatura akışı seçilir ve seçilen efatura akışları içerisindeki grdInvoiceline tablosundaki satırları yeni bir tabloya atma işlemi yapar.</span>
<span style="color: #1e4e79">Akışı içeri aldığınızda Sql Bağlantı listesi ve Veri kaynağı düzenlenmelidir. Veri kaynağında NWFLOGMASTER tablosundaki FIRSTVERSIONSTORAGEID</span> <span style="color: #1e4e79">kullanılarak yayınlanmış bütün efatura</span> <span style="color: #1e4e79">akışlarını açılır listede gösterilmesi sağlanmıştır. Akışı içeri aldığınızda öncelikle bu iki bölümü kendi yapınıza göre düzenlemeniz gerekmektedir. FIRSTVERSIONID bilgisi NWFSTORAGE tablosundan da alınabilir.</span> 
\\
\\
!worddaved8d7b2528efc8a5ed50c5b8f8841b98.png|height=327,width=602!
!worddav5fd6cec7bd9f50716952d0762e38006d.png|height=334,width=602!
!worddav2432d26cb0c1306fd015fe433a5f894f.png|height=299,width=602!
<span style="color: #800000"><strong>Kod Örneği:</strong></span>
\\
<span style="color: #ff0000">string</span> test=<span style="color: #0000ff">""</span>,siraNo=<span style="color: #0000ff">""</span>,malzemeHizmet=<span style="color: #0000ff">""</span>,MalzemeHizmetKodu=<span style="color: #0000ff">""</span>,MalzemeHizmetAciklama=<span style="color: #0000ff">""</span>,RowId=<span style="color: #0000ff">""</span>; <span style="color: #ff0000"><strong>double</strong></span> miktar=<span style="color: #00008b">0</span>,BirimFiyat=<span style="color: #00008b">0</span>,IskontoTutari=<span style="color: #00008b">0</span>,KdvOrani=<span style="color: #00008b">0</span>,KdvTutari=<span style="color: #00008b">0</span>,MalzemeHizmetTutari=<span style="color: #00008b">0</span>; <span style="color: #ff0000"><strong>int</strong></span> instanceUniqueId=<span style="color: #00008b">0</span>,id=<span style="color: #00008b">0</span>; <span style="color: #008080"><strong>try</strong></span>\{ <span style="color: #008000">//AÇILIR PENCEREDE SEÇİLEN KAYITLAR DÖNDÜRÜLÜYOR</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 <AkisListesi.Content.Items.Count; i++)\{ <span style="color: #008000">//AÇILIR LİSTEDEKİ HEM ID KOLONUNDAKİ VERİ HEM DE INSTANCEUNIQUEID BİLGİLERİ BİR DEĞİŞKENE ATILIYOR. PORTALDA GÖRÜLEN ID INSTANCEUNIQUEID DEĞİŞKENİDİR.</span> <span style="color: #008080"><strong>try</strong></span>\{id=AkisListesi.Content.Items\[i\]\[AkisListesi_Columns.ID\].<span style="color: #191970"><strong>ToInt</strong></span>();\}<span style="color: #008080"><strong>catch</strong></span>\{id=<span style="color: #00008b">0</span>;\} <span style="color: #008080"><strong>try</strong></span>\{instanceUniqueId=AkisListesi.Content.Items\[i\]\[AkisListesi_Columns.INSTANCEUNIQUEID\].<span style="color: #191970"><strong>ToInt</strong></span>();\}<span style="color: #008080"><strong>catch</strong></span>\{instanceUniqueId=<span style="color: #00008b">0</span>;\}  <span style="color: #008000">//ID' YE GORE BUTUN VERİLER BUTUNDATA DEGISKENINE ALINIYOR.</span> <span style="color: #000080">var</span> butunData = LFlowUtils.<span style="color: #191970"><strong>GetJobAllVariablesValue</strong></span>(id);  <span style="color: #008000">//BUTUNDATAYA ALINAN AKIŞ BİLGİLERİ ICERISINDE SADECE grdInvoiceLine TABLOSUNUN VERILERI BIR DEGISKENE ALINIYOR</span> <span style="color: #000080">var</span> eFaturaDetay=(List<Dictionary<<span style="color: #ff0000">string</span>, <span style="color: #ff0000">object</span>>>)butunData\[<span style="color: #0000ff">"grdInvoiceLine"</span>\]; <span style="color: #0000ff"><strong>if</strong></span>(instanceUniqueId><span style="color: #00008b">0</span> && butunData.<span style="color: #191970"><strong>Assigned</strong></span>() && eFaturaDetay.Count><span style="color: #00008b">0</span>)\{ <span style="color: #008000">//grdInvoiceLine TABLOSUNDAKİ KOLONLARIN BİLGİLERİ KOLON KOLON / SATIR SATIR DEĞİŞKENLERE AKTARILIYOR.</span> eFaturaDetay.<span style="color: #191970"><strong>ForEach</strong></span>(x=>\{x.<span style="color: #191970"><strong>ForEach</strong></span>(y=>\{ <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__SiraNo"</span>) siraNo =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  y.Value.<span style="color: #191970"><strong>ToString</strong></span>() : <span style="color: #0000ff">""</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__MalzemeHizmet"</span>) malzemeHizmet =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  y.Value.<span style="color: #191970"><strong>ToString</strong></span>() : <span style="color: #0000ff">""</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__MalzemeHizmetKodu"</span>) MalzemeHizmetKodu =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  y.Value.<span style="color: #191970"><strong>ToString</strong></span>() : <span style="color: #0000ff">""</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__MalzemeHizmetAciklama"</span>) MalzemeHizmetAciklama =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  y.Value.<span style="color: #191970"><strong>ToString</strong></span>() : <span style="color: #0000ff">""</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"RowId"</span>) RowId =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  y.Value.<span style="color: #191970"><strong>ToString</strong></span>() : <span style="color: #0000ff">""</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__miktar"</span>)miktar =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  Convert.<span style="color: #191970"><strong>ToDouble</strong></span>(y.Value) : <span style="color: #00008b">0</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__BirimFiyat"</span>) BirimFiyat =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  Convert.<span style="color: #191970"><strong>ToDouble</strong></span>(y.Value) : <span style="color: #00008b">0</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__IskontoTutari"</span>) IskontoTutari =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  Convert.<span style="color: #191970"><strong>ToDouble</strong></span>(y.Value) : <span style="color: #00008b">0</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__KdvOrani"</span>) KdvOrani =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  Convert.<span style="color: #191970"><strong>ToDouble</strong></span>(y.Value) : <span style="color: #00008b">0</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__KdvTutari"</span>) KdvTutari =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  Convert.<span style="color: #191970"><strong>ToDouble</strong></span>(y.Value) : <span style="color: #00008b">0</span>);  <span style="color: #0000ff"><strong>if</strong></span>(y.Key == <span style="color: #0000ff">"grdInvoiceLine__MalzemeHizmetTutari"</span>) MalzemeHizmetTutari =  (y.Value.<span style="color: #191970"><strong>Assigned</strong></span>() ?  Convert.<span style="color: #191970"><strong>ToDouble</strong></span>(y.Value) : <span style="color: #00008b">0</span>);  \}); <span style="color: #008000">//SATIR VERİLERİ DEĞİŞKENE ATILDIKTAN SONRA TABLOYA AKTARILMASI İÇİN DICTIONARY DEĞİŞKENİ İLE SATIR OLARAK TABLOYA EKLENİYOR.</span>Dictionary<<span style="color: #ff0000">string</span>, <span style="color: #ff0000">object</span>> satir = <span style="color: #008b8b"><strong>new</strong></span> Dictionary<<span style="color: #ff0000">string</span>, <span style="color: #ff0000">object</span>>(); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.siraNo,siraNo); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.malzemeHizmet,malzemeHizmet); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.MalzemeHizmetKodu,MalzemeHizmetKodu);satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.MalzemeHizmetAciklama,MalzemeHizmetAciklama); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.RowId,RowId); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.miktar,miktar); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.BirimFiyat,BirimFiyat); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.IskontoTutari,IskontoTutari); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.KdvOrani,KdvOrani); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.KdvTutari,KdvTutari);satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.MalzemeHizmetTutari,MalzemeHizmetTutari);satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.INSTANCEUNIQUEID,instanceUniqueId); satir.<span style="color: #191970"><strong>Add</strong></span>(TabloVerileri_Columns.LogMasterId,id); TabloVerileri.Content.<span style="color: #191970"><strong>AddRow</strong></span>(satir); <span style="color: #008000">//SATIR BURADA BİTİP DİĞER SATIRA GEÇİLİYOR.</span>\});\} <span style="color: #008000">//BUTUN İŞLEMLER BURADA BİTİYOR.</span> Durum.Value=<span style="color: #0000ff">"İşlem Başarılı"</span>;\}\} <span style="color: #008000">//HATA OLDUĞUNDA ÖN YÜZE HATAYI GETİRMEDEN DURUM DEĞİŞKENİNE HATA EKLENİYOR.</span> <span style="color: #008080"><strong>catch</strong></span>(Exception Ex)\{Durum.Value=<span style="color: #0000ff">"Hata="</span>+Ex.Message.<span style="color: #191970"><strong>ToString</strong></span>();\} 
\\
\\
 
<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.