コード例 #1
0
ファイル: F29531.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Handles the Load event of the F29531 control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 private void F29531_Load(object sender, EventArgs e)
 {
     try
     {
         this.FlagSliceForm = true;
         this.isFormLoad    = true;
         ////For Combox Box - Association-Link Type
         this.linktypeData = this.form29531Control.WorkItem.F29531AssociationLinkType(TerraScanCommon.UserId);
         this.LinkTypeComboBox.DataSource    = this.linktypeData.AssociationLinkTypeDataTable;
         this.LinkTypeComboBox.DisplayMember = this.linktypeData.AssociationLinkTypeDataTable.AssociationTypeColumn.ColumnName;
         this.LinkTypeComboBox.ValueMember   = this.linktypeData.AssociationLinkTypeDataTable.AssociationCfgIDColumn.ColumnName;
         this.LinkTypeComboBox.SelectedIndex = 0;
         this.LinkTypeComboBox.Focus();
         //this.LinkTypeComboBox.Text = "<<Select>>";
         this.selectionform    = this.masterFormNo;
         selectionformactiveid = this.formId;
         this.LoadAssociationEventGrid();
         this.LinkToButton.Enabled = false;
         RollYear = Convert.ToInt32(F29531.rollYearval);
     }
     catch (SoapException ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
 }
コード例 #2
0
        /// <summary>
        /// F29531s the type of the association link.
        /// </summary>
        /// <param name="userid">The userid.</param>
        /// <returns></returns>
        public static F29531AssciationLinkData F29531AssociationLinkType(int userid)
        {
            F29531AssciationLinkData associationlinktype = new F29531AssciationLinkData();
            Hashtable ht = new Hashtable();

            ht.Add("@UserID", userid);
            Utility.LoadDataSet(associationlinktype.AssociationLinkTypeDataTable, "f29531_pclst_AssociationType", ht);
            return(associationlinktype);
        }
コード例 #3
0
        /// <summary>
        /// F29531_s the fill association link grid.
        /// </summary>
        /// <param name="keyid">The keyid.</param>
        /// <param name="formId">The form id.</param>
        /// <returns></returns>
        public static F29531AssciationLinkData F29531_FillAssociationLinkGrid(int keyid, int formId)
        {
            F29531AssciationLinkData associationLink = new F29531AssciationLinkData();
            Hashtable ht = new Hashtable();

            ht.Add("@KeyID", keyid);
            ht.Add("@Form", formId);
            Utility.LoadDataSet(associationLink.AssociationDataTable, "f29531_pclst_Association", ht);
            return(associationLink);
        }
コード例 #4
0
ファイル: F29531.cs プロジェクト: CSSAdmin/TScan
        public void SaveButtonClick()
        {
            F29531AssciationLinkData UpdateAssociationData = new F29531AssciationLinkData();

            F29531AssciationLinkData.UpdateAssociationDataTableRow dr = UpdateAssociationData.UpdateAssociationDataTable.NewUpdateAssociationDataTableRow();
            DataTable tempTable = dt.Clone();

            foreach (DataRow dtRow in this.linkData.AssociationDataTable)
            {
                tempTable.ImportRow(dtRow);
            }
            string xmlValue = TerraScan.Utilities.Utility.GetXmlString(tempTable);

            xmlValue = xmlValue.Replace("Root", "root");
            xmlValue = xmlValue.Replace("Table", "Association");
            this.form29531Control.WorkItem.UpdateAssociationLinkDetails(xmlValue, TerraScanCommon.UserId);
            this.LoadAssociationEventGrid();
            this.pageMode = TerraScanCommon.PageModeTypes.View;
        }
コード例 #5
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;
                }
            }
        }