Exemplo n.º 1
0
 partial void DeleteTransNote(TransNote instance);
Exemplo n.º 2
0
 partial void UpdateTransNote(TransNote instance);
Exemplo n.º 3
0
 partial void InsertTransNote(TransNote instance);
Exemplo n.º 4
0
		private void detach_TransNotes(TransNote entity)
		{
			this.SendPropertyChanging();
			entity.Tran = null;
		}
Exemplo n.º 5
0
		private void attach_TransNotes(TransNote entity)
		{
			this.SendPropertyChanging();
			entity.Tran = this;
		}
Exemplo n.º 6
0
 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 = "";
 }