visual studio asp datasource olarak xmli kullanmak

new empty web project
insert new web page adı index.aspx
insert new item xml
içine :

  <Student
    StudentID=”1″
    FirstName=”A”
    LastName=”AA”
    TotalMarks=”100″>
 
  <Student
    StudentID=”2″
    FirstName=”B”
    LastName=”BB”
    TotalMarks=”200″>
 
  <Student
    StudentID=”3″
    FirstName=”C”
    LastName=”CC”
    TotalMarks=”500″>
 
  <Student
    StudentID=”4″
    FirstName=”D”
    LastName=”DD”
    TotalMarks=”700″>
 

ve gridview at ve datasource xmlden xml dosyasını seç

visual studio installer vsi bundle 2015

visual studio 2015 installer
https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2015InstallerProjects
indir kur

daha sonra visu9al studio projen acıkken sağ taraftaki proje listesine add new project other project types visual studio installer bas
setup projecti seç
sağ aşaıda ayarlardan programın gereken yerlerini doldur
author program adı version gibi
daha sorna proje ağacında sağda üstte setupa sağ tık view file system ve yine aynı yere sağ tıkla project output primary seçerek ok bas
en son yine setupa sağ tıkla rebuild yap okdir

https://www.youtube.com/watch?v=HeDBYc3ybxc

Visual studio 2015le oracle db bağlantısı

Oracle Developer Tools for Visual Studio 2015 indir http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index.html

 

kur  ve kodlar

 
 
 
dbconnect.txt
Data Source=ORCL;User Id=hr;Password=hr;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;

using System.Windows.Forms;
using System.IO;
using Oracle.ManagedDataAccess;
using Oracle.ManagedDataAccess.Client;

namespace OracleTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string oradb;
        private void Form1_Load(object sender, EventArgs e)
        {
       //bağlantı
            StreamReader sr = new StreamReader("dbConnect.txt");
            oradb = sr.ReadLine();
            sr.Close();

        }

        private void button1_Click(object sender, EventArgs e)
        {

            OracleConnection conn = new OracleConnection(oradb);
            conn.Open();
            StreamReader sr = new StreamReader("sql1.txt");
            string sql1 = sr.ReadLine();
            sr.Close();

            OracleCommand cmd = new OracleCommand();
            cmd.Connection = conn;
            cmd.CommandText = sql1;
            cmd.CommandType = CommandType.Text;
            OracleDataAdapter da = new OracleDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds, "ss");
            gridControl1.DataSource = ds.Tables["ss"];
            //OracleDataReader dr = cmd.ExecuteReader();
            //dataGridView1.DataSource = dr;

            //while (dr.Read())
            //{
            //    listBox1.Items.Add(dr.GetString(2));
            //}
            //conn.Dispose();

        }
    }
}

Visual studio Projeni lisanslama olaylari

Özetle CryptoLicesnsi kur ve crackle sonra aç programı visual studioda proje yeni de refereransa cyrptolicensin kurulduğu klasörden LogicNP.CryptoLicensing.dll ekle. Ve cryptolicense programına geri geç project get validationdan kodunu al.
Google Drive\visual studio\cryptolisans\CryptoLicensingNet2015Enterprise.rar
Aşağıda serili ama tam calısmıyor
            string licOrSerial = “3SNK-JR68-VWR4-CU3U-DK5T-6M4Y-TGNU-W99Z”; // may be entered by user
            CryptoLicense lic = new CryptoLicense(“AMAAMACcdnLRtdM/BVep5vzxoSJkHW04yTbB6RBlL3AebAgDpcaAJ5m3ygqP8ueGL1ZQA1EDAAEAAQ==”);
            lic.LicenseServiceURL = “<>”;
            // Try to validate serial and retrieve license against the serial
            SerialValidationResult result = lic.GetLicenseFromSerial(licOrSerial);
            if(result == SerialValidationResult.Failed)
            {
                // ‘licOrSerial’ is in serial form but validation of serial failed
                MessageBox.Show(“Serial Validation Failed”);
                return;
            }
            elseif (result == SerialValidationResult.NotASerial)
            {
                // ‘licOrSerial’ is not a serial but may be a license, set lic.LicenseCode and validate it
                lic.LicenseCode = licOrSerial;
            }
            else//if (result == SerialValidationResult.Success)
            {
                // CryptoLicense.GetLicenseFromSerial set the lic.LicenseCode with the retrieved license code
                // validate it
            }
            // Validate license by querying Status property
            if(lic.Status != LicenseStatus.Valid)
            {
                MessageBox.Show(“License Validation Failed”);
                return;
            }
To start using CryptoLicensing for the licensing and copy-protection of your software, follow these simple steps:
In CryptoLicensing Generator:
  1. Start the CryptoLicensing Generator application from the Start Menu.
  2. Create a new license project : File menu –> Create New Project –> accept default settings by clicking OK button.
  3. Save the license project : File menu –> Save Project.
  4. Get the validation code for your project : Project menu –> Get Validation Key And Code.
  5. Generate a simple license code without any settings : simply click the Generate button. A new license code will be generated and displayed in the bottom textbox.
In Your Software Source Code Project:
  • Reference the LogicNP.CryptoLicensing.dll file from your project. This is the CryptoLicensing validation module. Note: For Silverlight, Windows Phone 7, or other kinds of projects, see Deploying Your Software for the exact assembly to reference.
  • At the top of your code file, add the following namespace declarations:
  using LogicNP.CryptoLicensing;
  • Write simple license validation code as follows:
    
            CryptoLicense lic = new CryptoLicense();
            lic.ValidationKey = “validation key obtained in step #4 above”;
            lic.LicenseCode = “license code generated in step #5 above”;
            // Validate the license using .Status property
            if (lic.Status != LicenseStatus.Valid)
                throw new Exception(“license validation failed”);

That’s it! Its that simple to start using CryptoLicensing for the licensing of your software.


Further Code Samples
The above code is a very simplistic code. Typically, you will not hard-code a license code in your software in the above manner, but load it as follows:
                      
                      
            // Load license from the registry
            lic.StorageMode = LicenseStorageMode.ToRegistry;
            if (lic.Load() == false)
                throw new Exception(“License could not be loaded”);
            // Validate the license using .Status property
            if (lic.Status != LicenseStatus.Valid)
                throw new Exception(“license validation failed”);

For the load method to succeed, there should be a previously saved license code in the first place. The license code is saved by calling the CryptoLicense.Save method in another part of your software which prompts the user for the license code. If you use the CryptoLicense.ShowEvaluationInfoDialog method to prompt the user for the license code, the dialog will automatically call the Save method for you.
If you are validating licenses requiring communication with the license service, make sure you specify the license service URL before validating the license code as follows:
                      
                      
            lic.LicenseServiceURL = “http://www.mysite.com/LicenseService/Service.asmx&#8221;
            // Validate the license using .Status property
            if (lic.Status != LicenseStatus.Valid)
                throw new Exception(“license validation failed”);

Further code samples demonstrating a variety of common licensing scenarios can be found in the Samples folder under the installation folder.
 
 
 

visual c# gridview with parameter

 private void button1_Click_3(object sender, EventArgs e)
        {
            string connectionString = null;
            SqlConnection cnn;
            connectionString = "Server = " + AYARLAR.txtServerc + "; Database = " + AYARLAR.txtVeritabanic + "; User Id = " + AYARLAR.txtKullanicic + "; Password = " + AYARLAR.txtParolac;




            FileInfo file = new FileInfo(Application.StartupPath + "\\SQL.txt");
            string script = file.OpenText().ReadToEnd();

            cnn = new SqlConnection(connectionString);

            SqlDataAdapter da = new SqlDataAdapter(script, cnn);
            da.SelectCommand.Parameters.AddWithValue("@tarih1", dateEdit1.Text);
            da.SelectCommand.Parameters.AddWithValue("@tarih2", dateEdit2.Text);
            DataTable dt = new DataTable();

            da.Fill(dt);
            gridControl1.DataSource = dt;
            gridView1.ExpandAllGroups();
            gridView1.GroupFooterShowMode = GroupFooterShowMode.VisibleAlways;
            // Create and setup the first summary item.

            GridGroupSummaryItem item1 = new GridGroupSummaryItem();
            item1.FieldName = "Odeme Tutari";
            item1.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            item1.DisplayFormat = "Odeme Tutari {0:c2}";
            item1.ShowInGroupColumnFooter = gridView1.Columns["Odeme Tutari"];
            gridView1.GroupSummary.Add(item1);

            {
                //GridView RunTime Gruplama
                GridColumn Grupla = gridView1.Columns["Odeme Tipi"];

                gridView1.BeginSort();
                try
                {
                    gridView1.ClearGrouping();
                    Grupla.GroupIndex = 0;
                }
                finally
                {
                    gridView1.EndSort();
                }
                gridView1.ExpandAllGroups();
            }

            gridView1.Columns["Odeme Tutari"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["Odeme Tutari"].SummaryItem.DisplayFormat = "Odeme Toplam = {0}";
            gridView1.BestFitColumns();
            gridView1.Columns["Odeme Tutari"].DisplayFormat.FormatType = FormatType.Numeric;
            gridView1.Columns["Odeme Tutari"].DisplayFormat.FormatString = "c2";

            gridView1.Columns["Iade Tutari"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["Iade Tutari"].SummaryItem.DisplayFormat = "Iade Toplam = {0}";
            gridView1.BestFitColumns();
            gridView1.Columns["Iade Tutari"].DisplayFormat.FormatType = FormatType.Numeric;
            gridView1.Columns["Iade Tutari"].DisplayFormat.FormatString = "c2";

            gridView1.Columns["Odeme Tipi"].SortOrder = DevExpress.Data.ColumnSortOrder.Descending;

            gridView1.BestFitColumns();
        }

Devexpress gridview export customised header

using DevExpress.XtraPrinting;
using DevExpress.Printing.ExportHelpers;
using DevExpress.Export;

private void simpleButton1_Click(object sender, EventArgs e) {
// Ensure that the data-aware export mode is enabled.
DevExpress.Export.ExportSettings.DefaultExportType = ExportType.DataAware;
// Create a new object defining how a document is exported to the XLSX format.
XlsxExportOptionsEx options = new XlsxExportOptionsEx();
// Subscribe to the CustomizeSheetHeader event.
options.CustomizeSheetHeader += options_CustomizeSheetHeader;
// Export the grid data to the XLSX format.
string file = "grid-export.xlsx";
gridControl.ExportToXlsx(file, options);
// Open the created document.
System.Diagnostics.Process.Start(file);
}

void options_CustomizeSheetHeader(DevExpress.Export.ContextEventArgs e) {
// Create a new row.
CellObject row = new CellObject();
// Specify row values.
row.Value = "The document is exported from the IssueList database.";
// Specify row formatting.
XlFormattingObject rowFormatting = new XlFormattingObject();
rowFormatting.Font = new XlCellFont { Bold = true, Size = 14 };
rowFormatting.Alignment = new DevExpress.Export.Xl.XlCellAlignment { HorizontalAlignment = DevExpress.Export.Xl.XlHorizontalAlignment.Center, VerticalAlignment = DevExpress.Export.Xl.XlVerticalAlignment.Top };
row.Formatting = rowFormatting;
// Add the created row to the output document.
e.ExportContext.AddRow(new [] {row});
// Add an empty row to the output document.
e.ExportContext.AddRow();
// Merge cells of two new rows.
e.ExportContext.MergeCells(new DevExpress.Export.Xl.XlCellRange(new DevExpress.Export.Xl.XlCellPosition(0, 0), new DevExpress.Export.Xl.XlCellPosition(5, 1)));
}

Visual c# ms sql database çifte kontrol

           SqlConnection connectionString = new SqlConnection("Server = " + ondegerler.SQLBAGLANTISI_KAYNAK + "; Database = " + ondegerler.SQLBAGLANTISI_VERITABANI + "; User Id = " + ondegerler.SQLBAGLANTISI_KULLANICI + "; Password = " + ondegerler.SQLBAGLANTISI_PAROLA);
            connectionString.Open();
            {




                SqlCommand sqlcom2 = new SqlCommand("select count(malzeme_kodu) from tbl_malzeme  where tbl_malzeme.malzeme_kodu = '" + Text_malzeme_kodu.Text + "'", connectionString);

                if (sqlcom2.ExecuteScalar() != null)
                {
                    int UserExist = (int)sqlcom2.ExecuteScalar();
                    if (UserExist > 0)
                    {
                        MessageBox.Show("Bu İsimde Malzeme Kodu Daha Önceden Yaratılmıştır!");
                    }
                }