コード例 #1
0
        private void CheckActivityImage()
        {
            //checkdatabase for record
            //if not exist, create img folder & thumb folder
            var dr = new AdministrationDAC().RetrieveActivityImageInformation(ActivityID);

            if (dr == null)
            {
                dr = new AdministrationEDSC.ActivityImageDTDataTable().NewActivityImageDTRow();
                //Create new ImageInformationRecord
                dr.ActivityID  = ActivityID;
                dr.FreeStorage = SystemConstants.MaxActivityImageStorage;
                dr.StorageUsed = 0;
                dr.ImageAmount = 0;

                new AdministrationDAC().createActivityImageInformation(dr);

                // string Path = SystemConstants.ImageDirectory + "/" + activityID + "/" + activityID + "_" + imageID + "_" + prodImage.Filename;
                //Ensure Directory is exist
                //Server.MapPath(SystemConstants.ActImageDirectory + "/" + ActivityID + "/");
                //Create ImageDir

                //System.IO.Directory.CreateDirectory(Server.MapPath(@SystemConstants.ActImageDirectory + "/" + ActivityID + "/"));

                //Create ImageThumbDir
                //System.IO.Directory.CreateDirectory(Server.MapPath(@SystemConstants.ActImageDirectory + "/" + ActivityID + "/" + @SystemConstants.ImageThumbDirectory));
            }
            else
            {
                divUploadSuccessfull.Visible = true;
            }
        }
コード例 #2
0
        public AdministrationEDSC.ActivityImageDTRow GetImageDetail()
        {
            var dr = new AdministrationEDSC.ActivityImageDTDataTable().NewActivityImageDTRow();

            dr.ActivityID  = 0;
            dr.StorageUsed = SizeUploaded;
            dr.FreeStorage = SystemConstants.MaxActivityImageStorage - SizeUploaded;
            dr.ImageAmount = ImageUploaded;
            return(dr);
        }