Ejemplo n.º 1
0
        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;
                }
            }
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
 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;
         }
     }
 }