public string Photo()
    {
        string PhotoName;
        string PhotoDBName;
        string PhotoSource;
        string SavePath;
        string PhotoPath = Request.MapPath(this.Config(COM.ADM.EnumUtil.Config.PathActivityImgByUser));

        int SizeActivityUserPhoto            = int.Parse(this.Config(COM.ADM.EnumUtil.Config.SizeActivityUserPhoto));
        int SizeActivityUserPhotoThumb       = int.Parse(this.Config(COM.ADM.EnumUtil.Config.SizeActivityUserPhotoThumb));
        int SizeActivityUserPhotoThumbSquare = int.Parse(this.Config(COM.ADM.EnumUtil.Config.SizeActivityUserPhotoThumbSquare));

        PhotoPath = PhotoPath.Replace("/", "\\");

        int MaxKBSize = int.Parse(this.Config(COM.ADM.EnumUtil.Config.MaxKBActivityPhoto));

        if ((fuPhoto.PostedFile != null && fuPhoto.PostedFile.ContentLength > 0) && (PhotoPath != String.Empty) && (MaxKBSize > 0))
        {
            int FileSize = fuPhoto.PostedFile.ContentLength;

            if ((FileSize <= 0) || (FileSize > MaxKBSize))
            {
                return(this.smPhoto);
            }

            string FileName = fuPhoto.PostedFile.FileName;
            try
            {
                PhotoName = COM.Util.genAcByUserName(this.ActivityID, this.smUserID, 0) + LIB.Util.GetExtension(FileName);
                fuPhoto.PostedFile.SaveAs(PhotoPath + PhotoName);

                ImageHelper ImgHelper = new ImageHelper();

                PhotoDBName = PhotoName.Replace(",0.", ",1.");
                PhotoSource = PhotoPath + PhotoName;
                SavePath    = PhotoPath + PhotoDBName;
                ImgHelper.Resize(PhotoSource, SavePath, SizeActivityUserPhoto);

                PhotoSource = SavePath;
                SavePath    = PhotoPath + PhotoName.Replace(",0.", ",2.");
                ImgHelper.Resize(PhotoSource, SavePath, SizeActivityUserPhotoThumb);

                PhotoSource = SavePath;
                SavePath    = PhotoPath + PhotoName.Replace(",0.", ",3.");
                ImgHelper.Crop(PhotoSource, SavePath, 0, 0, SizeActivityUserPhotoThumbSquare, SizeActivityUserPhotoThumbSquare);

                return(PhotoDBName);
            }
            catch (Exception)
            {
                return("");
            }
        }
        return("");
    }
 public override int GetHashCode()
 {
     return(PhotoName.GetHashCode() ^ Code.GetHashCode() ^
            IssueInfo.GetHashCode() ^ PersonInfo.GetHashCode() ^
            LocationInfo.GetHashCode() ^ FamilyInfo.GetHashCode());
 }