Example #1
0
        private void buttonTermoCompromisso_Click(object sender, EventArgs e)
        {
            if (dataGridViewResultado.SelectedRows.Count >= 1)
            {
                int index = dataGridViewResultado.SelectedRows[0].Index;

                Forms.TermoCompromisso.TermoCompromissoView termoCompromisso = new Forms.TermoCompromisso.TermoCompromissoView();
                termoCompromisso.cliente = Library.ClienteBD.FindById((long)dataGridViewResultado["ColumnId", index].Value);
                termoCompromisso.ShowDialog(this);
            }
        }
Example #2
0
        static public void OpenTermoCompromissoView()
        {
            bool verifica = false;

            foreach (Form a in System.Windows.Forms.Application.OpenForms)
            {
                if (a is Forms.TermoCompromisso.TermoCompromissoView)
                {
                    a.BringToFront();
                    verifica = true;
                    break;
                }
            }

            if (!verifica)
            {
                Forms.TermoCompromisso.TermoCompromissoView childStepStep = new Forms.TermoCompromisso.TermoCompromissoView();
                childStepStep.Show();
                childStepStep.Disposed += delegate { childStepStep.Dispose(); };
            }
        }
Example #3
0
 public void OpenTermoCompromisso(int index)
 {
     Forms.TermoCompromisso.TermoCompromissoView termoCompromisso = new Forms.TermoCompromisso.TermoCompromissoView();
     termoCompromisso.cliente = Library.ClienteBD.FindById((long)dataGridViewResultado["ColumnId", index].Value);
     termoCompromisso.ShowDialog(this);
 }