private void treeCellButton_Clicked(object sender, GridCellButtonClickedEventArgs e)
 {
     if (e.ColIndex == TREECOLUMN)
     {
         if (GetNode(e.RowIndex).IsExpanded)
         {
             CollapseNode(e.RowIndex, true);
         }
         else
         {
             ExpandNode(e.RowIndex, true, true, true);
         }
         //tell base class not to process
         e.Cancel = true;
     }
 }
Exemple #2
0
        /// <summary>
        /// Display the folder browser dialog.
        /// </summary>
        private void gridControl1_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
        {
            GridRangeInfo rg = GridRangeInfo.Cell(e.RowIndex, e.ColIndex);

            if (e.ColIndex == 7)
            {
                MessageBox.Show("Clicked button at " + rg.ToString());
            }
            if (e.ColIndex == 8)
            {
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                {
                    string file = openFileDialog1.FileName;
                    try
                    {
                        setFile(file);
                    }
                    catch (IOException)
                    {
                    }
                }
            }
            if (e.ColIndex == 6)
            {
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                {
                    string file = openFileDialog1.FileName;
                    try
                    {
                        MessageBox.Show("File is selected");
                    }
                    catch (IOException)
                    {
                    }
                }
            }
            if (e.ColIndex == 4 && e.RowIndex == 6)
            {
                MessageBox.Show("Clicked Button: " + e.Button.Text + "\nRow Index: " + e.RowIndex + "\nColumn Index: " + e.ColIndex, "Click Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void gridFaxList_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
        {
            DialogResult result;

            result = MessageBox.Show("Are you sure you want to delete this document",
                "Delete?", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
            if (result == DialogResult.Yes)
            {
                string _fullPath = string.Empty;
                File.Delete(gridFaxList[e.RowIndex, 4].Text);
                gridFaxList =
                    _gridHelper.InitializeAndPopulateFaxList(gridFaxList);
            }
        }
Exemple #4
0
 private void grid_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
 {
     TraceUtil.TraceCurrentMethodInfoIf(traceDebug, this, e);
     AppendOutput("CellButtonClicked", e);
 }
        private void gridProcessing_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
        {
            gridProcessing.ConfirmChanges();
            _currentRowIndex = e.RowIndex;
            string _uniqueName = Common.GetFileNameFromDateTimeString();
            //Fax will be viewed
            if (e.ColIndex == 2)
            {
                try
                {

                    System.Diagnostics.Process.Start(Common.StoreComputer + Common.StoreShare
                       + "process\\" + gridProcessing[e.RowIndex, 9].Text + ".pdf");                    
                    /*
                    Stream _fileStream = null;

                    _memoryStream = new MemoryStream();

                    _fileStream = new FileStream(Common.StoreComputer + Common.StoreShare
                       + "process\\" + gridProcessing[e.RowIndex, 9].Text + ".pdf", FileMode.Open);

                    _memoryStream.SetLength(_fileStream.Length);
                    _fileStream.Read(_memoryStream.GetBuffer(), 0, (int)_fileStream.Length);

                    _fileStream.Close();

                    pdfDocument2.Load(_memoryStream);

                    pdfPageView2.Visible = true;
                     */

                }
                catch (Exception er)
                {
                    MessageBox.Show(er.Message,
                      "Errors", MessageBoxButtons.OK,
                      MessageBoxIcon.Exclamation);
                }
            }
            //Fax will be deleted?
            else if (e.ColIndex == 3)
            {
                try
                {
                    DialogResult result;

                    result = MessageBox.Show("Are you sure you want to delete this document",
                        "Delete?", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);

                    if (result == DialogResult.Yes)
                    {

                        try
                        {
                            DatabaseCalls.DeleteFromProcessIncoming(gridProcessing[e.RowIndex, 11].Text);
                            gridProcessing = _gridHelper.InitializeAndPopulateProcessGrid(
                                gridProcessing, _faxing, "Y");
                        }
                        catch { }
                    }
                }
                catch (System.AccessViolationException av)
                {
                    Common.Log(av.Message);
                }
                catch (Exception er)
                {
                    MessageBox.Show(er.Message,
                      "Errors", MessageBoxButtons.OK,
                      MessageBoxIcon.Exclamation);
                }
            }
            else if (e.ColIndex == 5)
            {
                //This code has been moved from below
                //It should be processed first. 
                /*
                if (comboToPage2.Text.Length > 0)
                {
                    //Here is where we put the code in to made split up the document
                    int _deleteTo = int.Parse(comboToPage2.Text);
                    int _deleteAfter = _deleteTo + 1;

                    File.Copy(_reviewFaxPath, Common.StoreComputer
                        + Common.StoreShare + "process\\" + _uniqueName + ".pdf", true);

                    Pdf.DeleteMultiplePDFPages(_reviewFaxPath, _deleteAfter);
                    Pdf.DeleteMultiplePDFPages(Common.StoreComputer
                        + Common.StoreShare + "process\\" + _uniqueName + ".pdf", 1, _deleteTo);

                    ProcessList.InsertSplitFaxIncoming(_uniqueName, Common.StoreComputer
                        + Common.StoreShare + "process\\" + _uniqueName + ".pdf");
                }
                */
                //If bookmark checkbox has been checked
                //Then set bookmark flag to Y
                /*
                if (cbAddBookmark.Checked)
                {
                    _processDocuments.Bookmark = "Y";
                }

                if (_addToExistingChartID > 0)
                {
                    _processDocuments =
                        ProcessDocuments.GetProcessDocument(
                        gridProcessing[e.RowIndex, 11].Text);

                    _scanningP =
                        ScanningP.GetScannedDocument
                        (_addToExistingChartID.ToString());

                    _processDocuments.ProcessPatientID = _scanningP.ScanPatientID;
                    _processDocuments.ProcessProviderID = _scanningP.ProviderID;
                    _processDocuments.ProcessTabID = _scanningP.ScanTabID;
                    //_processDocuments.ProcessTabName = _scanningP.ScanPatientID;
                    _processDocuments.ProcessPatientName = _scanningP.PatientName;
                    _processDocuments.ProcessProviderName = _scanningP.ProviderName;
                    _processDocuments.ProcessTabDescription = _scanningP.ScanTabDescription;
                    _processDocuments.AddToExistingDocumentID = _addToExistingChartID;

                    _processDocuments.ProcessID =
                        int.Parse(gridProcessing[e.RowIndex, 11].Text);

                    if (gridProcessing[e.RowIndex, 4].Text.Length > 0)
                    {
                        ProcessList.UpdateProcessIncoming(gridProcessing[e.RowIndex, 4].Text,
                            gridProcessing[e.RowIndex, 11].Text);
                        //gridProcessing = _gridHelper.InitializeAndPopulateProcessGrid(
                        //    gridProcessing, _faxing);
                        buttonPrint.Enabled = false;
                    }
                    _processDocuments.Save(true);

                    ResetProcessList();

                    txtScanDescription.Text = string.Empty;
                    txtScanDescription.Enabled = true;
                    checkTabDesc2.Enabled = true;
                    comboProvider.Enabled = true;
                    comboTabs.Enabled = true;
                    txtPatient.Enabled = true;
                    dateDateOFService.Enabled = true;

                    comboScannedDocs.DataBindings.Clear();
                    comboScannedDocs.DataSource = null;

                    txtPatient.Text = string.Empty;

                    _addToExistingChartID = 0;

                    //Add to existing document code
                    //stops here
                    return;
                }
                */
                /*
                if (txtPatientChartID.Text.Length > 0)
                {

                    try
                    {
                        if (_processDocuments.BrokenRulesCollection.Count > 0)
                        {
                            MessageBox.Show(_processDocuments.GetBrokenRuleText(),
                              "Edits", MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation);
                            return;
                        }
                    }
                    catch (Csla.Validation.ValidationException ex)
                    {
                        MessageBox.Show(ex.Message,
                          "Error saving", MessageBoxButtons.OK,
                          MessageBoxIcon.Exclamation);
                    }
                    _processDocuments.ProcessDocumentDOS
                        = dateDateOFService.Value.ToShortDateString();
                    _processDocuments.ProcessID =
                        int.Parse(gridProcessing[e.RowIndex, 11].Text);
                    _processDocuments.Save(true);

                }
                if (gridProcessing[e.RowIndex, 4].Text.Length > 0)
                {
                    ProcessList.UpdateProcessIncoming(gridProcessing[e.RowIndex, 4].Text,
                        gridProcessing[e.RowIndex, 11].Text);
                    //gridProcessing = _gridHelper.InitializeAndPopulateProcessGrid(
                    //    gridProcessing, _faxing);
                    buttonPrint.Enabled = false;
                }
                ResetProcessList();

                txtPatient.Text = string.Empty;
                 */
            }
            else if (e.ColIndex == 6)
            {

                if (gridProcessing[e.RowIndex, 8].Text.Length > 0)
                {
                    ProcessList.UpdateProcessIncoming(gridProcessing[e.RowIndex, 5].Text,
                        gridProcessing[e.RowIndex, 9].Text);

                    try
                    {
                        /*
                        if (comboActionList.SelectedItem.ToString() == "View All")
                        {
                            gridProcessing = _gridHelper.InitializeAndPopulateProcessGrid(
                                gridProcessing, _faxing, "Y");
                        }
                        else
                        {
                            gridProcessing = _gridHelper.InitializeAndPopulateProcessGridSpecificAction(
                                gridProcessing, _faxing, comboActionList.SelectedItem.ToString());
                        }
                         */
                    }
                    catch { }
                }
            }
            else if (e.ColIndex == 7)
            {
                if (gridProcessing[e.RowIndex, 6].Text == "None")
                {
                    MessageBox.Show("No patient has been selected",
                      "No Patient", MessageBoxButtons.OK,
                    MessageBoxIcon.Exclamation);
                    return;
                }
                else
                {
                    try
                    {
                    }
                    catch { }
                }
            }
            else if (e.ColIndex == 8)
            {
                string _tempPath = string.Empty;
                int _pageCount = 0;
                bool _bReturn = false;
                try
                {
                    //This will determine if a document has been selected
                    
                    //if (_documentSelected)
                   // {
                  //  }
                  //  else
                  //  {
                  //      MessageBox.Show("Please select document",
                  //         "No document", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                  //      return;
                  //  }

                    //_scanningP.ScanPath
                    //             = Common.ScanComputer + Common.ScanShare;

                    //_scanningP.ScanDateOfService
                    //    = dateDateOFService.Value.ToShortDateString();

                    //Create ProcessDocument Object to process record
                    //_processDocuments = ProcessDocuments.GetProcessDocument(
                    //    gridProcessing[e.RowIndex, 11].Text);

                    //if (_processDocuments.AddToExistingDocumentID > 0)
                    //{
                    //    AuditLists.InsertAuditRecord(_processDocuments.ProcessPatientID.ToString(),
                    //        Common.UserID.ToString(), "2", "Added record from scan and store tab");

                    //    _bReturn = Pdf.MergeTwoDocumentsNoDelition(_processDocuments.ProcessPath
                    //    , Common.StoreComputer + Common.StoreShare
                    //    + ScanningLists.GetScannedDocumentPath(
                    //    _processDocuments.AddToExistingDocumentID.ToString()));

                        //If bookmark checkbox has been checked
                    //    if (_processDocuments.Bookmark == "Y")
                    //    {
                    //        try
                            {
                     //           _bookmark.DocumentID =
                     //               _processDocuments.AddToExistingDocumentID;
                     //           _bookmark.PageNumber = 1;

                      //          if (_bookmark.BrokenRulesCollection.Count > 0)
                       //         {
                      //              MessageBox.Show(_bookmark.GetBrokenRuleText(),
                      //                "Edits", MessageBoxButtons.OK,
                      //                MessageBoxIcon.Exclamation);
                      //              return;
                      //          }
                      //      }
                      //      catch (Csla.Validation.ValidationException ex)
                      //      {
                      //          MessageBox.Show(ex.Message,
                      //            "Error saving", MessageBoxButtons.OK,
                      //            MessageBoxIcon.Exclamation);
                      //      }
                      //      _bookmark.Save();
                      //      _bookmark = null;
                      //      _bookmark = Bookmark.NewBookmark();
                            //ResetBookmarkTab();
                       // }
                     
                        //*********************************************

                        //This resets the review flag back to true
                        //This sets the patient id to the current patient
                        //in case there are multiple items to scan
                        //_scanningP = null;
                        //_scanningP = ScanningP.NewScanP();
                        //These values are set for the new Scanning object

                        //txtScanDescription.Enabled = true;
                        //checkTabDesc2.Enabled = true;
                        //comboProvider.Enabled = true;
                        //comboTabs.Enabled = true;
                        //txtPatient.Enabled = true;
                        //dateDateOFService.Enabled = true;
                        //comboScannedDocs.DataSource = null;
                        //comboScannedDocs.Text = string.Empty;

                        //if (cbKeepSettings1.Checked)
                        //{
                        //    _scanningP.ScanDateOfService = dateDateOFService.Value.ToShortDateString();
                            //_scanningP.ScanPatientID = (int)txtPatientChartID.Text;
                        //    _scanningP.ProviderID = (int)comboProvider.SelectedValue;
                        //    _scanningP.ScanTabID = (int)comboTabs.SelectedValue;

                        //    txtScanDescription.Text = GetFormatedDate(DateTime.Now);

                        //    _scanningP.ScanTabDescription = txtScanDescription.Text;

                            //txtScanDescription.Text = string.Empty;
                        //    txtPatient.Text = string.Empty;
                        //    txtPatientChartID.Text = string.Empty;
                            //comboTabs.Text = "";
                        //}
                        //else
                        //{
                        //    txtPatient.Text = string.Empty;
                        //    txtPatientChartID.Text = string.Empty;
                        //    comboProvider.Text = string.Empty;
                        //    comboProvider.SelectedIndex = 0;
                        //    comboTabs.Text = string.Empty;
                        //    comboTabs.SelectedIndex = 0;
                        //    comboScannedDocs.DataBindings.Clear();
                        //    comboScannedDocs.DataSource = null;
                        //    checkTabDesc2.Checked = false;
                        //    txtScanDescription.Text = string.Empty;
                        //    comboToPage2.Items.Clear();
                        //    comboToPage3.Items.Clear();
                        //    txtScanDescription.Text = string.Empty;
                        //    txtPatient.Text = string.Empty;
                        //    txtPatientChartID.Text = string.Empty;
                        //    comboTabs.Text = "";

                        //    txtScanDescription.Text = string.Empty;
                        //    _scanningP.ScanTabDescription = string.Empty;
                        //}

                        //_addToExistingChartID = 0;

                        //Common.UseReview = false;
                        //This deletes files from the temporary directory
                        //The code for this will be in the pdfPReview_Navigated event
                        DatabaseCalls.DeleteFromProcessIncoming(gridProcessing[1, 11].Text);

                        //ResetProcessList();

                        Cursor = Cursors.Default;
                        MessageBox.Show("Process Complete",
                        "Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                   // _scanningP.PatientName = _processDocuments.ProcessPatientName;
                   // _scanningP.ProviderName = _processDocuments.ProcessProviderName;
                   // _scanningP.TabName = _processDocuments.ProcessTabName;
                   // _scanningP.ScanTabDescription = _processDocuments.ProcessTabDescription;
                   // _scanningP.ScanPatientID = _processDocuments.ProcessPatientID;
                   // _scanningP.ProviderID = _processDocuments.ProcessProviderID;
                   // _scanningP.ScanTabID = _processDocuments.ProcessTabID;
                    //04/19/2010 this value is now stored in the table ProcessIncoming
                    //value is set below from that table
                   // _scanningP.ScanDateOfService = _processDocuments.ProcessDocumentDOS;

                    try
                    {
                        //if (_scanningP.BrokenRulesCollection.Count > 0)
                        //{
                        //    MessageBox.Show(_scanningP.GetBrokenRuleText(),
                        //      "Edits", MessageBoxButtons.OK,
                        //      MessageBoxIcon.Exclamation);
                        //    return;
                        //}
                    }
                    catch (Csla.Validation.ValidationException ex)
                    {
                        MessageBox.Show(ex.Message,
                          "Error saving", MessageBoxButtons.OK,
                          MessageBoxIcon.Exclamation);
                    }

                   // _pageCount = PageCount(_reviewFaxPath);

                    //Passed edit checks.  Ready to insert document
                    //Get unique name for document
                    _uniqueName = Common.GetFileNameFromDateTimeString();

                    //This string is the path of where the temporary PDF files are being
                    //held
                   // _scanningP.ScanPath = _scanningP.ScanPatientID.ToString() + "\\"
                   //     + _scanningP.GetSelectedFolderName(_scanningP.ScanTabID) + "\\"
                   //     + _uniqueName + ".pdf";

                    //Create folders that will hold patient records
                    //These folders will be created even if they already have been created
                    //This is done because a new folder might be added later in the process
                   // _scanningP.CreateFoldersForNewPatient(_scanningP.ScanPatientID.ToString());

                    /*
                    //User wants the page split
                    if (comboToPage2.Text.Length > 0)
                    {
                        int _deleteTo = int.Parse(comboToPage2.Text);
                        int _deleteAfter = _deleteTo + 1;

                        File.Copy(_reviewFaxPath, Common.StoreComputer
                            + Common.StoreShare + "process\\" + _uniqueName + ".pdf", true);

                        Pdf.DeleteMultiplePDFPages(_reviewFaxPath, _deleteAfter);
                        Pdf.DeleteMultiplePDFPages(Common.StoreComputer
                            + Common.StoreShare + "process\\" + _uniqueName + ".pdf", 1, _deleteTo);
                    }
                    */
                   // File.Copy(_reviewFaxPath, Common.StoreComputer
                   //     + Common.StoreShare + _scanningP.ScanPath, true);

                  //  AuditLists.InsertAuditRecord(_scanningP.ScanPatientID.ToString(),
                   //     Common.UserID.ToString(), "2", "Added record from scan and store tab");

                   // _scanningP.Save();

                    /*
                    //If bookmark checkbox has been checked
                    if (cbAddBookmark.Checked)
                    {
                        try
                        {
                            _bookmark.DocumentID = DatabaseCalls.GetMaxDocumentID();
                            _bookmark.PageNumber = 1;

                            if (_bookmark.BrokenRulesCollection.Count > 0)
                            {
                                MessageBox.Show(_bookmark.GetBrokenRuleText(),
                                  "Edits", MessageBoxButtons.OK,
                                  MessageBoxIcon.Exclamation);
                                return;
                            }
                        }
                        catch (Csla.Validation.ValidationException ex)
                        {
                            MessageBox.Show(ex.Message,
                              "Error saving", MessageBoxButtons.OK,
                              MessageBoxIcon.Exclamation);
                        }
                        _bookmark.Save();
                        _bookmark = null;
                        _bookmark = Bookmark.NewBookmark();
                        //ResetBookmarkTab();
                    }
                    //*********************************************
                    */
                    //_scanningP = null;
                    //_scanningP = ScanningP.NewScanP();
                    /*
                    if (comboToPage2.Text.Length > 0)
                    {

                        File.Copy(Common.StoreComputer
                                + Common.StoreShare + "process\\" + _uniqueName + ".pdf", _reviewFaxPath, true);

                        if (int.Parse(comboToPage2.Text) == _pageCount)
                        {
                            DatabaseCalls.DeleteFromProcessIncoming(gridProcessing[1, 11].Text);
                        }
                    }
                    else
                    {
                        DatabaseCalls.DeleteFromProcessIncoming(gridProcessing[1, 11].Text);
                    }
                    */
                    //ResetScanning();
                    //ResetProcessList();
                    MessageBox.Show("Process Complete",
                    "Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (System.AccessViolationException av)
                {
                    Common.Log(av.Message);
                }
                catch (Exception er)
                {
                    Common.Log(er.Message);
                    Cursor = Cursors.Default;
                }
            }
        }
        private void gridSendTo_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
        {
            try
            {
                gridSendTo.ConfirmChanges();

                if (e.ColIndex == 1)
                {
                    //try
                    //{
                }
                else if (e.ColIndex == 4)
                {
                    try
                    {
                        FaxLists.UpdateSendToNumber(gridSendTo[e.RowIndex, 6].Text,
                            gridSendTo[e.RowIndex, 1].Text, 
                            gridSendTo[e.RowIndex, 2].Text,
                            gridSendTo[e.RowIndex, 3].Text);
                        GetSendTo();
                        PopulateToNames();
                    }
                    catch { }
                }
                else if (e.ColIndex == 5)
                {
                    try
                    {
                        FaxLists.RemoveSendToNumber(gridSendTo[e.RowIndex, 6].Text);
                        GetSendTo();
                    }
                    catch { }
                }
            }
            catch { }

        }
 private void gridSendFax_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
 {
     gridSendFax.Rows.RemoveRange(e.RowIndex, e.RowIndex);
 }
        private void gridMonitorFaxes_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
        {
            if (e.ColIndex == 1)
            {
                try
                {
                    _reports = Reports.NewReports(_CONFIRMATIONREPORT);
                    StringCollection _confirmation = new StringCollection();

                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 0].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 1].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 2].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 3].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 4].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 5].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 6].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex,7].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 12].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 8].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 9].Text);
                    _confirmation.Add(gridMonitorFaxes[e.RowIndex, 10].Text);

                    _reports.FaxConfirmation = _confirmation;
                    frmReports _frmReports = new frmReports(_reports);
                    _frmReports.Show();
                }
                catch (Exception er)
                {
                    Common.Log(er.Message);
                }
            }
            else if (e.ColIndex == 10)
            {
                DatabaseCalls.UpdateFaxMonitoringV2(
                    gridMonitorFaxes[e.RowIndex, 12].Text);

                gridMonitorFaxes = _gridHelper.InitializeAndPopulateFaxMonitoringV2(
                    gridMonitorFaxes);
            }
            else if (e.ColIndex == 11)
            {
                //We need 4 items to send a fax:
                //1.  Fax Display Name
                //2.  The file that will be sent.
                //3.  The fax number 
                //4.  The fax Recipient Name            _faxing.RecipientName = "MF";

                
                label6.Visible = true;
                txtResend.Visible = true;
                butResend.Visible = true;
                buttonCancel.Visible = true;   
                
                
                InitiateFaxingClass();

                StringCollection _reFax = _faxing
                    .GetReFaxingInformation(
                    gridMonitorFaxes[e.RowIndex, 12].Text);

                _faxing.DisplayName = _reFax[0];

                _faxing.FaxPath = _reFax[1];
                _faxing.FaxNumber = _reFax[3];
                try
                {
                    _faxing.Notes = _reFax[4];
                }
                catch { }

                txtResend.Text = _faxing.FaxNumber;

                _fileStream = new FileStream(_faxing.FaxPath, FileMode.Open);
                pdfDocument1.Load(_fileStream);
                pdfPageView1.Visible = true;
                //_fileStream.Close();

                //pdfDocument1.Load(_faxing.FaxPath);
                //pdfPageView1.Visible = true;
            }
            else if (e.ColIndex == 13)
            {
                InitiateFaxingClass();

                StringCollection _reFax = _faxing
                    .GetReFaxingInformation(
                    gridMonitorFaxes[e.RowIndex, 12].Text);

                try
                {
                    System.Diagnostics.Process.Start(_reFax[1]);
                }
                catch (Exception er)
                {
                    MessageBox.Show("OpenFax in PDF: " + er.Message);
                }
            }
         }
        private void gridOutlookList_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
        {
            bool _check = false;

            if (e.ColIndex == 1)
            {
                _check = CheckToSeeIfPhoneNumberAlreadyExists(gridOutlookList[e.RowIndex, 4].Text);
            }
            else if (e.ColIndex == 2)
            {
                _check = CheckToSeeIfPhoneNumberAlreadyExists(gridOutlookList[e.RowIndex, 5].Text);
            }

            if (_check)
            {
                return;
            }
            else
            {
                if (e.ColIndex == 2)
                {
                    gridSendFax.RowCount = gridSendFax.RowCount + 1;

                    gridSendFax[gridSendFax.RowCount, 1].Description = "Del";
                    gridSendFax[gridSendFax.RowCount, 1].CellType = "PushButton";
                    gridSendFax[gridSendFax.RowCount, 1].CellAppearance = Syncfusion.Windows.Forms.Grid.GridCellAppearance.Raised;
                    gridSendFax[gridSendFax.RowCount, 2].Text = gridOutlookList[e.RowIndex, 1].Text;
                    gridSendFax[gridSendFax.RowCount, 3].Text = gridOutlookList[e.RowIndex, 2].Description;

                    _faxing.FaxNumber = gridOutlookList[e.RowIndex, 1].Text; 
                    _faxing.RecipientName = gridOutlookList[e.RowIndex, 2].Description;  
                    
                    comboFaxName.Text = string.Empty;
                    txtFaxNumber1.Text = string.Empty;

                }
                else if (e.ColIndex == 3)
                {

                    gridSendFax.RowCount = gridSendFax.RowCount + 1;

                    gridSendFax[gridSendFax.RowCount, 1].Description = "Del";
                    gridSendFax[gridSendFax.RowCount, 1].CellType = "PushButton";
                    gridSendFax[gridSendFax.RowCount, 1].CellAppearance = Syncfusion.Windows.Forms.Grid.GridCellAppearance.Raised;
                    gridSendFax[gridSendFax.RowCount, 2].Text = gridOutlookList[e.RowIndex, 1].Text;
                    gridSendFax[gridSendFax.RowCount, 3].Text = gridOutlookList[e.RowIndex, 3].Description;

                    _faxing.FaxNumber = gridOutlookList[e.RowIndex, 1].Text;
                    _faxing.RecipientName = gridOutlookList[e.RowIndex, 3].Description;  

                    comboFaxName.Text = string.Empty;
                    txtFaxNumber1.Text = string.Empty;
                }
            }
        }