示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FormCadastrarCliente formCadastrarCliente = new FormCadastrarCliente();

            formCadastrarCliente.MdiParent = this.MdiParent;
            formCadastrarCliente.Show();
        }
示例#2
0
        private void DataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int clienteId = Convert.ToInt32(dataGridView1["Id", e.RowIndex].Value);

            if (ComboFiltro.Text == "Pessoa Fisica")
            {
                MessageBox.Show("Olha no codigo!");
                //var cliente = new MotoristasDao().GetById(clienteId);
                //var form = new FormCadastrarCliente(cliente)
                //{
                //	MdiParent = this.ParentForm
                //};
                //this.Close();
                //form.Show();
            }
            else
            {
                var cliente = new ClientesPjDao().GetById(clienteId);
                var form    = new FormCadastrarCliente(cliente)
                {
                    MdiParent = this.ParentForm
                };
                this.Close();
                form.Show();
            }
        }
示例#3
0
        private void Button2_Click(object sender, EventArgs e)
        {
            FormCadastrarCliente cadastrarCliente = new FormCadastrarCliente
            {
                ControlBox = true
            };

            cadastrarCliente.Show();
        }
示例#4
0
        private void cadastrarClienteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var cadastrarCliente = new FormCadastrarCliente
            {
                ControlBox = false,
                MdiParent  = this
            };

            cadastrarCliente.Show();
        }