1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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 Gotovo : Form
- {
- public static string id;
- public Gotovo()
- {
- InitializeComponent();
- label4.Text = Operator.predmet;
- label2.Text = Operator.gorod;
- label7.Text = Operator.raion;
- label5.Text = Operator.ych;
- label12.Text = Operator.blank;
- label9.Text=Operator.vid;
- }
- private void label10_Click(object sender, EventArgs e)
- {
- }
- private void label4_Click(object sender, EventArgs e)
- {
- }
- private void label6_Click(object sender, EventArgs e)
- {
- }
- private void label5_Click(object sender, EventArgs e)
- {
- }
- private void btn_soxr_Click(object sender, EventArgs e)
- {
- using (Operator fl = new Operator())
- {
- 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 (Operator fl = new Operator())
- {
- this.Hide();
- fl.ShowDialog();
- this.Close();
- }
- }
- }
- }
|