Ejemplo n.º 1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            clientAdd newClient = new clientAdd();

            newClient.MdiParent = ActiveForm;
            newClient.Show();
        }
Ejemplo n.º 2
0
        private void clientSearch()
        {
            if (this.clientsTableAdapter.ClientSearch(this.ssSQLite.Clients, CultureInfo.CurrentCulture.TextInfo.ToTitleCase
                                                          (firstnameToolStripTextBox.Text.Trim()), CultureInfo.CurrentCulture.TextInfo.ToTitleCase
                                                          (lastnameToolStripTextBox.Text.Trim())) == 0)
            {
                string            message = "Would you like to add new client?";
                string            caption = "No such client registered";
                MessageBoxButtons buttons = MessageBoxButtons.YesNo;
                DialogResult      result  = MessageBox.Show(message, caption, buttons);

                if (result == DialogResult.Yes)
                {
                    clientAdd newClient = new clientAdd();
                    newClient.MdiParent = ActiveForm;
                    newClient.Show();
                }
            }
            else
            {
                main Main = (main)this.MdiParent;
                Main.toolStripButton2.Enabled = true;
                Main.toolStripButton3.Enabled = true;
                Main.toolStripButton4.Enabled = false;
                Main.toolStripButton5.Enabled = false;
                Main.toolStripButton7.Enabled = false;
                Main.toolStripButton6.Enabled = false;
                Main.toolStripButton9.Enabled = false;
            }
        }