예제 #1
0
        public IActionResult OnGet(int?serviceId)
        {
            Services = serviceData.GetOperationsByDescription(SearchTerm);
            Type     = htmlHelper.GetEnumSelectList <Operation.OperationType>();

            if (serviceId.HasValue && Service.IsService == true)
            {
                Services = (IEnumerable <Operation>)serviceData.GetById(serviceId.Value);

                serviceData.Delete(Service);
                return(Page());
            }
            else
            {
                Service = new Service();
            }
            return(Page());
        }
예제 #2
0
        public IActionResult OnGet(int?operationId)
        {
            Operations = operationData.GetOperationsByDescription(SearchTerm);
            Type       = htmlHelper.GetEnumSelectList <Operation.OperationType>();
            Pay        = htmlHelper.GetEnumSelectList <Operation.PaymentMethod>();

            if (operationId.HasValue)
            {
                Operation = operationData.GetById(operationId.Value);
                operationData.Delete(Operation);
                return(Page());
            }
            else
            {
                Operation = new Operation();
            }
            return(Page());
        }