Esempio n. 1
0
        public void deleteMessage(MessagesModel model, Guid ticket)
        {
            DataCommandService.IDataCommandService dataCommandService = new DataCommandService.DataCommandServiceClient();

            DataCommandService.DeleteRequest message = new DataCommandService.DeleteRequest();

            message.Id     = model.Id;
            message.Ticket = ticket;

            try
            {
                dataCommandService.DeleteMessages(message);
            }
            catch (Exception ex)
            { }
        }
Esempio n. 2
0
        public void addMessage(MessagesModel model, Guid ticket)
        {
            DataCommandService.IDataCommandService dataCommandService = new DataCommandService.DataCommandServiceClient();

            DataCommandService.AddMessageRequest message = new DataCommandService.AddMessageRequest();

            message.Title        = model.title;
            message.Content      = model.content;
            message.Ticket       = ticket;
            message.Important    = model.important;
            message.DepartmentId = model.selectedDepartmentId;

            try
            {
                dataCommandService.AddMessage(message);
            }
            catch (Exception ex)
            { }
        }
Esempio n. 3
0
        public void editMessage(MessagesModel model, Guid ticket)
        {
            DataCommandService.IDataCommandService dataCommandService = new DataCommandService.DataCommandServiceClient();
            DataCommandService.MessageInfo         message            = new DataCommandService.MessageInfo();

            DataQueryService.IDataQueryService dataQueryService = new DataQueryService.DataQueryServiceClient();
            var department = dataQueryService.GetDepartment(model.selectedDepartmentId, ticket);

            message.Id         = model.Id;
            message.Title      = model.title;
            message.Content    = model.content;
            message.Important  = model.important;
            message.UserId     = model.UserId;
            message.Department = departInfoConventer(department);

            try
            {
                dataCommandService.EditMessages(message, ticket);
            }
            catch (Exception ex)
            { }
        }