Пример #1
0
        public async Task <bool> MoveSlotAsync(MoveSlotRequestArgs args)
        {
            await DbContext.ExecuteNonQueryAsync(DataConstants.PR_PLAN_MOVE_CAPACITY_SLOT,
                                                 CommandType.StoredProcedure, param =>
            {
                param.Add("@SlotID", args.SlotID);
                param.Add("@PlannedDate", args.PlannedDate);
                param.Add("@ExpectedDate", args.ExpectedDate);
            });

            return(true);
        }
Пример #2
0
        public async Task <bool> MoveSlotAsync(MoveSlotRequestArgs args)
        {
            //this method move slot to another week and update capacity if it is not sufficient also email notification is sent to requested user.
            var resp = await slotService.UpdateSlotPeriodAsync(new UpdateSlotPeriodRequestArgs
            {
                SlotID        = args.SlotID,
                ExpectedDate  = args.ExpectedDate,
                PlannedDate   = args.PlannedDate,
                AllowOverride = true
            });

            //this method should be called if requesting user is breeder that do not have access to update capacity
            //for not it is not called
            //var data = await repository.MoveSlotAsync(args);
            return(true);
        }
Пример #3
0
        public async Task <IHttpActionResult> MoveSlot([FromBody] MoveSlotRequestArgs args)
        {
            var data = await capacityService.MoveSlotAsync(args);

            return(Ok(data));
        }