Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 private void Settings_Click(object sender, EventArgs e)
 {
     QuestionPanel.Hide();
     MyDeliveryPanel.Hide();
     ProfilePanel.Hide();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Настройки";
     Question.ForeColor    = Color.FromArgb(227, 213, 212);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     Orders.ForeColor      = Color.FromArgb(227, 213, 212);
     Help.ForeColor        = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = Settings.Height;
     NavPanel.Top          = Settings.Top;
     NavPanel.Left         = Settings.Left;
     Settings.ForeColor    = Color.FromArgb(217, 35, 73);
     Settings.Image        = Properties.Resources.Settings_on;
     NewDelivery.Image     = Properties.Resources.NewDelivery;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 private void gunaButton5_Click(object sender, EventArgs e)
 {
     UpdateQuestions();
     QuestionPanel.Location = loc;
     Delivers.Hide();
     InfoPanel.Hide();
     QuestionPanel.Show();
     Workers.Hide();
     MyDeliveryPanel.Hide();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Вопросы";
     Settings.ForeColor    = Color.FromArgb(227, 213, 212);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     Orders.ForeColor      = Color.FromArgb(227, 213, 212);
     Question.ForeColor    = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = Help.Height;
     NavPanel.Top          = Help.Top;
     NavPanel.Left         = Help.Left;
     Help.ForeColor        = Color.FromArgb(217, 35, 73);
 }
Ejemplo n.º 6
0
        private void Settings_Click(object sender, EventArgs e)
        {
            InfoPanel.Show();
            InfoPanel.Location = loc;

            QuestionPanel.Hide();
            MyDeliveryPanel.Hide();
            Delivers.Hide();
            Workers.Hide();
            NewDeliveryPanel.Hide();
            NamePanel.Text        = "Справка";
            Question.ForeColor    = Color.FromArgb(227, 213, 212);
            NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
            Orders.ForeColor      = Color.FromArgb(227, 213, 212);
            Help.ForeColor        = Color.FromArgb(227, 213, 212);
            NavPanel.Height       = Settings.Height;
            NavPanel.Top          = Settings.Top;
            NavPanel.Left         = Settings.Left;
            Settings.ForeColor    = Color.FromArgb(217, 35, 73);
        }
Ejemplo n.º 7
0
 private void Question_Click(object sender, EventArgs e)
 {
     QuestionPanel.Location = loc;
     QuestionPanel.Show();
     UpdateQuestions();
     MyDeliveryPanel.Hide();
     ProfilePanel.Hide();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Задать вопрос";
     Settings.ForeColor    = Color.FromArgb(227, 213, 212);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     Orders.ForeColor      = Color.FromArgb(227, 213, 212);
     Help.ForeColor        = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = Question.Height;
     NavPanel.Top          = Question.Top;
     NavPanel.Left         = Question.Left;
     Question.ForeColor    = Color.FromArgb(217, 35, 73);
     Question.Image        = Properties.Resources.Question_on;
     NewDelivery.Image     = Properties.Resources.NewDelivery;
 }
Ejemplo n.º 8
0
 private void Help_Click(object sender, EventArgs e)
 {
     InfoPanel.Location = loc;
     InfoPanel.Show();
     QuestionPanel.Hide();
     MyDeliveryPanel.Hide();
     ProfilePanel.Hide();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Помощь";
     Settings.ForeColor    = Color.FromArgb(227, 213, 212);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     Orders.ForeColor      = Color.FromArgb(227, 213, 212);
     Question.ForeColor    = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = Help.Height;
     NavPanel.Top          = Help.Top;
     NavPanel.Left         = Help.Left;
     Help.ForeColor        = Color.FromArgb(217, 35, 73);
     Help.Image            = Properties.Resources.Help_on;
     NewDelivery.Image     = Properties.Resources.Company;
 }
Ejemplo n.º 9
0
 private void Question_Click(object sender, EventArgs e)
 {
     UpdateWorkers();
     InfoPanel.Hide();
     Workers.Location = loc;
     Workers.Show();
     Delivers.Hide();
     QuestionPanel.Hide();
     MyDeliveryPanel.Hide();
     Delivers.Hide();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Работники";
     Settings.ForeColor    = Color.FromArgb(227, 213, 212);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     Orders.ForeColor      = Color.FromArgb(227, 213, 212);
     Help.ForeColor        = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = Question.Height;
     NavPanel.Top          = Question.Top;
     NavPanel.Left         = Question.Left;
     Question.ForeColor    = Color.FromArgb(217, 35, 73);
 }
Ejemplo n.º 10
0
        private void Orders_Click(object sender, EventArgs e)
        {
            InfoPanel.Hide();
            QuestionPanel.Hide();
            UpdateOwners();
            MyDeliveryPanel.Location = loc;
            MyDeliveryPanel.Show();

            NewDeliveryPanel.Hide();
            Delivers.Hide();
            Workers.Hide();
            NamePanel.Text        = "Владельцы";
            Settings.ForeColor    = Color.FromArgb(227, 213, 212);
            NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
            Question.ForeColor    = Color.FromArgb(227, 213, 212);
            Help.ForeColor        = Color.FromArgb(227, 213, 212);
            NavPanel.Height       = Orders.Height;
            NavPanel.Top          = Orders.Top;
            NavPanel.Left         = Orders.Left;
            Orders.ForeColor      = Color.FromArgb(217, 35, 73);
        }
Ejemplo n.º 11
0
 private void Orders_Click(object sender, EventArgs e)
 {
     InfoPanel.Hide();
     QuestionPanel.Hide();
     UpdateDelivery();
     MyDeliveryPanel.Location = loc;
     MyDeliveryPanel.Show();
     ProfilePanel.Hide();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Наши доставки";
     Settings.ForeColor    = Color.FromArgb(227, 213, 212);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     Question.ForeColor    = Color.FromArgb(227, 213, 212);
     Help.ForeColor        = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = Orders.Height;
     NavPanel.Top          = Orders.Top;
     NavPanel.Left         = Orders.Left;
     Orders.ForeColor      = Color.FromArgb(217, 35, 73);
     Orders.Image          = Properties.Resources.MyDelivery_on;
     NewDelivery.Image     = Properties.Resources.Company;
 }
Ejemplo n.º 12
0
 private void ProfilePic_Click(object sender, EventArgs e)
 {
     MyDeliveryPanel.Hide();
     UpdateProfile();
     NewDeliveryPanel.Hide();
     NamePanel.Text        = "Профиль";
     ProfilePanel.Location = loc;
     ProfilePanel.Show();
     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);
     NewDelivery.ForeColor = Color.FromArgb(227, 213, 212);
     NavPanel.Height       = 0;
     NavPanel.Top          = 0;
     NavPanel.Left         = 0;
     Orders.Image          = Properties.Resources.MyDelivery;
     Settings.Image        = Properties.Resources.Settings;
     Question.Image        = Properties.Resources.Question;
     Help.Image            = Properties.Resources.Help;
     NewDelivery.Image     = Properties.Resources.NewDelivery;
     ProfilePic.Image      = Properties.Resources.Profile_on;
 }
Ejemplo n.º 13
0
        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();
        }
Ejemplo n.º 14
0
 private void ForClient_Load(object sender, EventArgs e)
 {
     MyDeliveryPanel.Hide();
 }