コード例 #1
0
        /// <summary>
        /// Load filings details for givin envelope id
        /// </summary>
        /// <param name="envelopeId"></param>
        private void LoadFilings(string envelopeId)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                LogManager.Trace(String.Format("Envelope Details : Listing filings for Envelope {0} started.", envelopeId));

                dynamic lstFilings = EnvelopeBL.GetEnvelopeDetails(envelopeId);
                lblFiling.Visible = dgFilings.Visible = pnlEnvDetails.Visible = false;
                dgFilings.Rows.Clear();
                foreach (var filing in lstFilings)
                {
                    DataGridViewRow dr = new DataGridViewRow();
                    dr.Height = 30;
                    dr.CreateCells(dgFilings);

                    dr.Cells[2].Value = filing["filing_description"].ToString();
                    dr.Cells[3].Value = filing["status"].ToString();
                    dr.Cells[4].Value = filing["id"].ToString();
                    dgFilings.Rows.Add(dr);
                    lblFiling.Visible = pnlEnvDetails.Visible = dgFilings.Visible = true;
                }
                dgFilings.Refresh();
                LogManager.Trace(String.Format("Envelope Details : Listing fillings for envelope {0} completed ", envelopeId));

                this.Cursor = Cursors.Default;
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #2
0
        private void dgEnvelope_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex == -1)
                {
                    return;
                }

                int selectedIndex = dgEnvelope.CurrentCell.RowIndex;
                int colIndex      = dgEnvelope.CurrentCell.ColumnIndex;
                //Get envelop id to download
                if (selectedIndex > -1 && selectedIndex < dgEnvelope.Rows.Count && colIndex == 0)
                {
                    //     Get envelope Id
                    string envelopeId = Convert.ToString(dgEnvelope.Rows[selectedIndex].Cells[2].Value);

                    if (String.IsNullOrEmpty(Properties.Settings.Default.DefaultOutpuLocation) ||
                        !Directory.Exists(Properties.Settings.Default.DefaultOutpuLocation))
                    {
                        MessageBox.Show("Default download/ouput location is empty or not valid in settings.", "Validate", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    this.Cursor = Cursors.WaitCursor;
                    LogManager.Trace(String.Format("Envelope Details : Download envelope for id {0} started.", envelopeId));

                    if (EnvelopeBL.DownloadEnvelope(envelopeId, Properties.Settings.Default.DefaultOutpuLocation))
                    {
                        this.Cursor = Cursors.Default;
                        MessageBox.Show("Envelope download completed.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    LogManager.Trace(String.Format("Envelope Details : Download envelope for id {0} completed.", envelopeId));
                }
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                LogManager.LogError(ex);
            }
        }
コード例 #3
0
        private void frmEnvelope_Load(object sender, EventArgs e)
        {
            try
            {
                lblBatchId.Text = BatchId;

                LogManager.Trace(String.Format("Envelope Details : Listing Envelopes for batch {0} started.", BatchId));

                dynamic envelopedetails = EnvelopeBL.GetEnvelopes(BatchId);

                dynamic item = envelopedetails["item"];

                lblBatchName.Text = item["batch_name"];
                string   created_date  = item["created_date"];
                DateTime convertedDate = DateTime.Parse(created_date);
                lblCreatedDate.Text = TimeZone.CurrentTimeZone.ToLocalTime(convertedDate).ToString();

                dynamic envelopes = item["envelopes"];

                if (envelopes != null && AppConstants.LoginState == "MD")
                {
                    courtInfoGrp.Visible = true;
                }


                if (item.ContainsKey("court_hearing_scheduled_start_date"))
                {
                    string court_hearing_scheduled_start_date = item["court_hearing_scheduled_start_date"];
                    convertedDate             = DateTime.Parse(court_hearing_scheduled_start_date);
                    lblCourtHearingStart.Text = TimeZone.CurrentTimeZone.ToLocalTime(convertedDate).ToString();

                    string court_hearing_scheduled_end_date = item["court_hearing_scheduled_end_date"];
                    convertedDate           = DateTime.Parse(court_hearing_scheduled_end_date);
                    lblCourtHearingEnd.Text = TimeZone.CurrentTimeZone.ToLocalTime(convertedDate).ToString();

                    lblCourtRoom.Text    = item["court_room"];
                    lblCourtAddress.Text = item["court_city_state_zip"];
                }


                dgEnvelope.Visible = false;
                dgEnvelope.Rows.Clear();
                foreach (dynamic envelope in envelopes)
                {
                    DataGridViewRow dr = new DataGridViewRow();
                    dr.Height = 30;
                    dr.CreateCells(dgEnvelope);

                    dr.Cells[1].Value = envelope["reference_id"];
                    dr.Cells[2].Value = envelope["envelope_id"];
                    if (envelope.ContainsKey("case_number"))
                    {
                        dr.Cells[3].Value = envelope["case_number"];
                    }
                    if (envelope.ContainsKey("envelope_status"))
                    {
                        dr.Cells[4].Value = envelope["envelope_status"];
                    }
                    if (envelope.ContainsKey("total_fees"))
                    {
                        dr.Cells[5].Value = envelope["total_fees"];
                    }

                    dgEnvelope.Rows.Add(dr);
                }
                dgEnvelope.Refresh();
                if (dgEnvelope.Rows.Count >= 1)
                {
                    dgEnvelope.Visible = true; dgEnvelope.Rows[0].Selected = true;
                }
                else
                {
                    refreshEnvelope.Enabled = false;
                }
                LogManager.Trace(String.Format("Envelope Details: Listing envelopes for batch {0} completed ", BatchId));
            }
            catch (Exception ex)
            { LogManager.LogError(ex); }
        }