Пример #1
0
 partial void Deleteticket_comment(ticket_comment instance);
Пример #2
0
 partial void Insertticket_comment(ticket_comment instance);
Пример #3
0
 partial void Updateticket_comment(ticket_comment instance);
Пример #4
0
        private void post_comment(int status)
        {
            try
            {
                if(validate())
                {
                    if (update_ticket(status))
                    {
                        ticket_comment newComment = new ticket_comment();
                        newComment.ticket_id = txtTicketID.Text;
                        newComment.comment_date = DateTime.Now;
                        newComment.status = "1".ToString();
                        newComment.owner = 0;
                        newComment.comment = txtComment.Text;
                        database.ticket_comments.InsertOnSubmit(newComment);
                        database.SubmitChanges();
                        MessageBox.Show("Your comment has been posted.");
                        this.Close();
                    }
                    else
                    { MessageBox.Show("Your comment was not posted."); }
                }
            }
            catch(Exception err)
            {
                MessageBox.Show(err.Message);
            }


        }