0
我正在嘗試創建一個按鈕,將數據保存到數據庫。數據將在SuperGridControl中編輯或引入。我完全不知道該怎麼做。有什麼建議麼?保存按鈕在WinFormApp SuperGridControl
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 MyFirstWinForApp {
public partial class Users : Form
{
public Users()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'testDataSet.GrupyUzytkownikow' table. You can move, or remove it, as needed.
this.grupyUzytkownikowTableAdapter.Fill(this.testDataSet.GrupyUzytkownikow);
// TODO: This line of code loads data into the 'testDataSet.Uzytkownicy' table. You can move, or remove it, as needed.
this.uzytkownicyTableAdapter.Fill(this.testDataSet.Uzytkownicy);
}
private void button1_Click(object sender, EventArgs e)
{
try
{
!!!!!!!!!!!!!!!!!!!!!
MessageBox.Show("Dane zapisane", "Zapisano", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
} }