private void btnAttachFile_Click(object sender, EventArgs e) { var manager = FileBlobManager.Create(this.Manager.CreationInfo); if (XF_FileBlobNewEdit.F_Show(manager) == DialogResult.Yes) { this.Manager.RefreshFileList(); } }
void gridViewFiles_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { FileBlobViewModel mod = gridViewFiles.GetRow(e.RowHandle) as FileBlobViewModel; if (mod == null) { return; } if (e.Clicks == 2 || e.Column.Name == col_Preview.Name) { var res = this.Manager.PreviewFile(mod); if (res.Failed) { Mess.Error(res.Message); } } else if (e.Column.Name == col_Delete.Name) { if (Mess.Question("Are you sure you want to delete this file?") == DialogResult.Yes) { var res = this.Manager.DeleteFile(mod); if (res.Failed) { Mess.Error(res.Message); } else { this.Manager.RefreshFileList(); } } } else if (e.Column.Name == col_Edit.Name) { if (XF_FileBlobNewEdit.F_ShowEdit(mod.BlobID) == DialogResult.Yes) { this.Manager.RefreshFileList(); } } }
public static DialogResult F_Show(IFileBlobManager manager) { using (XF_FileBlobNewEdit form = new XF_FileBlobNewEdit(manager)) return form.ShowDialog(); }
public static DialogResult F_Show(IFileBlobManager manager) { using (XF_FileBlobNewEdit form = new XF_FileBlobNewEdit(manager)) return(form.ShowDialog()); }