Exemplo n.º 1
0
        private void popupShowTicketComment_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e)
        {
            //IObjectSpace objectSpace = Application.CreateObjectSpace(ticketCommentType);
            IObjectSpace   objectSpace = ObjectSpace.CreateNestedObjectSpace();
            ITicketComment pca         = objectSpace.CreateObject(ticketCommentType) as ITicketComment;

            e.View = Application.CreateDetailView(objectSpace, pca, true);
        }
Exemplo n.º 2
0
        private void popupShowTicketComment_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            e.PopupWindowView.ObjectSpace.CommitChanges();
            ITicket        ticket  = (ITicket)View.CurrentObject;
            ITicketComment comment = (ITicketComment)View.ObjectSpace.GetObject(e.PopupWindowViewCurrentObject);

            ticket.Comments.Add(comment);
            ObjectSpace.CommitChanges();
            //View.Close();
        }