private void btnRegistrar_Click(object sender, EventArgs e) { try { DataClassesStatusDataContext Status = new DataClassesStatusDataContext(); tbl_Status objTblStat = new tbl_Status(); objTblStat.Desc_Status = txtStatus.Text; Status.tbl_Status.InsertOnSubmit(objTblStat); Status.SubmitChanges(); MessageBox.Show("Status cadastrado com sucesso!", "Cadastro", MessageBoxButtons.OK, MessageBoxIcon.Information); txtStatus.Clear(); } catch (Exception erro) { MessageBox.Show(erro.Message); } }
partial void Deletetbl_Status(tbl_Status instance);
partial void Updatetbl_Status(tbl_Status instance);
partial void Inserttbl_Status(tbl_Status instance);