Example #1
0
        /// <summary>
        /// Loads the NeighborhoodSelectionDataGridView
        /// </summary>
        /// <param name="neighborhood">The neighborhood value form NeighborhoodTextBox</param>
        /// <param name="childof">The childof form childoftextBox </param>
        /// <param name="year">The year form childoftextBox </param>
        /// <param name="type">The type form typecomboBox </param>
        /// <param name="description">The description form descriptiontextBox </param>
        private void LoadNeighborhoodSelectionGrid(string neighborhood, string childof, string year, string type, string description)
        {
            ////For Grid
            this.neighborhoodSelectionData         = this.form3510Control.WorkItem.F3510_ListNeighborhoodSelectionDetails(neighborhood, childof, year, type, description);
            this.neighborhoodSelectionGridRowCount = this.neighborhoodSelectionData.GetNeighborhoodSelection.Rows.Count;

            if (this.neighborhoodSelectionGridRowCount > 0)
            {
                this.NeighborhoodDataGridView.Enabled = true;

                this.NeighborhoodDataGridView.DataSource = this.neighborhoodSelectionData.GetNeighborhoodSelection;
                this.NeighborhoodDataGridView.Focus();
                this.NeighborhoodDataGridView.Rows[0].Selected = true;

                this.NeighborhoodAcceptButton.Enabled = true;
            }
            else
            {
                this.ClearNeighborhoodselectionGrid();
            }

            ////to enable or disable the vertical scroll bar
            if (this.neighborhoodSelectionGridRowCount > this.NeighborhoodDataGridView.NumRowsVisible)
            {
                this.NeighborhoodSelectionVerticalScroll.Visible = false;
            }
            else
            {
                this.NeighborhoodSelectionVerticalScroll.Visible = true;
            }

            ////To display the no of display rows in the grid
            this.RecordCountLabel.Text = this.neighborhoodSelectionGridRowCount + SharedFunctions.GetResourceString("9101MasterNameSearch");
        }
Example #2
0
        /// <summary>
        /// Handles the Load event of the F3510 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 F3510_Load(object sender, EventArgs e)
        {
            try
            {
                this.ClearNeighborhoodSelection();
                this.CustomizeNeighborhoodSelectionGrid();
                this.NeighborhoodDataGridView.DataSource       = null;
                this.NeighborhoodDataGridView.Enabled          = false;
                this.NeighborhoodDataGridView.Rows[0].Selected = false;

                ////For Combox Box - Neighborhood Type
                this.neighborhoodTypeData       = this.form3510Control.WorkItem.F3510_ListNeighborhoodType();
                this.TypeComboBox.DataSource    = this.neighborhoodTypeData.GetNeighborhoodType;
                this.TypeComboBox.DisplayMember = this.neighborhoodTypeData.GetNeighborhoodType.TypeColumn.ColumnName;
                this.TypeComboBox.ValueMember   = this.neighborhoodTypeData.GetNeighborhoodType.NBHDTypeColumn.ColumnName;
                this.TypeComboBox.SelectedIndex = -1;

                this.CustomizeNeighborhoodSelectionGrid();
                this.DisableButtons();

                // If condition has been added for avoid excepion while opening through query update form
                if (this.rollYear != null)
                {
                    this.RollYearTextBox.Text = this.rollYear;
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
        /// <summary>
        /// F3510_neighborhoods the type.
        /// </summary>
        /// <returns>neighborhoodtype</returns>
        public static F3510NeighborhoodSelectionData F3510_neighborhoodType()
        {
            F3510NeighborhoodSelectionData neighborhoodtype = new F3510NeighborhoodSelectionData();
            Hashtable ht = new Hashtable();

            Utility.LoadDataSet(neighborhoodtype.GetNeighborhoodType, "f3510_pcget_NeighborhoodSelection", ht);
            return(neighborhoodtype);
        }
        /// <summary>
        /// F3510_s the list neighborhood selection details.
        /// </summary>
        /// <param name="neighborhood">The neighborhood.</param>
        /// <param name="childOf">The child of.</param>
        /// <param name="rollYear">The roll year.</param>
        /// <param name="neighborhoodtype">The neighborhoodtype.</param>
        /// <param name="description">The description.</param>
        /// <returns>neighborhoodSelectionDetails</returns>
        public static F3510NeighborhoodSelectionData F3510_ListNeighborhoodSelectionDetails(string neighborhood, string childOf, string rollYear, string neighborhoodtype, string description)
        {
            F3510NeighborhoodSelectionData neighborhoodSelectionDetails = new F3510NeighborhoodSelectionData();
            Hashtable ht = new Hashtable();

            ht.Add("@Neighborhood", neighborhood);
            ht.Add("@ChildOf", childOf);
            ht.Add("@RollYear", rollYear);
            ht.Add("@Type", neighborhoodtype);
            ht.Add("@Description", description);
            Utility.LoadDataSet(neighborhoodSelectionDetails.GetNeighborhoodSelection, "f3510_pclst_NeighborhoodSelection", ht);
            return(neighborhoodSelectionDetails);
        }