/// <summary> /// Get confirm informartion /// </summary> /// <returns></returns> public BookRepair_ConfirmInfoModel GetConfirmBookInfo() { // get product info var prodS = new ProductService(_dataContext); var product = prodS.GetGeneralInfo(prodS.GetModelId()); //product.add //get repair info var custS = new CustomerService(_dataContext); var inspS = new InspectionService(_dataContext); var inspection = inspS.GetGeneralinspectionInfoFromSession(); product.Additionalfields = inspection; var customer = custS.GetGeneralCustomerInfoFromSession(); var result = new BookRepair_ConfirmInfoModel(); // get agent info var agent = GetAgentRepairInfo(); // set values result.AgentInfo.Address = agent.Address; result.AgentInfo.CollectionInfo = agent.CollectionInfo; result.AgentInfo.EngineerId = agent.EngineerId; result.AgentInfo.ExtraInfo = agent.ExtraInfo; result.AgentInfo.Name = agent.Name; result.AgentInfo.NextStep = agent.NextStep; result.AgentInfo.OpeningHours = agent.OpeningHours; result.AgentInfo.Postcode = agent.Postcode; result.AgentInfo.TelephoneNumber = agent.TelephoneNumber; result.AgentInfo.BookingUrl = agent.BookingUrl; result.AgentInfo.InHomeAvailable = agent.InHomeAvailable; // set customer info result.CustomerInfo.CustomerId = customer.CustomerId; result.CustomerInfo.Address1 = customer.Address1; result.CustomerInfo.Address2 = customer.Address2; result.CustomerInfo.Address3 = customer.Address3; result.CustomerInfo.CustomerName = customer.CustomerName; result.CustomerInfo.PostCode = customer.PostCode; // set product info result.ProductInfo.ItemNumber = product.ItemNumber; result.ProductInfo.Description = product.Description; result.ProductInfo.OriginalCondition = product.OriginalCondition; result.ProductInfo.SerialNumber = product.SerialNumber; result.ProductInfo.TransactionInfo = product.TransactionInfo; result.ProductInfo.DateOfPurchase = product.DateOfPurchase; result.ProductInfo.ItemCode = product.ItemCode; result.ProductInfo.Additionalfields = inspection; // update info in sssion var repairState = _bookStateHolder.Load(); repairState.EngineerId = result.AgentInfo.EngineerId; // repairState.Appointmentdate = _bookStateHolder.; repairState.NextStep = result.AgentInfo.NextStep; _bookStateHolder.UpdateFrom(repairState); result.SelectedAppointment = repairState.AppointmentDate; return(result); }