Beispiel #1
0
        /// <summary>
        /// Loads the deprecation control.
        /// </summary>
        private void LoadDeprecationControl()
        {
            this.listDeprDataTable.Clear();
            this.listDeprControlItemsDataTable.Clear();
            if (this.pageMode.Equals(TerraScanCommon.PageModeTypes.View))
            {
                this.depreciationControlData       = this.form36061Control.WorkItem.F36061_ListDeprControlItems(this.keyId);
                this.listDeprControlItemsDataTable = this.depreciationControlData.ListDeprControlItems;
                if (this.depreciationControlData.GetDeprDescriptionTitle.Rows.Count > 0)
                {
                    this.DeprNeighborhoodlabel.Text = this.depreciationControlData.GetDeprDescriptionTitle.Rows[0][this.depreciationControlData.GetDeprDescriptionTitle.DeprTitleColumn].ToString();
                    this.iskeyidValid = true;
                }

                this.depreciationControlData = this.form36061Control.WorkItem.F36061_ListDepr(this.keyId);
                this.listDeprDataTable       = this.depreciationControlData.ListDepr;
            }

            ////height of the form slice is chnaged
            ////height of the grid is chnged based on records
            this.DepreciationControlDataGrid.DataSource = this.listDeprControlItemsDataTable;

            this.SetFormSliceHeight(this.listDeprControlItemsDataTable.Rows.Count);
            if (this.listDeprControlItemsDataTable.Rows.Count > 0)
            {
                this.DepreciationControlDataGrid.Rows[0].Selected = true;
            }
        }
        /// <summary>
        /// Used to List the Depr Details
        /// </summary>
        /// <param name="nbhdId">The NBHD id.</param>
        /// <returns>
        /// Typed Dataset containing the Depr Details
        /// </returns>
        public static F36061DepreciationControlData F36061_ListDepr(int nbhdId)
        {
            F36061DepreciationControlData depreciationControlData = new F36061DepreciationControlData();
            Hashtable ht = new Hashtable();

            ht.Add("@NBHDID", nbhdId);
            Utility.LoadDataSet(depreciationControlData.ListDepr, "f36061_pclst_Depr", ht);
            return(depreciationControlData);
        }
        /// <summary>
        /// Used to Get the Depreciation Control Items Details.
        /// </summary>
        /// <param name="nbhdId">The NBHD id.</param>
        /// <returns>
        /// Typed Dataset containing the Depreciation Control Items Details
        /// </returns>
        public static F36061DepreciationControlData F36061_ListDeprControlItems(int nbhdId)
        {
            F36061DepreciationControlData depreciationControlData = new F36061DepreciationControlData();
            Hashtable ht = new Hashtable();

            ht.Add("@NBHDID", nbhdId);
            string[] tableName = new string[] { depreciationControlData.GetDeprDescriptionTitle.TableName, depreciationControlData.ListDeprControlItems.TableName };
            Utility.LoadDataSet(depreciationControlData, "f36061_pclst_DeprControlItems", ht, tableName);
            return(depreciationControlData);
        }