Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lab1_sql
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//New Line
public void refresh(){
SqlDataAdapter da = new SqlDataAdapter();
string str = "Data Source=DESKTOP-U0CH9PL\\MSSQLSERVER1;Initial
Catalog=customer_maintenance;Integrated Security=True";
}
private void button1_Click(object sender, EventArgs e)
{
if (txtid.Text == string.Empty)
{
MessageBox.Show("please enter customer id");
}
SqlConnection con;
SqlCommand cmd;
string sql = null;
this.tbl_customerTableAdapter.Fill(this.customer_maintenanceDataSet.tbl_customer);
con.Open();
cmd.ExecuteNonQuery();
//New Line
refresh();
con.Open();
cmd.ExecuteNonQuery();
//New Line
refresh();
}
}
con.Open();
cmd.ExecuteNonQuery();
refresh();
}
else
{
MessageBox.Show("you have clicked cancel button");
� � � �
� � � � � �
� � � �
}
}
}