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 Blanki_ekzamena.Izmenie { public partial class Sdelano : Form { public static string id; public Sdelano() { InitializeComponent(); label4.Text = Zakaz.predmet; label2.Text = Zakaz.gorod; label7.Text = Zakaz.raion; label5.Text = Zakaz.ych; label12.Text = Zakaz.blank; label9.Text = Zakaz.vid; } private void btn_soxr_Click(object sender, EventArgs e) { using (Zakaz fl = new Zakaz()) { this.Hide(); fl.ShowDialog(); this.Close(); } } private void button1_Click(object sender, EventArgs e) { const string sql = "UPDATE [Zakaz] SET Statys = 'Готово' WHERE id_table = @id"; DataTable table = new DataTable(); SqlCommand cmd = new SqlCommand(sql, DataBase.connect()); SqlDataAdapter adapter = new SqlDataAdapter(); cmd.Parameters.Add(new SqlParameter("@id", SqlDbType.NVarChar, 50)); cmd.Parameters["@id"].Value = id; adapter.SelectCommand = cmd; adapter.Fill(table); using (Zakaz fl = new Zakaz()) { this.Hide(); fl.ShowDialog(); this.Close(); } } private void Sdelano_Load(object sender, EventArgs e) { } } }