コード例 #1
0
ファイル: F36012.cs プロジェクト: CSSAdmin/TScan
 /// <summary>
 /// Initializes a new instance of the <see cref="T:F36012"/> class.
 /// </summary>
 /// <param name="miscCodeId">The misc code id.</param>
 /// <param name="fieldNum">The field num.</param>
 /// <param name="catalogChoiceDataTable">The catalog choice data table.</param>
 /// <param name="miscImprovementCatalogPermissionFields">The misc improvement catalog permission fields.</param>
 public F36012(int miscCodeId, string fieldNum, F36010MiscImprovementCatalog.GetMiscCatalogChoiceDataTable catalogChoiceDataTable, PermissionFields miscImprovementCatalogPermissionFields)
 {
     InitializeComponent();
     this.miscImprovementCatalogChoiceDataSet = new F36010MiscImprovementCatalog();
     this.miscImprovementCatalogChoiceDataSet.Merge(catalogChoiceDataTable);
     this.miscCodeId = miscCodeId;
     this.fieldNum   = fieldNum;
     this.miscImprovementCatalogPermissionFields = miscImprovementCatalogPermissionFields;
 }
コード例 #2
0
        /// <summary>
        /// F36010_s the list depr table.
        /// </summary>
        /// <param name="rollYear">The roll year.</param>
        /// <returns>miscImprovementData</returns>
        public static F36010MiscImprovementCatalog F36010_ListDeprTable(int rollYear)
        {
            F36010MiscImprovementCatalog miscImprovementData = new F36010MiscImprovementCatalog();
            Hashtable ht = new Hashtable();

            ht.Add("@RollYear", rollYear);
            Utility.LoadDataSet(miscImprovementData.ListDeprTable, "f36010_pclst_DeprTable", ht);
            return(miscImprovementData);
        }
コード例 #3
0
        /// <summary>
        /// Get the Misc Improvement data
        /// </summary>
        /// <param name="miscCodeId">miscCodeID</param>
        /// <returns>1</returns>
        public static F36010MiscImprovementCatalog F36010_GetMiscImprovementCatalog(int miscCodeId)
        {
            F36010MiscImprovementCatalog getMiscImprovementData = new F36010MiscImprovementCatalog();
            Hashtable ht = new Hashtable();

            ht.Add("@MICodeID", miscCodeId);
            string[] tableName = new string[] { getMiscImprovementData.GetMICatalog.TableName, getMiscImprovementData.GetMiscCatalogChoice.TableName };
            Utility.LoadDataSet(getMiscImprovementData, "f36010_pcget_MI_Catalog", ht, tableName);
            return(getMiscImprovementData);
        }
コード例 #4
0
ファイル: F36012.cs プロジェクト: CSSAdmin/TScan
        /// <summary>
        /// Loads the catalog choice grid.
        /// </summary>
        /// <param name="fieldNum">The field num.</param>
        private void LoadCatalogChoiceGrid(string fieldNum)
        {
            string currentFieldCatalogChoiceCond = this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.FieldNumColumn.ColumnName + " = " + fieldNum;

            DataRow[] currentFieldCatalogChoiceRows = this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.Select(currentFieldCatalogChoiceCond);
            this.currentFieldCatalogChoiceDataSet = new F36010MiscImprovementCatalog();

            if (currentFieldCatalogChoiceRows.Length > 0)
            {
                this.currentFieldCatalogChoiceDataSet.Merge(currentFieldCatalogChoiceRows);
            }

            string nonCurrentFieldCatalogChoiceCond = this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.FieldNumColumn.ColumnName + " <> " + fieldNum;

            DataRow[] nonCurrentFieldCatalogChoiceRows = this.miscImprovementCatalogChoiceDataSet.GetMiscCatalogChoice.Select(nonCurrentFieldCatalogChoiceCond);

            this.nonCurrentFieldCatalogChoiceDataSet = new F36010MiscImprovementCatalog();

            if (nonCurrentFieldCatalogChoiceRows.Length > 0)
            {
                this.nonCurrentFieldCatalogChoiceDataSet.Merge(nonCurrentFieldCatalogChoiceRows);
            }

            this.MISelectionGridView.DataSource = this.currentFieldCatalogChoiceDataSet.GetMiscCatalogChoice.DefaultView;

            if (this.MISelectionGridView.OriginalRowCount >= this.MISelectionGridView.NumRowsVisible)
            {
                this.MISelectionGridVerticalScroll.Visible = false;
            }
            else
            {
                this.MISelectionGridVerticalScroll.Visible = true;
            }

            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;
                }
            }
        }