Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "")
            {
                Data.ClientID = textBox1.Text.Trim();

                clientsAll clients = new clientsAll();
                clients.MdiParent = main.ActiveForm;
                clients.Show();

                clients.clientsSearchId(Data.ClientID);
            }
            else if (textBox2.Text != "")
            {
                Data.ClientLastName = textBox2.Text.Trim();

                clientsAll clients = new clientsAll();
                clients.MdiParent = main.ActiveForm;
                clients.Show();

                clients.clientsSearchLastName(Data.ClientLastName);
            }
            else
            {
                MessageBox.Show("You need to enter Client's Id or Client's Last Name");
                return;
            }
        }
Пример #2
0
        private void textBox2_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Return)
            {
                try
                {
                    if (textBox2.Text != "")
                    {
                        Data.ClientLastName = textBox2.Text.Trim();

                        clientsAll clients = new clientsAll();
                        clients.MdiParent = main.ActiveForm;
                        clients.Show();

                        clients.clientsSearchLastName(Data.ClientLastName);
                    }
                    else
                    {
                        MessageBox.Show("You need to enter Client's Last Name");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Пример #3
0
        private void clientsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            clientsAll clients = new clientsAll();

            clients.MdiParent = this;
            clients.Show();
        }