private void EditDocument(DocItemView obj) { if (obj != null) { DialogHelper.ShowEditItemDialog(obj.Id); } }
void OpenDocument(DocItemView itemView) { DocItem item = null; using (var db = new AppDataBase()) { item = (from i in db.Items where i.DocItemId == itemView.Id select i).First(); } if (item != null) { if (Storage.Default.IsFileExist(item) == false) { string fileName = Storage.Default.GetFullPath(item); WindowAsyncOperation.RunAsync(Properties.Resources.MsgDownload, (ReportProgress progress) => { WebDownload d = new WebDownload(item.Uri, progress); d.Save(fileName); }); } Storage.Default.OpenFile(item); } }
private void ChangeRateImpl(DocItemView obj) { if (obj != null) { using(var db = new AppDataBase()) { var item = (from i in db.Items where i.DocItemId == obj.Id select i).Single(); item.Rating = obj.Rating; db.SaveChanges(); } } }