private void detach_sub_correspondences(sub_correspondence entity) { this.SendPropertyChanging(); entity.correspondence = null; }
partial void Deletesub_correspondence(sub_correspondence instance);
partial void Updatesub_correspondence(sub_correspondence instance);
partial void Insertsub_correspondence(sub_correspondence instance);
private void attach_sub_correspondences(sub_correspondence entity) { this.SendPropertyChanging(); entity.sla_timer = this; }
private bool create_new_sub_correspondence() { try { sub_correspondence newSubCorres = new sub_correspondence(); newSubCorres.sub_correspondence_name = txtName.Text; newSubCorres.code = txtCode.Text; newSubCorres.description = txtDescription.Text; newSubCorres.correspondence_id = int.Parse(cmbCorrespondence.SelectedValue.ToString()); newSubCorres.sla_id = int.Parse(cmbSLA.SelectedValue.ToString()); newSubCorres.owner = 0; newSubCorres.created_at = DateTime.Now; database.sub_correspondences.InsertOnSubmit(newSubCorres); database.SubmitChanges(); return true; } catch (Exception newSlaError) { MessageBox.Show(newSlaError.Message); return false; } }