/// <summary>
        /// Check the Mwf_Photo table to see if the photo has already been sent and processed.
        /// </summary>
        private bool PhotoHasAlreadyBeenReceived()
        {
            using (IUnitOfWork uow = DIContainer.CreateUnitOfWork())
            {
                IMWF_PhotoRepository mwf_PhotoRepo = DIContainer.CreateRepository <IMWF_PhotoRepository>(uow);

                MWF_Photo mwfPhoto = mwf_PhotoRepo.GetMwfPhotoByMadIdAndPhotoName(new Guid(MwfInternalId), FileName);

                if (mwfPhoto != null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
        /// <summary>
        /// Insert the processed fields into the database table mwf_photo
        /// </summary>
        private int InsertMwfPhotoTable(IUnitOfWork uow)
        {
            MWF_Photo mwfPhoto = new MWF_Photo();

            IMWF_PhotoRepository mwf_PhotoRepo = DIContainer.CreateRepository <IMWF_PhotoRepository>(uow);

            mwfPhoto.MwfInternalId            = new Guid(MwfInternalId);
            mwfPhoto.PhotoFileName            = FileName;
            mwfPhoto.PhotoFileFormat          = FileFormat;
            mwfPhoto.DriverName               = DriverName;
            mwfPhoto.PhotoDateTime            = Convert.ToDateTime(PhotoDateTime);
            mwfPhoto.PhotoComment             = PhotoComment;
            mwfPhoto.Latitude                 = Convert.ToDouble(Latitude);
            mwfPhoto.Longitude                = Convert.ToDouble(Longitude);
            mwfPhoto.MobileApplicationDataIds = MobileApplicationDataIds;
            mwfPhoto.HEOrderIds               = HEOrderIds;

            mwf_PhotoRepo.Add(mwfPhoto);

            return(mwfPhoto.ID);
        }