Example #1
0
        private void LoadModels(Guid serviceId)
        {
            _OrderAndOrderDetailsVM = new OrderAndOrderDetailsVM()
            {
                OrderModel        = new Order(),
                OrderDetailsModel = new OrderDetails()
            };

            _OrderAndOrderDetailsVM.OrderDetailsModel.Order   = _OrderAndOrderDetailsVM.OrderModel;
            _OrderAndOrderDetailsVM.OrderDetailsModel.Service = _queries.GetServiceIncludeApplicationUserFirstOrDefault(serviceId);
            _OrderAndOrderDetailsVM.serviceIdVM = serviceId;
        }
Example #2
0
        public async Task <IActionResult> OnGet(Guid serviceId)
        {
            if (serviceId == null)
            {
                return(Page());
            }
            _OrderAndOrderDetailsVM = new OrderAndOrderDetailsVM()
            {
                OrderModel        = new Order(),
                OrderDetailsModel = new OrderDetails()
            };
            //_OrderAndOrderDetailsVM.OrderModel.Id = new Guid();
            //_OrderAndOrderDetailsVM.OrderDetailsModel.Id = new Guid();
            _OrderAndOrderDetailsVM.OrderDetailsModel.Order   = _OrderAndOrderDetailsVM.OrderModel;
            _OrderAndOrderDetailsVM.OrderDetailsModel.Service = _context.ServiceModel.FirstOrDefault(s => s.ID == serviceId);

            _OrderAndOrderDetailsVM.serviceIdVM = serviceId;

            //Order = new Order();


            //Order.ServiceId = );
            return(Page());
        }