void BtnGetDocClick(object sender, EventArgs e) { string db = GetSelectedDB(); if (db == "") { return; } DocIDForm f = new DocIDForm(); if (f.ShowDialog() == DialogResult.OK) { try { string doc = mDB.GetDocument(txtServer.Text, db, f.DocID); // This output really needs formatting, but for now we will just // replace the unix line breaks with windows ones... doc = doc.Replace("\n", "\r\n"); ResultForm f2 = new ResultForm(doc); f2.Show(); } catch (Exception ex) { StatusBar.Items[0].Text = ex.Message; } } }
void BtnDeleteDocClick(object sender, EventArgs e) { string db = GetSelectedDB(); if (db == "") { return; } DocIDForm f = new DocIDForm(); if (f.ShowDialog() == DialogResult.OK) { try { mDB.DeleteDocument(txtServer.Text, db, f.DocID); StatusBar.Items[0].Text = "Document deleted"; } catch (Exception ex) { StatusBar.Items[0].Text = ex.Message; } } UpdateDocCount(); }
void BtnDeleteDocClick(object sender, EventArgs e) { string db=GetSelectedDB(); if(db=="") return; DocIDForm f=new DocIDForm(); if(f.ShowDialog()==DialogResult.OK) { try { mDB.DeleteDocument(txtServer.Text,db,f.DocID); StatusBar.Items[0].Text="Document deleted"; } catch(Exception ex) { StatusBar.Items[0].Text=ex.Message; } } UpdateDocCount(); }
void BtnGetDocClick(object sender, EventArgs e) { string db=GetSelectedDB(); if(db=="") return; DocIDForm f=new DocIDForm(); if(f.ShowDialog()==DialogResult.OK) { try { string doc=mDB.GetDocument(txtServer.Text,db,f.DocID); // This output really needs formatting, but for now we will just // replace the unix line breaks with windows ones... doc=doc.Replace("\n","\r\n"); ResultForm f2=new ResultForm(doc); f2.Show(); } catch(Exception ex) { StatusBar.Items[0].Text=ex.Message; } } }