forked from luisc13/EasyCall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormOcorrencia.cs
50 lines (44 loc) · 1.26 KB
/
FormOcorrencia.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using EasyCall.DAO;
using EasyCall.modelo;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace EasyCall
{
public partial class FormOcorrencia : Form
{
private int idDivida;
private int idDevedor;
public FormOcorrencia(int id, int devedorID)
{
InitializeComponent();
this.idDivida = id;
this.idDevedor = devedorID;
}
private void btnEnviar_Click(object sender, EventArgs e)
{
String ocr = TxbOcorrencia.Text;
if (String.IsNullOrEmpty(ocr) ) {
MessageBox.Show("Você deve fornecer uma ocorrência antes de prosseguir");
}
else
{
var dao = new OcorrenciaDAO();
dao.setOcorrencia(ocr, idDivida);
var registro = "ocorrencia registrada";
RelatorioDAO.inserirRegistro(idDivida, idDevedor, registro);
this.Close();
}
}
private void Ocorrencia_Load(object sender, EventArgs e)
{
}
}
}