ondan kaynaklanmıyor tostring başka bir sorun var kodlar yolluyorum arkadaşlar
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace ss
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
SqlConnection baglan = new SqlConnection(@"Data Source=Corsix-x;Initial Catalog=database;Integrated Security=True");
DataTable tablo = new DataTable();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet dset = new DataSet();
**** listele()
{
tablo.Clear();
baglan.Open();
SqlDataAdapter sda = new SqlDataAdapter("Select * from kayit ",baglan);
sda.Fill(tablo);
sda.Dispose();
baglan.Close();
}
private **** button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" && textBox2.Text == "" && textBox3.Text == "" && textBox4.Text == "")
{
MessageBox.Show("İlgili Alanları Doldurunuz");
}
else if (textBox1.Text == "")
{
MessageBox.Show("Kullanıcı Adı Giriniz");
}
else if (textBox2.Text == "")
{
MessageBox.Show("Şifre Giriniz");
}
else
{
try
{
baglan.Open();
SqlCommand komut = new SqlCommand("ınsert into kayit(k_adi,sifre,sifrei,gizli) " + " VALUES('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "','" + textBox3.Text.ToString() + "','" + textBox4.Text.ToString() + "')", baglan);
komut.Connection = baglan;
komut.ExecuteReader();
baglan.Close();
listele();
MessageBox.Show("Kaydınız Tamamlandı", "Kayıt Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
Form2 frm2 = new Form2();
frm2.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
}