private bool create_new_correspondence()
        {
            try
            {

                correspondence newCorres = new correspondence();
                newCorres.correspondence_name = txtName.Text;
                newCorres.description = txtDescription.Text;
                newCorres.category_id = int.Parse(cmbCategories.SelectedValue.ToString());
                newCorres.owner = 0;
                newCorres.code = txtCode.Text;
                newCorres.created_at = DateTime.Now;
                database.correspondences.InsertOnSubmit(newCorres);
                database.SubmitChanges();
                return true;
            }
            catch (Exception newSlaError)
            {
                MessageBox.Show(newSlaError.Message);
                return false;
            }

        }
Exemplo n.º 2
0
 partial void Updatecorrespondence(correspondence instance);
Exemplo n.º 3
0
 partial void Deletecorrespondence(correspondence instance);
Exemplo n.º 4
0
 partial void Insertcorrespondence(correspondence instance);