Kayıtlar

Excel Okuyup DataGridview ile Gösterme ASP.NET

Resim
BİR TANE EXCEL DOSYASI OLUSTURUYORUZ. KOD KISMI EXCEL AC BUTONUNA YIKLAYINCA  using System.Data.OleDb; // ekleyelim string DosyaYolu, DosyaAdi; OpenFileDialog OFD = new OpenFileDialog() { Filter = "Excel Dosyası |*.xlsx| Excel Dosyası|*.xls", // open file dialog açıldığında sadece excel dosyalarınu görecek Title = "Excel Dosyası Seçiniz..", // open file dialog penceresinin başlığı RestoreDirectory = true, // en son açtığı klasörü gösterir. Örn en son excel dosyasını D://Exceller adlı // bir klasörden çekmiş olsun. Bir sonraki open file dialog açıldığında yine aynı // klasörü gösterecektir. }; // bu da bir kullanım şeklidir. Aslında bu şekilde kullanmak daha faydalıdır. // bir çok intelligence aracı bu şekilde kullanılmasını tavsiye ediyor. if (OFD.ShowDialog() == DialogResult.OK) // perncere

iTexSharp ile pdf olusturma

Resim
Öncelikle iTextSharp dll'ni indiriyoruz link : https://www.dllme.com/dll/files/itextsharp_dll.html 1 ) Solution Explorer açıyoruz 2 ) References ' e sağ tık yapıp add diyoruz 3 ) Browse'a tıklıyoruz 4 ) açılan yerden dll yüklediğimiz yere gelip dll'i ekliyoruz 5 ) Alttakine benzer bir form yapıyoruz :D using iTextSharp.text;//iTextsharp dll ile gelen kütüphane using iTextSharp.text.pdf;//iTextsharp dll ile gelen kütüphane using System.IO;//Dosya İşlemleri için Bu using leri ekliyoruz  private void button1_Click(object sender, EventArgs e)         {             iTextSharp.text.Document deneme = new iTextSharp.text.Document();             PdfWriter.GetInstance(deneme, new FileStream("C:\\Users\\Murat\\Desktop\\Masaüstü\\C# PROJELER\\itextsharp\\oluşturulanlar\\"+textBox5.Text+".pdf",FileMode.Create));             deneme.AddAuthor(textBox1.Text);//Yazar bilgisi alınır             deneme.AddCreationDate()

Asp.Net VeriTabanından DataSet İle Tabloya Veri Çekme(EVAL KULLANIMI)

Resim
BURADAKİ SERVER NAME ' İ KOPYALIYORUZ  Ornek olacak Irnet yazmısım :D 

C# Form ile Giriş paneli

Resim
  private void button1_Click(object sender, EventArgs e)         {             baglanti.Open();             SqlCommand komut = new SqlCommand("select*from tbl_giris where kullanici_ad = @p1 and sifre =@p2",baglanti);             komut.Parameters.AddWithValue("@p1",textBox1.Text);             komut.Parameters.AddWithValue("@p2", textBox2.Text);             SqlDataReader oku = komut.ExecuteReader();             if (oku.Read())             {                 FrmAnaform frm = new FrmAnaform();                 frm.Show();                 this.Hide();             }             else             {                 MessageBox.Show("Kullanıcı Adı veya Şifre Yanlış","giriş hatalı",MessageBoxButtons.OK,MessageBoxIcon.Error);             }             baglanti.Close();         }

C# Grafik Oluşturma ve Grafiğe Veri çekme

Resim
KÜTÜPHANE : using System.Data.SqlClient;  baglanti.Open();             SqlCommand komut = new SqlCommand("select perMeslek,AVG(perMaas)from tbl_personel group by perMeslek",baglanti);             SqlDataReader oku = komut.ExecuteReader();             while (oku.Read())             {                 chart1.Series["MESLEK-MAAS"].Points.AddXY(oku[0], oku[1]);             }             baglanti.Close();

SQL Group By Kullanımı

Resim
GROUP BY KULLANIMI :   SELECT alanadi1,fonksiyon(alanadi2) FROM tablo_Adi GROUP BY alanadi1   AVG : ORTALAMA    SUM : TOPLAM DEĞER COUNT : SAYAC  ORNEK KULLANIM : select perMeslek,AVG(perMaas)from tbl_personel group by perMeslek

C# Dosya Taşıma Form Application

Resim
namespace dosya_tasima {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void Form1_Load(object sender, EventArgs e)         {         }         private void button1_Click(object sender, EventArgs e)         {             if (textBox1.Text == "")             {                 MessageBox.Show("DOsya adı giriniz");             }             else {                 Directory.CreateDirectory(" KLASÖR EKLEYECEĞİN YER "+textBox1.Text);                 MessageBox.Show("Oluşturma Başarılı");             }         }         private void label4_Click(object sender, EventArgs e)         {         }         private void button4_Click(object sender, EventArgs e)         {             if (textBox4.Text == "")             {                 MessageBox.Show("DOsya adı giriniz");             }             else