partial void DeleteTransNote(TransNote instance);
partial void UpdateTransNote(TransNote instance);
partial void InsertTransNote(TransNote instance);
private void detach_TransNotes(TransNote entity) { this.SendPropertyChanging(); entity.Tran = null; }
private void attach_TransNotes(TransNote entity) { this.SendPropertyChanging(); entity.Tran = this; }
protected void btnSaveNote_Click(object sender, EventArgs e) { cid = Convert.ToInt32(Request.QueryString["id"]); if (cid == 0) { lblStatus.Text = "Please save the ticket before adding notes."; } else { Linq_1DataContext db = new Linq_1DataContext(); TransNote t = new TransNote(); t.Note = txtNote.Text; t.NoteDate = DateTime.Today; t.NoteUser = (string)Session["username"]; t.Trans = cid; db.TransNotes.InsertOnSubmit(t); var z = (from g in db.Trans where g.id == cid select g).FirstOrDefault(); if (z != null) { z.LastMod = DateTime.Today; } try { db.SubmitChanges(); LoadNotes(); } catch (Exception ex) { Shared.WriteError(ex, HttpContext.Current, "btnSaveNote_Click - Error Saving note or updating MODDATE on trans table"); } } txtNote.Text = ""; }