public static AcukwikUploads UpdateAcukwikUpload(object uploadOBJ)
        {
            AcukwikUploads upload = new AcukwikUploads();

            upload.Clone(uploadOBJ);
            upload.Update();
            return(upload);
        }
Beispiel #2
0
        private bool PerformAcukwikSave(HttpPostedFile file, string acukwikName)
        {
            try
            {
                string fileType = file.FileName.Substring(file.FileName.LastIndexOf(".") + 1);
                string savePath = string.Format("{0}\\{1}_{2}.{3}", GetSaveDirectory(), Users.CurrentUser.Id, acukwikName, fileType);

                AcukwikUploads acukwikData = new AcukwikUploads();
                acukwikData.Name = acukwikName;
                AcukwikUploadsService.UpdateAcukwikUpload(acukwikData);

                file.SaveAs(savePath);
                SessionHelper.Instance.MostRecentlyUploadedFilePath = savePath;
                AcukwikSheetHandler handler = new AcukwikSheetHandler();
                return(handler.Process(savePath, acukwikName));
            }
            catch (System.Exception exception)
            {
                return(false);

                throw new System.Exception(exception.ToString());
            }
        }