Exemple #1
0
        public static JsonFile UpdateJsonFile(long id = 0L, string filename = "")
        {
            JsonFile file = new JsonFile();

            using (JsonStoreDataContext db = new JsonStoreDataContext())
            {
                tbl_JsonFile jfile = (from pp in db.tbl_JsonFiles where id.Equals(0) || pp.ID.Equals(id) select pp).FirstOrDefault();
                jfile.LastUpdateTime = DateTime.Now;
                file = file.Map(jfile);
                db.SubmitChanges();
            }
            return(file);
        }
Exemple #2
0
 private JsonFile Map(tbl_JsonFile jfile)
 {
     if (jfile == null)
     {
         return(null);
     }
     this.ID             = jfile.ID;
     this.Name           = jfile.Name;
     this.CreationTime   = Convert.ToDateTime(jfile.CreationTime);
     this.LastUpdateTime = Convert.ToDateTime(jfile.LastUpdateTime);
     this.Path           = jfile.Path;
     this.Description    = jfile.Description;
     this.Active         = Convert.ToBoolean(jfile.Active);
     this.BackupOf       = Convert.ToInt64(jfile.BackupOf);
     this.UserRoleID     = Convert.ToInt64(jfile.UserRoleID);
     return(this);
 }
Exemple #3
0
 partial void Updatetbl_JsonFile(tbl_JsonFile instance);
Exemple #4
0
 partial void Deletetbl_JsonFile(tbl_JsonFile instance);
Exemple #5
0
 partial void Inserttbl_JsonFile(tbl_JsonFile instance);