ZARARLI BAĞLANTILAR
Bu listede bulunan kuruluşlardan yada web sitelerinden gelen hiç bir mail cevaplamayın yada açmayın bu kişiler şirket bilgilerine ve sizin bilgilerinize
DevamBu listede bulunan kuruluşlardan yada web sitelerinden gelen hiç bir mail cevaplamayın yada açmayın bu kişiler şirket bilgilerine ve sizin bilgilerinize
Devam
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LogoExtreTest { class Program { static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.Green; decimal borc = 0, alacak = 0, kalan = 0; string carikodu = ""; Console.Write("Cari Kodunu Giriniz : "); carikodu = Console.ReadLine(); Console.WriteLine("\n"); if (carikodu.Length > 5) { SqlConnection cnn = new SqlConnection(Degiskenler._lgSTR); string Sorgu = string.Concat(@"SELECT TOP 1000 [CARİ_ADI],modul,turu,[TARİH],[AY],[OK],[Y_KODU],[BELGE_NO],[ACIKLAMA], CASE WHEN MODUL = 4 AND TURU = 1 THEN 'MAL ALIM FATURASI' WHEN MODUL = 4 AND TURU = 4 THEN 'ALINAN HIZMET FATURASI' WHEN MODUL = 4 AND TURU = 6 THEN 'MAL ALIM İADE FATURASI' WHEN MODUL = 4 AND TURU = 13 THEN 'ALINAN FİYAT FARKI FATURASI' WHEN MODUL =4 AND TURU = 3 THEN 'SATIŞ İADE FATURASI' WHEN MODUL = 5 AND TURU = 70 THEN 'TOPTAN SATIŞ FATURASI' WHEN MODUL = 4 AND TURU = 38 THEN 'KREDİ KARTI FİŞİ' WHEN MODUL = 4 AND TURU = 9 THEN 'VERİLEN HİZMET FATURASI' WHEN MODUL = 4 AND TURU = 14 THEN 'VERİLEN FİYAT FARKI FATURASI' WHEN MODUL = 5 AND TURU = 1 THEN 'NAKİT TAHSİLAT' WHEN MODUL = 5 AND TURU = 2 THEN 'NAKİT ÖDEME' WHEN MODUL = 5 AND TURU = 3 THEN 'CARİ HESAP BORÇ DEKONTU' WHEN MODUL = 5 AND TURU = 4 THEN 'CARİ HESAP ALACAK DEKONTU' WHEN MODUL = 5 AND TURU = 5 THEN 'CARİ HESAP VİRMAN' WHEN MODUL = 5 AND TURU = 6 THEN 'CARİ HESAP KUR FARKI FİŞİ' WHEN MODUL = 5 AND TURU = 14 THEN 'CARİ HES. AÇILIŞ' WHEN MODUL = 6 AND TURU = 1 THEN 'ÇEK GİRİŞİ' WHEN MODUL = 6 AND TURU = 3 THEN 'ÇEK ÇIKIŞ (CARİ HESABA)' WHEN MODUL = 7 AND TURU = 1 THEN 'BANKA İŞLEM FİŞİ' WHEN MODUL = 7 AND TURU = 2 THEN 'BANKA VİRMAN FİŞİ' WHEN MODUL = 7 AND TURU = 3 THEN 'GELEN HAVALE/EFT' WHEN MODUL = 7 AND TURU = 4 THEN 'GÖNDERİLEN HAVALE/EFT' WHEN MODUL = 7 AND TURU = 5 THEN 'BANKA AÇILIŞ FİŞİ' WHEN MODUL = 10 AND TURU = 1 THEN 'BANKA AÇILIŞ FİŞİ' WHEN MODUL = 10 AND TURU = 2 THEN 'BANKA AÇILIŞ FİŞİ' ELSE 'TANIMSIZ' END AS TUR ,convert(decimal(18,2),BORC) as BORC,convert(decimal(18,2),ALACAK) AS ALACAK ,[İŞYERİ],[MODUL],[SEHİR],[TELNO],[VERGI_NO],[V_DAIRE],[İLGİLİ],[IPTAL_DURUMU],[MUH_DURUMU],[KNO],[CARİ_KODU] FROM [GODB].[dbo].[V_CariEkstre] WHERE cari_kodu='" + carikodu + "' ORDER BY TARİH"); using (SqlDataAdapter adapter = new SqlDataAdapter(Sorgu, cnn)) { DataTable dt = new DataTable(); adapter.Fill(dt); foreach (DataRow dr in dt.Rows) { borc += Convert.ToDecimal(dr["BORC"]); alacak += Convert.ToDecimal(dr["ALACAK"]); } kalan = Convert.ToDecimal(borc - alacak); Console.Write("Borç Bakiye Tutarı : " + borc.ToString("n2")); Console.WriteLine("\n"); Console.Write("Alacak Bakiye Tutarı : " + alacak.ToString("n2")); Console.WriteLine("\n"); Console.Write("Kalan Bakiye Tutarı : " + kalan.ToString("n2")); Console.Read(); } } else { Console.WriteLine("Yanlış Cari Kodu Girdiniz.."); Console.Read(); } } } } |
Devam
Logo API ile Sipariş Girişi: Data siparis = unity.NewDataObject(DataObjectType.doSalesOrderSlip); siparis.New(); siparis.DataFields.FieldByName(“NUMBER”).Value = “Sipariş No”; siparis.DataFields.FieldByName(“DATE”).Value = “Tarih”; siparis.DataFields.FieldByName(“TIME”).Value = “Zaman”;
DevamLogo API ile Yeni Cari Kartı: Data ek = unity.NewDataObject(DataObjectType.doAccountsRP); ek.New(); ek.DataFields.FieldByName(“ACCOUNT_TYPE”).Value = 3; ek.DataFields.FieldByName(“CODE”).Value = “Firma Kodu”; ek.DataFields.FieldByName(“TITLE”).Value =
DevamLogo API ile Logo’ya Bağlantı: UnityApplication giris = new UnityApplication(); if (giris.Connect()) { if (giris.UserLogin(“kullanici”, “sifre”)) { if (giris.CompanyLogin(1)) //Logo
DevamBu komut satırını windows çalıştır bölüme yazıp enter basmanız yeterlidir.. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
DevamAndroid Web Server MySQL üzerinden php servis kullanarak veri çekme işlemi için örnek bir kod Create Table
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
CREATE TABLE `customer` ( `CustomerID` varchar(4) NOT NULL, `Name` varchar(50) NOT NULL, `Email` varchar(50) NOT NULL, `CountryCode` varchar(2) NOT NULL, `Budget` double NOT NULL, `Used` double NOT NULL, PRIMARY KEY (`CustomerID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `customer` -- INSERT INTO `customer` VALUES ('C001', 'test1', 'test1@test.com', 'TR', 1000000, 600000); INSERT INTO `customer` VALUES ('C002', 'test2', 'test2@test.com', 'EN', 2000000, 800000); INSERT INTO `customer` VALUES ('C003', 'test2', 'test3@test.com', 'US', 3000000, 600000); INSERT INTO `customer` VALUES ('C004', 'test4', 'test4@test.com', 'RU', 4000000, 100000); |
getJSON.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<?php $objConnect = mysql_connect("localhost","root","root"); $objDB = mysql_select_db("mydatabase"); // $_POST["txtKeyword"] = "a"; // for Sample $strKeyword = $_POST["txtKeyword"]; $strSQL = "SELECT * FROM customer WHERE 1 AND Name LIKE '%".$strKeyword."%' "; $objQuery = mysql_query($strSQL); $intNumField = mysql_num_fields($objQuery); $resultArray = array(); while($obResult = mysql_fetch_array($objQuery)) { $arrCol = array(); for($i=0;$i<$intNumField;$i++) { $arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i]; } array_push($resultArray,$arrCol); } mysql_close($objConnect); echo json_encode($resultArray); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
package com.myapp; import java.util.ArrayList; import java.util.HashMap; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class myDBClass extends SQLiteOpenHelper { // Database Version private static final int DATABASE_VERSION = 1; // Database Name private static final String DATABASE_NAME = "mydatabase"; // Table Name private static final String TABLE_MEMBER = "members"; public myDBClass(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); // TODO Auto-generated constructor stub } @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub // Create Table Name db.execSQL("CREATE TABLE " + TABLE_MEMBER + "(MemberID INTEGER PRIMARY KEY AUTOINCREMENT," + " Name TEXT(100)," + " Tel TEXT(100));"); Log.d("CREATE TABLE","Create Table Successfully."); } // Delete Data public long DeleteData(String strMemberID) { // TODO Auto-generated method stub try { SQLiteDatabase db; db = this.getWritableDatabase(); // Write Data /** * for API 11 and above SQLiteStatement insertCmd; String strSQL = "DELETE FROM " + TABLE_MEMBER + " WHERE MemberID = ? "; insertCmd = db.compileStatement(strSQL); insertCmd.bindString(1, strMemberID); return insertCmd.executeUpdateDelete(); * */ long rows = db.delete(TABLE_MEMBER, "MemberID = ?", new String[] { String.valueOf(strMemberID) }); db.close(); return rows; // return rows deleted. } catch (Exception e) { return -1; } } // Show All Data public ArrayList<HashMap<String, String>> SelectAllData() { // TODO Auto-generated method stub try { ArrayList<HashMap<String, String>> MyArrList = new ArrayList<HashMap<String, String>>(); HashMap<String, String> map; SQLiteDatabase db; db = this.getReadableDatabase(); // Read Data String strSQL = "SELECT * FROM " + TABLE_MEMBER; Cursor cursor = db.rawQuery(strSQL, null); if(cursor != null) { if (cursor.moveToFirst()) { do { map = new HashMap<String, String>(); map.put("MemberID", cursor.getString(0)); map.put("Name", cursor.getString(1)); map.put("Tel", cursor.getString(2)); MyArrList.add(map); } while (cursor.moveToNext()); } } cursor.close(); db.close(); return MyArrList; } catch (Exception e) { return null; } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // TODO Auto-generated method stub db.execSQL("DROP TABLE IF EXISTS " + TABLE_MEMBER); // Re Create on method onCreate onCreate(db); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="35dp" android:text="Main Menu" android:textAppearance="?android:attr/textAppearanceLarge" /> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textView1" android:layout_centerHorizontal="true" android:layout_marginTop="35dp" android:text="Add" /> <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/button1" android:layout_centerInParent="true" android:layout_marginTop="35dp" android:text="Show" /> <Button android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/button2" android:layout_centerInParent="true" android:layout_marginTop="35dp" android:text="Update" /> <Button android:id="@+id/button4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/button3" android:layout_centerInParent="true" android:layout_marginTop="35dp" android:text="Delete" /> </RelativeLayout> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
package com.myapp; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.app.Activity; import android.content.Intent; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Button4 (Delete) final Button btn4 = (Button) findViewById(R.id.button4); // Perform action on click btn4.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Open Form ListDelete Intent newActivity = new Intent(MainActivity.this,ListDeleteActivity.class); startActivity(newActivity); } }); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tableLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="5dip" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:gravity="center" android:text="Delete Member : " android:layout_span="1" android:textAppearance="?android:attr/textAppearanceLarge" /> </TableRow> <View android:layout_height="1dip" android:background="#CCCCCC" /> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0.1"> <ListView android:id="@+id/listView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:focusable="false" android:focusableInTouchMode="false" android:clickable="false"> </ListView> </LinearLayout> <View android:layout_height="1dip" android:background="#CCCCCC" /> <LinearLayout android:id="@+id/LinearLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="5dip" > <Button android:id="@+id/btnCancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Cancel" /> </LinearLayout> </TableLayout> |
1 2 3 4 5 6 7 8 9 10 11 12 |
<resources> <string name="app_name">MyApp</string> <string name="hello_world">Hello world!</string> <string name="menu_settings">Settings</string> <string name="title_activity_main">My App V 1.0</string> <string-array name="CmdMenu"> <item>Edit</item> <item>Delete</item> </string-array> </resources> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/ColMemberID" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="MemberID"/> <TextView android:id="@+id/ColName" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:text="Name"/> <TextView android:id="@+id/ColTel" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Tel" /> </LinearLayout> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
package com.myapp; import java.util.ArrayList; import java.util.HashMap; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.Toast; public class ListDeleteActivity extends Activity { ArrayList<HashMap<String, String>> MebmerList; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_list_delete); // Call Show List All Data ShowListData(); // btnCancel (Cancel) final Button cancel = (Button) findViewById(R.id.btnCancel); cancel.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Open Form Main Intent newActivity = new Intent(ListDeleteActivity.this,MainActivity.class); startActivity(newActivity); } }); } // Show List data public void ShowListData() { myDBClass myDb = new myDBClass(this); MebmerList = myDb.SelectAllData(); // listView1 ListView lisView1 = (ListView)findViewById(R.id.listView1); SimpleAdapter sAdap; sAdap = new SimpleAdapter(ListDeleteActivity.this, MebmerList, R.layout.activity_column, new String[] {"MemberID", "Name", "Tel"}, new int[] {R.id.ColMemberID, R.id.ColName, R.id.ColTel}); lisView1.setAdapter(sAdap); registerForContextMenu(lisView1); } @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { //if (v.getId()==R.id.list) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo; menu.setHeaderTitle("Command for : " + MebmerList.get(info.position).get("Name").toString()); String[] menuItems = getResources().getStringArray(R.array.CmdMenu); for (int i = 0; i<menuItems.length; i++) { menu.add(Menu.NONE, i, i, menuItems[i]); } //} } @Override public boolean onContextItemSelected(MenuItem item) { AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)item.getMenuInfo(); int menuItemIndex = item.getItemId(); String[] menuItems = getResources().getStringArray(R.array.CmdMenu); String CmdName = menuItems[menuItemIndex]; String MemID = MebmerList.get(info.position).get("MemberID").toString(); //String MemName = MebmerList.get(info.position).get("Name").toString(); // Check Event Command if ("Edit".equals(CmdName)) { // Show on new activity //Intent newActivity = new Intent(ListDeleteActivity.this,UpdateActivity.class); //newActivity.putExtra("MemID", MebmerList.get(info.position).get("ID").toString()); //startActivity(newActivity); // for Delete Command } else if ("Delete".equals(CmdName)) { myDBClass myDb = new myDBClass(this); long flg = myDb.DeleteData(MemID); if(flg > 0) { Toast.makeText(ListDeleteActivity.this,"Delete Data Successfully", Toast.LENGTH_LONG).show(); } else { Toast.makeText(ListDeleteActivity.this,"Delete Data Failed.", Toast.LENGTH_LONG).show(); } // Call Show Data again ShowListData(); } return true; } } |
1 2 3 4 5 |
<activity android:name="ListDeleteActivity" android:theme="@style/AppTheme" android:screenOrientation="portrait" android:label="@string/title_activity_main" /> |
1 2 3 4 5 6 7 8 |
if ("Edit".equals(CmdName)) { // Show on new activity Intent newActivity = new Intent(ListDeleteActivity.this,UpdateActivity.class); newActivity.putExtra("MemID", MebmerList.get(info.position).get("ID").toString()); startActivity(newActivity); } |
Kaynak : Google
Devam