示例#1
0
        public ChangeIllustratorOrder(int id_order, IllustratorOrders form)
        {
            prev_form = form;
            id        = id_order;
            InitializeComponent();
            string connectionString = @"Data Source=LAPTOP-96NT0MPR;Initial Catalog=kursach;Integrated Security=True";

            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                connection.Open();
                SqlCommand command = new SqlCommand();
                command.Connection = connection;
                string        sqlExpression = "SELECT * FROM Заказы WHERE Код_заказа = " + id;
                SqlCommand    commandread   = new SqlCommand(sqlExpression, connection);
                SqlDataReader reader        = commandread.ExecuteReader();
                if (reader.HasRows)
                {
                    reader.Read();
                    CommentBox.Text = reader.GetString(4);
                    StatusBox.Text  = reader.GetString(6);
                    if (reader.GetValue(7) != null)
                    {
                        PriceBox.Text = reader.GetValue(7).ToString();
                    }
                }
            }
        }
示例#2
0
 private void моиЗаказыToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (currentaccount.type == "Покупатель")
     {
         CustomerOrders ord = new CustomerOrders();
         ord.Show();
     }
     if (currentaccount.type == "Иллюстратор")
     {
         IllustratorOrders ord = new IllustratorOrders();
         ord.Show();
     }
 }