예제 #1
0
		public static bool Save(ScheduleScheme scheduleScheme, bool isNew)
		{
			var operationResult = ClientManager.RubezhService.SaveScheduleScheme(scheduleScheme, isNew);
			return Common.ShowErrorIfExists(operationResult);
		}
예제 #2
0
		public static bool Restore(ScheduleScheme item)
		{
			return Restore(item.UID, item.Name);
		}
예제 #3
0
		public static bool MarkDeleted(ScheduleScheme item)
		{
			return MarkDeleted(item.UID, item.Name);
		}
		public RubezhAPI.OperationResult<bool> SaveScheduleScheme(ScheduleScheme item, bool isNew)
		{
			return SafeOperationCall(() =>
			{
				var rubezhService = RubezhServiceFactory.Create(TimeSpan.FromMinutes(10));
				using (rubezhService as IDisposable)
					return rubezhService.SaveScheduleScheme(RubezhServiceFactory.UID, item, isNew);
			}, "SaveScheduleScheme");
		}
		public OperationResult<bool> SaveScheduleScheme(Guid clientUID, ScheduleScheme item, bool isNew)
		{
			return SafeOperationCall(clientUID, () => RubezhService.SaveScheduleScheme(clientUID, item, isNew), "SaveScheduleScheme");
		}
		public OperationResult<bool> SaveScheduleScheme(Guid clientUID, ScheduleScheme item, bool isNew)
		{
			if (isNew)
				AddJournalMessage(JournalEventNameType.Редактирование_графика_работы_сотрудника, item.Name, item.UID, clientUID, JournalEventDescriptionType.Добавление_график_работы_сотрудника, JournalObjectType.ScheduleScheme);
			else
				AddJournalMessage(JournalEventNameType.Редактирование_графика_работы_сотрудника, item.Name, item.UID, clientUID, JournalEventDescriptionType.Редактирование_график_работы_сотрудника, JournalObjectType.ScheduleScheme);
			using (var databaseService = new RubezhDAL.DataClasses.DbService())
			{
				return databaseService.ScheduleSchemeTranslator.Save(item);
			}
		}