"Tanınmayan atlatma sırası" hatası C# Visual Studio
27.04.2020 - 07:16
Bu benim frmMusteri.cs kodum :
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 MarkePro
{
public partial class frmMusteri : Form
{
public frmMusteri()
{
InitializeComponent();
}
SqlConnection connectSql = new SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=MarkePro;Integrated Security=True");
private void label1_Click(object sender, EventArgs e)
{
}
private void label5_Click(object sender, EventArgs e)
{
}
private void btnMusteriEkle_Click(object sender, EventArgs e)
{
connectSql.Open();
SqlCommand komut = new SqlCommand("insert into musteri(adSoyad) values(@adSoyad)", connectSql);
komut.Parameters.AddWithValue("@adSoyad", txtMusteriAds.Text);
komut.ExecuteNonQuery();
connectSql.Close();
MessageBox.Show("Müşteri Kaydı Eklendi!");
foreach (Control item in this.Controls)
{
if (item is TextBox)
{
item.Text = "";
}
}
}
}
}
Bu da hata resmi
719
Görüntülenme
0 Beğeni