public ForEmployee(string id) { InitializeComponent(); Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NewDelivery.Image = Properties.Resources.NewDelivery_on; NamePanel.Text = "Новая доставка"; UserID = id; connection = new SqlConnection(connectionString); connection.Open(); string query = $"SELECT [id] FROM [Delivery service employee] WHERE [user id]={UserID}"; cmd = new SqlCommand(query, connection); empid = cmd.ExecuteScalar().ToString(); connection.Close(); UpdateProfile(); UpdateDelivery(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; ProfilePanel.Hide(); QuestionPanel.Hide(); InfoPanel.Hide(); MyDeliveryPanel.Hide(); }
private void NewOrder_Click(object sender, EventArgs e) { UpdateDelivery(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; NamePanel.Text = "Новая доставка"; Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NewDelivery.Image = Properties.Resources.NewDelivery_on; }
private void NewOrder_Click(object sender, EventArgs e) { UpdateClients(); InfoPanel.Hide(); Workers.Hide(); Delivers.Hide(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; NamePanel.Text = "Клиенты"; Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); }
public ForAdmin(string id) { InitializeComponent(); Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NamePanel.Text = "Новая доставка"; UserID = id; UpdateClients(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; MyDeliveryPanel.Hide(); QuestionPanel.Hide(); InfoPanel.Hide(); Workers.Hide(); Delivers.Hide(); }