private void UpdateEntity() { try { if (grdFiles.SelectedRows.Count == 0) { MessageBox.Show("Dosya Seçiniz."); return; } int fileId = grdFiles.SelectedRows[0].Cells["Id"].Value.ToInt(); if (fileId < 1) { MessageBox.Show("Geçersiz Dosya!.."); return; } int userId = grdFiles.SelectedRows[0].Cells["CreatedBy"].Value.ToInt(); if (userId != AppVariables.UserId) { MessageBox.Show("Dosyayı sadece yükleyen güncelleyebilir."); return; } FrmFile frmFl = new FrmFile(fileId); frmFl.SaveEvent += this.UpdateListRemote; frmFl.ShowDialog(); } catch (Exception ex) { LogManager.LogException(ex, AppVariables.UserId, "FrmFileList", "Update"); } }
private void Add() { FrmFile frmFl = new FrmFile(); frmFl.SaveEvent += this.UpdateListRemote; frmFl.ShowDialog(); }