public void editDeanOffice(DeansOfficesModel model, Guid ticket) { DataCommandService.IDataCommandService dataCommandService = new DataCommandService.DataCommandServiceClient(); DataCommandService.DeansOfficeInfo deansOffice = new DataCommandService.DeansOfficeInfo(); DataQueryService.IDataQueryService dataQueryService = new DataQueryService.DataQueryServiceClient(); var department = dataQueryService.GetDepartment(model.selectedDepartmentId, ticket); deansOffice.Id = model.Id; deansOffice.AdditionalInfo = model.AdditionalInfo; deansOffice.Address = model.Address; deansOffice.OpeningHours = model.OpeningHours; deansOffice.UserId = model.UserId; deansOffice.Department = departInfoConventer(department); try { dataCommandService.EditDeansOffices(deansOffice, ticket); } catch (Exception ex) { } }
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) { } }
public void editEvent(EventsModel model, Guid ticket) { DataCommandService.IDataCommandService dataCommandService = new DataCommandService.DataCommandServiceClient(); DataCommandService.EventInfo evnt = new DataCommandService.EventInfo(); DataQueryService.IDataQueryService dataQueryService = new DataQueryService.DataQueryServiceClient(); var department = dataQueryService.GetDepartment(model.selectedDepartmentId, ticket); evnt.Title = model.title; evnt.Content = model.content; evnt.Date = model.date.ToString(); evnt.NotificationDate = model.notificationDate.ToString(); evnt.UserId = model.UserId; evnt.Id = model.Id; evnt.Department = departInfoConventer(department); try { dataCommandService.EditEvents(evnt, ticket); } catch (Exception ex) { } }