コード例 #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);
		}
コード例 #4
0
		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");
		}
コード例 #5
0
		public OperationResult<bool> SaveScheduleScheme(Guid clientUID, ScheduleScheme item, bool isNew)
		{
			return SafeOperationCall(clientUID, () => RubezhService.SaveScheduleScheme(clientUID, item, isNew), "SaveScheduleScheme");
		}
コード例 #6
0
		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);
			}
		}