コード例 #1
0
ファイル: dlgClientConfig.cs プロジェクト: jpheary/Argix08
 private void OnGridBeforeRowsDeleted(object sender, BeforeRowsDeletedEventArgs e)
 {
     //Event hanlder for rows deleting
     try {
         //Cannot delete 'Default' entries or the new row entry
         e.DisplayPromptMsg = true;
         if (!e.Cancel)
         {
             string clid    = e.Rows[0].Cells["CLID"].Value.ToString();
             string format  = e.Rows[0].Cells["ExportFormat"].Value.ToString();
             string path    = e.Rows[0].Cells["ExportPath"].Value.ToString();
             string key     = e.Rows[0].Cells["CounterKey"].Value.ToString();
             string client  = e.Rows[0].Cells["Client"].Value.ToString();
             string scanner = e.Rows[0].Cells["Scanner"].Value.ToString();
             string userid  = e.Rows[0].Cells["UserID"].Value.ToString();
             bool   deleted = EnterpriseFactory.DeleteClient(clid, format, path, key, client, scanner, userid);
             OnRefresh(this.btnRefresh, EventArgs.Empty);
         }
     }
     catch (Exception ex) { App.ReportError(ex); }
 }