//Add Data From Linked Tables for Display
        public void EditItemForDisplay(PolicyHotelPropertyGroupItem policyHotelPropertyGroupItem)
        {
            //PolicyGroupName
            PolicyGroupRepository policyGroupRepository = new PolicyGroupRepository();
            PolicyGroup           policyGroup           = new PolicyGroup();

            policyGroup = policyGroupRepository.GetGroup(policyHotelPropertyGroupItem.PolicyGroupId);
            policyHotelPropertyGroupItem.PolicyGroupName = policyGroup.PolicyGroupName;

            //PolicyHotelStatus
            if (policyHotelPropertyGroupItem.PolicyHotelStatusId != null)
            {
                int policyHotelStatusId = (int)policyHotelPropertyGroupItem.PolicyHotelStatusId;
                PolicyHotelStatusRepository policyHotelStatusRepository = new PolicyHotelStatusRepository();
                PolicyHotelStatus           policyHotelStatus           = new PolicyHotelStatus();
                policyHotelStatus = policyHotelStatusRepository.GetPolicyHotelStatus(policyHotelStatusId);
                policyHotelPropertyGroupItem.PolicyHotelStatus = policyHotelStatus.PolicyHotelStatusDescription;
            }

            //HarpHotel
            HarpHotelRepository harpHotelRepository = new HarpHotelRepository();
            HarpHotel           harpHotel           = new HarpHotel();

            harpHotel = harpHotelRepository.GetHarpHotel(policyHotelPropertyGroupItem.HarpHotelId);
            if (harpHotel != null)
            {
                policyHotelPropertyGroupItem.HarpHotelName = harpHotel.HarpHotelName;
            }
        }
        //Add Data From Linked Tables for Display
        public void EditItemForDisplay(PolicyHotelVendorGroupItem policyHotelVendorGroupItem)
        {
            //PolicyHotelStatusDescription
            if (policyHotelVendorGroupItem.PolicyHotelStatusId != null)
            {
                int policyHotelStatusId = (int)policyHotelVendorGroupItem.PolicyHotelStatusId;
                PolicyHotelStatusRepository policyHotelStatusRepository = new PolicyHotelStatusRepository();
                PolicyHotelStatus           policyHotelStatus           = new PolicyHotelStatus();
                policyHotelStatus = policyHotelStatusRepository.GetPolicyHotelStatus(policyHotelStatusId);
                policyHotelVendorGroupItem.PolicyHotelStatus = policyHotelStatus.PolicyHotelStatusDescription;
            }

            //PolicyGroupName
            PolicyGroupRepository policyGroupRepository = new PolicyGroupRepository();
            PolicyGroup           policyGroup           = new PolicyGroup();

            policyGroup = policyGroupRepository.GetGroup(policyHotelVendorGroupItem.PolicyGroupId);
            policyHotelVendorGroupItem.PolicyGroupName = policyGroup.PolicyGroupName;
            policyHotelVendorGroupItem.PolicyGroupId   = policyGroup.PolicyGroupId;

            //SupplierName
            SupplierRepository supplierRepository = new SupplierRepository();
            Supplier           supplier           = new Supplier();

            supplier = supplierRepository.GetSupplier(policyHotelVendorGroupItem.SupplierCode, policyHotelVendorGroupItem.ProductId);
            if (supplier != null)
            {
                policyHotelVendorGroupItem.SupplierName = supplier.SupplierName;
            }

            //PolicyLocationName
            PolicyLocationRepository policyLocationRepository = new PolicyLocationRepository();
            PolicyLocation           policyLocation           = new PolicyLocation();

            policyLocation = policyLocationRepository.GetPolicyLocation(policyHotelVendorGroupItem.PolicyLocationId);
            if (policyLocation != null)
            {
                policyHotelVendorGroupItem.PolicyLocationName = policyLocation.PolicyLocationName;
            }

            ProductRepository productRepository = new ProductRepository();
            Product           product           = new Product();

            product = productRepository.GetProduct(policyHotelVendorGroupItem.ProductId);
            if (product != null)
            {
                policyHotelVendorGroupItem.ProductName = product.ProductName;
            }
        }