Пример #1
0
		private void detach_sub_correspondences(sub_correspondence entity)
		{
			this.SendPropertyChanging();
			entity.correspondence = null;
		}
Пример #2
0
 partial void Deletesub_correspondence(sub_correspondence instance);
Пример #3
0
 partial void Updatesub_correspondence(sub_correspondence instance);
Пример #4
0
 partial void Insertsub_correspondence(sub_correspondence instance);
Пример #5
0
		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;
            }

        }