Exemple #1
0
 // GET api/OnlineDrive/5
 /// <summary>
 /// Gets a list of uploaded files for OnlineDrive Web Application System.
 /// </summary>
 /// <param name="id">The id number of the uploaded file to get.</param>
 /// <returns>Returns list of uploaded files.</returns>
 public IEnumerable <OnlineDriveViewModel> Get(int id)
 {
     this.ListOnlineDriveViewModel = new List <OnlineDriveViewModel>();
     this.ListOnlineDriveViewModel.Clear();
     using (OnlineDriveProcess process = new OnlineDriveProcess())
     {
         int _rowid = 0;
         foreach (var item in process.Get(id))
         {
             _rowid++;
             this.ListOnlineDriveViewModel.Add(new OnlineDriveViewModel
             {
                 RowID         = _rowid,
                 Id            = item.Id,
                 FileNameGUID  = item.FileNameGUID,
                 FileName      = item.FileName,
                 FilePath      = item.FilePath,
                 UploadedOn    = item.UploadedOn,
                 UploadedBy    = item.UploadedBy,
                 LastUpdatedOn = item.LastUpdatedOn,
                 LastUpdatedBy = item.LastUpdatedBy,
                 DeletedOn     = item.DeletedOn,
                 DeletedBy     = item.DeletedBy
             });
         }
     }
     return(this.ListOnlineDriveViewModel);
 }
Exemple #2
0
        // POST api/OnlineDrive
        /// <summary>
        /// Post a list of uploaded files for OnlineDrive Web Application System.
        /// </summary>
        /// <param name="model">The ArcanysSystem.Models.OnlineDriveViewModel model</param>
        public void Post(OnlineDriveViewModel model)
        {
            int affectedRows = 0;

            using (OnlineDriveProcess process = new OnlineDriveProcess())
            {
                affectedRows = process.Post(model.ToOnlineDrive());
            }
        }
Exemple #3
0
        // DELETE api/OnlineDrive/5
        /// <summary>
        /// Delete a list of uploaded files for OnlineDrive Web Application System.
        /// </summary>
        /// <param name="id">The id number of the uploaded file to get.</param>
        public void Delete(int id)
        {
            int affectedRows = 0;

            using (OnlineDriveProcess process = new OnlineDriveProcess())
            {
                affectedRows = process.Delete(id);
            }
        }