Example #1
0
        private void OnClickLancarConta(object sender, EventArgs e)
        {
            try {
                int     Id   = Convert.ToInt32(gridDados.Rows[mouseLocation.RowIndex].Cells[0].Value);
                dynamic Data = ListaDados.Find(find => Convert.ToInt32(find.Id) == Id);

                ToolStripMenuItem Button = (ToolStripMenuItem)sender;

                List.FormFinanceiro ModalFinanceiro = new FormFinanceiro(null);

                if (Button.Tag == "conta_pagar")
                {
                    if (Data.Valor > 0)
                    {
                        ModalFinanceiro.ModalLancarConta(Id, 6, 2, Data.Valor);
                    }
                    else
                    {
                        throw new Exception("Multa deve ter um valor para ser lançada no financeiro.");
                    }
                }
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
        private void OnClickLancarConta(object sender, EventArgs e)
        {
            try {
                int     Id   = Convert.ToInt32(gridDados.Rows[mouseLocation.RowIndex].Cells[0].Value);
                dynamic Data = ListaDados.Find(find => Convert.ToInt32(find.Id) == Id);

                ToolStripMenuItem Button = (ToolStripMenuItem)sender;

                List.FormFinanceiro ModalFinanceiro = new FormFinanceiro(null);

                ModalFinanceiro.ModalLancarConta(Id, 2, 0, 0);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }