コード例 #1
0
ファイル: F9008.cs プロジェクト: CSSAdmin/TScan
        public void PreviewButtonClick(object sender, DataEventArgs <Button> e)
        {
            try
            {
                TerraScanCommon.SetDataGridViewPosition(this.ReportDetailsDataGridView, this.selectedRow);

                this.Cursor = Cursors.WaitCursor;

                //// Calling the Common Function for Report
                Hashtable ht = new Hashtable();
                ht.Add("UserId", this.userId);
                if (this.ReportDetailsDataGridView.SelectedRows.Count > 0)
                {
                    ////TerraScanCommon.ShowReport(Convert.ToInt32(this.ReportDetailsDataGridView.SelectedRows[0].Cells[0].Value), TerraScan.Common.Reports.Report.ReportType.Preview);
                    TerraScanCommon.ShowReport(900801, TerraScan.Common.Reports.Report.ReportType.Preview, ht);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #2
0
ファイル: F29530.cs プロジェクト: CSSAdmin/TScan
        public void OnD9030_F9030_SetSlicePermission(object sender, DataEventArgs <SlicePermissionReload> eventArgs)
        {
            try
            {
                if (this.masterFormNo == eventArgs.Data.MasterFormNo)
                {
                    this.slicePermissionField.deletePermission = this.PermissionFiled.deletePermission;
                    this.slicePermissionField.editPermission   = this.PermissionFiled.editPermission;
                    this.slicePermissionField.newPermission    = this.PermissionFiled.newPermission;
                    this.slicePermissionField.openPermission   = this.PermissionFiled.openPermission;
                }

                if (this.associationEventCount > 0)
                {
                    // this.AssociationEventsGridView.Rows[0].Selected = true;
                    TerraScanCommon.SetDataGridViewPosition(this.AssociationEventsGridView, 0);
                }
            }
            catch (SoapException ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
コード例 #3
0
ファイル: F1224.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the DataBindingComplete event of the UnPrintedChecksDataGridView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewBindingCompleteEventArgs"/> instance containing the event data.</param>
 private void UnPrintedChecksDataGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
 {
     if (this.UnPrintedChecksDataGridView.OriginalRowCount == 0)
     {
         this.UnPrintedChecksDataGridView.CurrentCell = null;
     }
     else
     {
         TerraScanCommon.SetDataGridViewPosition(this.UnPrintedChecksDataGridView, 0);
     }
 }
コード例 #4
0
ファイル: F9008.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the RowLeave event of the ReportDetailsDataGridView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
 private void ReportDetailsDataGridView_RowLeave(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         TerraScanCommon.SetDataGridViewPosition(this.ReportDetailsDataGridView, this.selectedRow);
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #5
0
ファイル: F36012.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Handles the CellValueChanged event of the MISelectionGridView control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
        private void MISelectionGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (this.edit)
                {
                    this.edit = false;

                    this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.FieldNumColumn.ColumnName].Value   = Convert.ToByte(this.fieldNum);
                    this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.MICodeIDColumn.ColumnName].Value   = this.miscCodeId;
                    this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.IsCommitedColumn.ColumnName].Value = false;

                    if (string.IsNullOrEmpty(this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.MIChoiceIDColumn.ColumnName].Value.ToString()))
                    {
                        this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.MIChoiceIDColumn.ColumnName].Value = 0;
                    }

                    if (string.IsNullOrEmpty(this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.ItemValueColumn.ColumnName].Value.ToString()))
                    {
                        this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.ItemValueColumn.ColumnName].Value = 0;
                    }
                    else
                    {
                        decimal outDecimal;
                        decimal maxItemValue = 9999999999999999.99M;
                        decimal.TryParse(this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.ItemValueColumn.ColumnName].Value.ToString(), out outDecimal);
                        if (outDecimal > maxItemValue)
                        {
                            MessageBox.Show(SharedFunctions.GetResourceString("F36012_MaxValue"), SharedFunctions.GetResourceString("Log"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                            this.MISelectionGridView.Rows[e.RowIndex].Cells[this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.ItemValueColumn.ColumnName].Value = 0;
                        }
                    }

                    if (this.MISelectionGridView.OriginalRowCount >= this.MISelectionGridView.NumRowsVisible)
                    {
                        if (!Convert.ToBoolean(this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows.Count - 1][this.MISelectionGridView.EmptyRecordColumnName]))
                        {
                            this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows.Add(this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.NewRow());
                            this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows.Count - 1][this.MISelectionGridView.EmptyRecordColumnName] = true;
                            this.MISelectionGridVerticalScroll.Visible = false;
                            TerraScanCommon.SetDataGridViewPosition(this.MISelectionGridView, e.RowIndex + 1);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
        }
コード例 #6
0
ファイル: F9612.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the KeyUp event of the RecordHistoryGridView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param>
 private void RecordHistoryGridView_KeyUp(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyValue.Equals(13))
         {
             if (this.RecordHistoryGridView.CurrentRowIndex > -1)
             {
                 this.FormMaster_FormVisibility(false);
                 this.ShowSliceForm(this.RecordHistoryGridView.CurrentRowIndex);
             }
         }
         else if (e.KeyValue.Equals(35))
         {
             if (this.RecordHistoryGridView.OriginalRowCount > 0)
             {
                 this.RecordHistoryGridView.ClearSelection();
                 //this.RecordHistoryGridView.Rows[this.RecordHistoryGridView.OriginalRowCount - 1].Selected = true;
                 TerraScanCommon.SetDataGridViewPosition(this.RecordHistoryGridView, this.RecordHistoryGridView.OriginalRowCount - 1);
             }
         }
         else if (e.KeyValue.Equals(36))
         {
             if (this.RecordHistoryGridView.OriginalRowCount > 0)
             {
                 this.RecordHistoryGridView.ClearSelection();
                 TerraScanCommon.SetDataGridViewPosition(this.RecordHistoryGridView, 0);
             }
         }
     }
     catch (SoapException ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
     finally
     {
         if (e.KeyValue.Equals(13))
         {
             if (this.RecordHistoryGridView.CurrentRowIndex > -1)
             {
                 this.FormMaster_FormVisibility(true);
             }
         }
     }
 }
コード例 #7
0
ファイル: F9008.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the ItemClicked event of the PrinterContextMenuStrip control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.ToolStripItemClickedEventArgs"/> instance containing the event data.</param>
 private void PrinterContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     try
     {
         this.ReportDetailsDataGridView["Printer", this.selectedRow].Value = e.ClickedItem.Text;
         this.form9008ReportDetailsData.F9008GetReportDetails.Rows[this.selectedRow]["Printer"] = e.ClickedItem.Text;
         this.PrinterContextMenuStrip.Close();
         TerraScanCommon.SetDataGridViewPosition(this.ReportDetailsDataGridView, this.selectedRow);
         this.SetEditRecord();
         this.operationSmartPart.RetrieveCancelButton.Focus();
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #8
0
ファイル: F29530.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// LoadAssociationEventGrid()
        /// </summary>
        private void LoadAssociationEventGrid()
        {
            this.eventData.ListEventAssociationTable.Clear();
            this.eventData             = this.form29530Control.WorkItem.F29530_FillAssociationEventGrid(this.eventId);
            this.associationEventCount = this.eventData.ListEventAssociationTable.Rows.Count;
            if (this.associationEventCount > 0)
            {
                this.LinkText.DataPropertyName      = this.eventData.ListEventAssociationTable.LinkTextColumn.ColumnName;
                this.Description.DataPropertyName   = this.eventData.ListEventAssociationTable.DescriptionColumn.ColumnName;
                this.Form.DataPropertyName          = this.eventData.ListEventAssociationTable.FormColumn.ColumnName;
                this.Param1.DataPropertyName        = this.eventData.ListEventAssociationTable.Param1Column.ColumnName;
                this.Param2.DataPropertyName        = this.eventData.ListEventAssociationTable.Param2Column.ColumnName;
                this.Param3.DataPropertyName        = this.eventData.ListEventAssociationTable.Param3Column.ColumnName;
                this.AssociationID.DataPropertyName = this.eventData.ListEventAssociationTable.AssociationIDColumn.ColumnName;
                this.AssociationEventsGridView.AutoGenerateColumns = false;
                if (this.associationEventCount == 1)
                {
                    this.AssociationEventsGridView.NumRowsVisible = 1;

                    //// Coding added for the issue 4497.if we do Crtl+F and do some some searches then height
                    //// should not change.
                    if (this.AssociationEventsGridView.Height != 46)
                    {
                        this.AssociationEventsGridView.Height = this.AssociationEventsGridView.Height - 23;
                    }
                    this.CIDPanel.Height = this.AssociationEventsGridView.Height;
                    this.AssociationEventGridpictureBox.Height = this.AssociationEventsGridView.Height;
                    this.AssociationEventGridVscrollBar.Height = this.AssociationEventsGridView.Height;
                }

                this.AssociationEventsGridView.DataSource = this.eventData.ListEventAssociationTable;
                this.AssociationEventsGridView.Focus();
                this.AssociationEventsGridView.Rows[0].Selected = true;
                TerraScanCommon.SetDataGridViewPosition(this.AssociationEventsGridView, 0);

                if (this.eventData.ListEventAssociationTable.Rows.Count > this.AssociationEventsGridView.NumRowsVisible)
                {
                    this.AssociationEventGridVscrollBar.Visible = false;
                }
                else
                {
                    this.AssociationEventGridVscrollBar.Enabled = false;
                    this.AssociationEventGridVscrollBar.Visible = true;
                }
            }
        }
コード例 #9
0
ファイル: F15004.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the DataBindingComplete event of the DisbursementHistoryGridView control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewBindingCompleteEventArgs"/> instance containing the event data.</param>
 private void DisbursementHistoryGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
 {
     try
     {
         if (this.DisbursementHistoryGridView.OriginalRowCount == 0)
         {
             this.DisbursementHistoryGridView.CurrentCell = null;
         }
         else
         {
             TerraScanCommon.SetDataGridViewPosition(this.DisbursementHistoryGridView, 0);
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
     }
 }
コード例 #10
0
ファイル: F1224.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Populates the un printed checks grid.
        /// </summary>
        /// <param name="registerID">The register ID.</param>
        private void PopulateUnPrintedChecksGrid(int registerID)
        {
            try
            {
                this.numInGrid     = 0;
                this.bindingSource = new BindingSource();
                this.checkPrintQueueDataset.ListUnPrintedChecksTable.Clear();
                this.checkPrintQueueDataset.Merge(this.Form1224Controll.WorkItem.F1224_ListunPrintedChecks(registerID));
                this.NumInGrid = this.checkPrintQueueDataset.ListUnPrintedChecksTable.Rows.Count;
                this.AddCheckBoxColumn();
                this.UnPrintedChecksDataGridView.DataSource = this.checkPrintQueueDataset.ListUnPrintedChecksTable;
                this.bindingSource.DataSource = this.checkPrintQueueDataset.ListUnPrintedChecksTable.Copy();

                this.SetGridSummeries();
                if (this.NumInGrid > 0)
                {
                    this.UnPrintedChecksDataGridView.Enabled = true;
                    TerraScanCommon.SetDataGridViewPosition(this.UnPrintedChecksDataGridView, 0);
                    this.CheckPrintQueueAuditLink.Enabled = true;
                    this.CheckPrintQueueAuditLink.Text    = SharedFunctions.GetResourceString("CheckPrintQueueIDLink") + " " + this.UnPrintedChecksDataGridView.Rows[0].Cells[0].Value.ToString();
                    this.FillCheckNoTextBox(this.RegisterId);
                }
                else
                {
                    this.UnPrintedChecksDataGridView.Enabled          = false;
                    this.UnPrintedChecksDataGridView.Rows[0].Selected = false;
                    this.StartingCheckNoTextBox.Text      = "";
                    this.CheckPrintQueueAuditLink.Enabled = false;
                    this.CheckPrintQueueAuditLink.Text    = SharedFunctions.GetResourceString("CheckPrintQueueIDLink") + " ";
                }

                if (this.UnPrintedChecksDataGridView.OriginalRowCount == 0)
                {
                    this.UnPrintedChecksDataGridView.CurrentCell = null;
                }

                ////this.AccountNameComboBox.Select();
                this.DisableVScrollBar(this.NumInGrid);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
コード例 #11
0
ファイル: F36012.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Handles the RowHeaderMouseClick event of the MISelectionGridView control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellMouseEventArgs"/> instance containing the event data.</param>
        private void MISelectionGridView_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0 && this.MISelectionGridView.CurrentCell != null)
                {
                    this.selectedRowIndex = e.RowIndex;
                }
                else
                {
                    this.selectedRowIndex = -1;
                }

                TerraScanCommon.SetDataGridViewPosition(this.MISelectionGridView, e.RowIndex);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
コード例 #12
0
ファイル: F25003.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// To load the Situs edit Form
        /// </summary>
        /// <param name="currentSitusId">The current situs id.</param>
        private void LoadSitusEdit(int currentSitusId)
        {
            Form situsEdit = new Form();

            object[] optionalParameter = new object[] { currentSitusId, this.parcelId };

            situsEdit = this.form25003Control.WorkItem.Services.Get <TerraScan.Infrastructure.Interface.Services.IFormEngineService>().GetForm(25004, optionalParameter, this.form25003Control.WorkItem);

            if (situsEdit != null)
            {
                if (situsEdit.ShowDialog() != DialogResult.Cancel)
                {
                    this.currentSitusId = TerraScanCommon.GetValue(situsEdit, "CurrentSitusId");
                    this.LoadSitusManagementGrid();
                    this.GetRowIndex(this.currentSitusId);
                    this.SitusManagementGrid.Focus();
                    TerraScanCommon.SetDataGridViewPosition(this.SitusManagementGrid, this.tempSitusMgmtGridRowId);
                    this.ToSetSlicePermission();
                }
            }
        }
コード例 #13
0
ファイル: F15004.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Populates the disbursement history grid view.
        /// </summary>
        private void PopulateDisbursementHistoryGridView()
        {
            int disbursementHistoryRowCount;

            if (this.pageMode == TerraScanCommon.PageModeTypes.New)
            {
                this.agencyMgmtDataset.ListDisbursementHistory.Rows.Clear();
            }

            disbursementHistoryRowCount = this.agencyMgmtDataset.ListDisbursementHistory.Rows.Count;
            this.DisbursementHistoryGridView.DataSource = this.agencyMgmtDataset.ListDisbursementHistory;

            if (disbursementHistoryRowCount > 0)
            {
                this.DisbursementHistoryGridView.Enabled = true;
                TerraScanCommon.SetDataGridViewPosition(this.DisbursementHistoryGridView, 0);
            }
            else
            {
                this.DisbursementHistoryGridView.Rows[0].Selected = false;
                this.DisbursementHistoryGridView.Enabled          = false;
            }

            if (disbursementHistoryRowCount > this.DisbursementHistoryGridView.NumRowsVisible)
            {
                this.AgencyMgmtVScorrlBar.Visible = false;
            }
            else
            {
                this.AgencyMgmtVScorrlBar.Visible = true;
            }

            if (this.DisbursementHistoryGridView.OriginalRowCount == 0)
            {
                this.DisbursementHistoryGridView.CurrentCell = null;
            }
        }
コード例 #14
0
ファイル: F36012.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Handles the KeyDown event of the MISelectionGridView control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param>
        private void MISelectionGridView_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                if (e.KeyValue == 46 && this.selectedRowIndex != -1)
                {
                    if (this.MISelectionGridView.CurrentCell.RowIndex.Equals(this.selectedRowIndex))
                    {
                        if (Convert.ToBoolean(this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.selectedRowIndex][this.MISelectionGridView.EmptyRecordColumnName]))
                        {
                            return;
                        }

                        //// move the deleted row into deltedDataSet for retaining on cancel
                        int     miscChoiceId;
                        string  itemName;
                        decimal itemValue;

                        this.SetEditRecord();

                        int.TryParse(this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.selectedRowIndex][this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.MIChoiceIDColumn.ColumnName].ToString(), out miscChoiceId);
                        decimal.TryParse(this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.selectedRowIndex][this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.ItemValueColumn.ColumnName].ToString(), out itemValue);
                        itemName = this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.selectedRowIndex][this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.ItemNameColumn.ColumnName].ToString();
                        this.deletedRowsCatalogChoiceDataSet.GetMiscCatalogChoice.AddGetMiscCatalogChoiceRow(miscChoiceId, this.miscCodeId, Convert.ToByte(this.fieldNum), itemName, itemValue, true);

                        this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.selectedRowIndex].Delete();
                        this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.AcceptChanges();

                        if (this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows.Count < this.MISelectionGridView.NumRowsVisible)
                        {
                            this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.AddGetMiscCatalogChoiceRow(this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.NewGetMiscCatalogChoiceRow());
                            this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows[this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows.Count - 1][this.MISelectionGridView.EmptyRecordColumnName] = true;
                        }

                        if (this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.Rows.Count > this.MISelectionGridView.NumRowsVisible)
                        {
                            this.MISelectionGridVerticalScroll.Visible = false;
                        }
                        else
                        {
                            this.MISelectionGridVerticalScroll.Visible = true;
                        }

                        if (this.selectedRowIndex > 0)
                        {
                            TerraScanCommon.SetDataGridViewPosition(this.MISelectionGridView, this.selectedRowIndex - 1);
                        }
                        else
                        {
                            TerraScanCommon.SetDataGridViewPosition(this.MISelectionGridView, 0);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #15
0
ファイル: F29531.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// LoadAssociationEventGrid()
        /// </summary>
        private void LoadAssociationEventGrid()
        {
            this.linkData.AssociationDataTable.Clear();
            this.linkData = this.form29531Control.WorkItem.F29531_FillAssociationLinkGrid(this.selectionformactiveid, this.selectionform);
            this.associationEventCount = this.linkData.AssociationDataTable.Rows.Count;
            if (this.associationEventCount > 0)
            {
                this.LinkText.DataPropertyName      = this.linkData.AssociationDataTable.LinkTextColumn.ColumnName;
                this.Description.DataPropertyName   = this.linkData.AssociationDataTable.DescriptionColumn.ColumnName;
                this.Form.DataPropertyName          = this.linkData.AssociationDataTable.DestinationFormColumn.ColumnName;
                this.Param1.DataPropertyName        = this.linkData.AssociationDataTable.Param1Column.ColumnName;
                this.Param2.DataPropertyName        = this.linkData.AssociationDataTable.Param2Column.ColumnName;
                this.Param3.DataPropertyName        = this.linkData.AssociationDataTable.Param3Column.ColumnName;
                this.AssociationID.DataPropertyName = this.linkData.AssociationDataTable.AssociationIDColumn.ColumnName;
                this.AssociationLinksGridView.AutoGenerateColumns = false;
                if (this.associationEventCount == 1)
                {
                    this.AssociationLinksGridView.NumRowsVisible = 1;
                    this.AssociationGridPanel.Height             = 90 - 44;
                    this.AssociationLinkGridVscrollBar.Height    = 90 - 44;
                    this.AssociationLinksGridView.Height         = 90 - 44;
                    if (this.LinkTypeComboBox.SelectedIndex > 0)
                    {
                        this.AssociationLinkpictureBox.Height = 87;
                    }
                    else
                    {
                        this.AssociationLinkpictureBox.Height = 87;
                    }
                    this.AssociationLinkpictureBox.Image = ExtendedGraphics.GenerateVerticalImage(this.AssociationLinkpictureBox.Height + 20, this.AssociationLinkpictureBox.Width, this.tabText, this.redColor, this.greenColor, this.blueColor);
                }
                else if (this.associationEventCount.Equals(2))
                {
                    this.AssociationLinksGridView.NumRowsVisible = 3;
                    this.AssociationLinkpictureBox.Height        = 87 + 41;
                    this.AssociationGridPanel.Height             = this.AssociationLinkpictureBox.Height - 41;
                    this.AssociationLinkGridVscrollBar.Height    = this.AssociationLinkpictureBox.Height - 38;
                    this.AssociationLinksGridView.Height         = this.AssociationLinkpictureBox.Height - 38;
                    //  this.AssociationLinkpictureBox.Height = 130;
                    this.Height = this.AssociationLinkpictureBox.Height + 23;
                    SliceResize sliceResize;
                    sliceResize.MasterFormNo = this.masterFormNo;
                    ////sliceResize.SliceFormName = "D24500.F29510";
                    sliceResize.SliceFormName   = Utility.GetFormNameSpace(this.Name);
                    sliceResize.SliceFormHeight = this.Height;
                    this.OnFormSlice_Resize(new DataEventArgs <SliceResize>(sliceResize));
                    this.AssociationLinkpictureBox.Image = ExtendedGraphics.GenerateVerticalImage(this.AssociationLinkpictureBox.Height, this.AssociationLinkpictureBox.Width, this.tabText, this.redColor, this.greenColor, this.blueColor);
                }
                ////added by Biju on 27-Oct-2010 to implement #8835
                else if (this.associationEventCount <= 12)
                {
                    this.AssociationLinksGridView.NumRowsVisible = this.associationEventCount;
                    this.AssociationLinkpictureBox.Height        = Convert.ToInt32(87.0 + ((this.associationEventCount - 1) * 22));
                    this.AssociationGridPanel.Height             = this.AssociationLinkpictureBox.Height - 41;
                    this.AssociationLinkGridVscrollBar.Height    = this.AssociationLinkpictureBox.Height - 40;
                    this.AssociationLinksGridView.Height         = this.AssociationLinkpictureBox.Height - 40;
                    this.Height = this.AssociationLinkpictureBox.Height + 23;

                    SliceResize sliceResize;
                    sliceResize.MasterFormNo = this.masterFormNo;
                    ////sliceResize.SliceFormName = "D24500.F29510";
                    sliceResize.SliceFormName   = Utility.GetFormNameSpace(this.Name);
                    sliceResize.SliceFormHeight = this.Height;
                    this.OnFormSlice_Resize(new DataEventArgs <SliceResize>(sliceResize));
                    this.AssociationLinkpictureBox.Image = ExtendedGraphics.GenerateVerticalImage(this.AssociationLinkpictureBox.Height, this.AssociationLinkpictureBox.Width, this.tabText, this.redColor, this.greenColor, this.blueColor);
                }
                else if (this.associationEventCount > 12)
                {
                    this.AssociationLinksGridView.NumRowsVisible = 12;
                    this.AssociationLinkpictureBox.Height        = Convert.ToInt32(87.0 + (11 * 22));
                    this.AssociationGridPanel.Height             = this.AssociationLinkpictureBox.Height - 41;
                    this.AssociationLinkGridVscrollBar.Height    = this.AssociationLinkpictureBox.Height - 40;
                    this.AssociationLinksGridView.Height         = this.AssociationLinkpictureBox.Height - 40;
                    this.Height = this.AssociationLinkpictureBox.Height + 23;
                    if (this.isFormLoad)
                    {
                        SliceResize sliceResize;
                        sliceResize.MasterFormNo = this.masterFormNo;
                        ////sliceResize.SliceFormName = "D24500.F29510";
                        sliceResize.SliceFormName   = Utility.GetFormNameSpace(this.Name);
                        sliceResize.SliceFormHeight = this.Height;
                        this.OnFormSlice_Resize(new DataEventArgs <SliceResize>(sliceResize));
                        this.AssociationLinkpictureBox.Image = ExtendedGraphics.GenerateVerticalImage(this.AssociationLinkpictureBox.Height, this.AssociationLinkpictureBox.Width, this.tabText, this.redColor, this.greenColor, this.blueColor);
                        this.isFormLoad = false;
                    }
                }////till here
                this.AssociationLinksGridView.DataSource = this.linkData.AssociationDataTable.DefaultView;
                this.AssociationLinksGridView.Focus();
                //this.AssociationLinksGridView.Rows[0].Selected = true;
                TerraScanCommon.SetDataGridViewPosition(this.AssociationLinksGridView, 0);

                if (this.linkData.AssociationDataTable.Rows.Count > this.AssociationLinksGridView.NumRowsVisible)
                {
                    this.AssociationLinkGridVscrollBar.Visible = false;
                }
                else
                {
                    this.AssociationLinkGridVscrollBar.Enabled = false;
                    this.AssociationLinkGridVscrollBar.Visible = true;
                }
            }
        }
コード例 #16
0
ファイル: F1212.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Loads the afiidavit list grid.
        /// </summary>
        private void LoadPaymentItemsGrid()
        {
            this.paymentRowCount = 0;
            this.accountRowCount = 0;

            this.makeDepositsDataSet = this.Form1212Controll.WorkItem.GetPaymentItemsDetails();

            this.PaymentRowCount = this.makeDepositsDataSet.ListPaymentItemTable.Rows.Count;
            this.AccountRowCount = this.makeDepositsDataSet.ListAccountsGridTable.Rows.Count;

            this.CustomizePaymentItemsDataGrid();
            this.AddCheckBoxColumn();
            this.totalRecCount = this.makeDepositsDataSet.ListPaymentItemTable.Rows.Count;

            this.PaymentItemsGrid.DataSource = this.makeDepositsDataSet.ListPaymentItemTable;
            this.AccountsGridView.DataSource = this.makeDepositsDataSet.ListAccountsGridTable;

            this.SetGridSummeries();

            if (this.PaymentRowCount == 0)
            {
                this.DepositButton.Enabled    = false;
                this.PaymentItemsGrid.Enabled = false;
                this.MakeDepositHelpSmartPart.Focus();
                ////this.PaymentItemsGrid.Rows[0].Selected = false;
                ////this.PaymentItemsGrid.CurrentCell = null;
            }
            else
            {
                this.PaymentItemsGrid.Enabled          = true;
                this.PaymentItemsGrid.Rows[0].Selected = true;
            }

            if (this.makeDepositsDataSet.ListPaymentItemTable.Rows.Count > this.PaymentItemsGrid.NumRowsVisible)
            {
                this.PaymentItmesVScrollBar.Enabled = true;
                this.PaymentItmesVScrollBar.Visible = false;
            }
            else
            {
                this.PaymentItmesVScrollBar.Enabled = false;
                this.PaymentItmesVScrollBar.Visible = true;
            }

            if (this.AccountRowCount == 0)
            {
                this.DepositButton.Enabled = false;
            }
            else
            {
                DataRow[] dataRow;
                bool      defaultValue = true;
                string    findExp      = "IsDefault =" + defaultValue.ToString();
                dataRow = this.makeDepositsDataSet.ListAccountsGridTable.Select(findExp);
                if (dataRow.Length > 0)
                {
                    int rowIndex = this.makeDepositsDataSet.ListAccountsGridTable.Rows.IndexOf(dataRow[0]);
                    TerraScanCommon.SetDataGridViewPosition(this.AccountsGridView, rowIndex);
                    this.AccountsGridView.CurrentRow.Selected = true;
                    this.regId = Convert.ToInt32(dataRow[0][this.makeDepositsDataSet.ListAccountsGridTable.RegisterIDColumn]);
                }
                else
                {
                    TerraScanCommon.SetDataGridViewPosition(this.AccountsGridView, 0);
                    this.regId = Convert.ToInt32(this.makeDepositsDataSet.ListAccountsGridTable.Rows[0][this.makeDepositsDataSet.ListAccountsGridTable.RegisterIDColumn]);
                }
            }

            if (this.makeDepositsDataSet.ListAccountsGridTable.Rows.Count > this.AccountsGridView.NumRowsVisible)
            {
                this.AccountsVScorrlBar.Enabled = true;
                this.AccountsVScorrlBar.Visible = false;
            }
            else
            {
                this.AccountsVScorrlBar.Enabled = false;
                this.AccountsVScorrlBar.Visible = true;
            }
        }