/// <summary> /// Populates the TIF District fund detais. /// </summary> private void PopulateTopDollarDetails() { this.pageLoadStatus = true; this.TopDollarId = this.keyId; this.TopDollarData = this.form39110Controll.WorkItem.F34110_GetTopDollarDetails(this.keyId); // .WorkItem.F27081_GetTIFDistrictDetails(this.keyId, TerraScanCommon.UserId); int rollYear; //// load the form f27081 using keyid and userid if (this.TopDollarData.TopDollarDataTable.Rows.Count > 0) { this.AgEqualTextBox.Text = this.TopDollarData.TopDollarDataTable.Rows[0][this.TopDollarData.TopDollarDataTable.AgEqualRateColumn.ColumnName].ToString(); this.NonAgEqualTextBox.Text = this.TopDollarData.TopDollarDataTable.Rows[0][this.TopDollarData.TopDollarDataTable.NonAgEqualRateColumn.ColumnName].ToString(); this.RollYearTextBox.Text = this.TopDollarData.TopDollarDataTable.Rows[0][this.TopDollarData.TopDollarDataTable.RollYearColumn.ColumnName].ToString(); this.CropTextBox.Text = this.TopDollarData.TopDollarDataTable.Rows[0][this.TopDollarData.TopDollarDataTable.CropTopDollarColumn.ColumnName].ToString(); this.NonCropTextBox.Text = this.TopDollarData.TopDollarDataTable.Rows[0][this.TopDollarData.TopDollarDataTable.NonCropTopDollarColumn.ColumnName].ToString(); this.CountyTextBox.Text = this.TopDollarData.TopDollarDataTable.Rows[0][this.TopDollarData.TopDollarDataTable.CountyFactorColumn.ColumnName].ToString(); } else { this.ClearTopDollar(); this.LockControls(true); } int.TryParse(this.RollYearTextBox.Text, out rollYear); this.pageMode = TerraScanCommon.PageModeTypes.View; this.pageLoadStatus = false; }
///<summary> /// used to Calculate Non Crop Dollar /// </summary> /// <param name="CropTopDollar">Crop Top DOllar</param> /// <param name="County Factor">County Factor</param> public static F34110TopDollarData F34110_CropTopDollar(decimal CropDollar, decimal CountyFactor) { F34110TopDollarData TopDollarData = new F34110TopDollarData(); Hashtable ht = new Hashtable(); ht.Add("@CropTopDollar", CropDollar); ht.Add("@CountyFactor", CountyFactor); Utility.LoadDataSet(TopDollarData.NonCropDollarDataTable, "f39110_pcget_NonCropDollar", ht); return(TopDollarData); }
/// <summary> /// F34110_ the get TopDollarDetails. /// </summary> /// <param name="TopDollarID">TopDollarId.</param> /// <returns>The TopDollar dataset.</returns> public static F34110TopDollarData F34110_GetTopDollarDetails(int TopDollarID) { F34110TopDollarData TopDollarData = new F34110TopDollarData(); Hashtable ht = new Hashtable(); ht.Add("@TopDollarID", TopDollarID); //string[] tableNames = new string[] { TopDollarData.TopDollarDataTable.TableName }; Utility.LoadDataSet(TopDollarData.TopDollarDataTable, "f39110_pcget_TopDollar", ht); return(TopDollarData); }
///<summary> /// Used to Calculate NonCrop Dollar /// </summary> private void CalculateNonCropDollar(bool isChange, decimal crop, decimal county) { decimal nonCrop = 0; //county = this.CountyTextBox.DecimalTextBoxValue; //if ((!string.IsNullOrEmpty(this.CropTextBox.Text)) && (!string.IsNullOrEmpty(this.CountyTextBox.Text))) //{ this.TopDollarData = this.form39110Controll.WorkItem.F34110_CropTopDollar(crop, county); if (this.TopDollarData.NonCropDollarDataTable.Rows.Count > 0) { decimal.TryParse(TopDollarData.NonCropDollarDataTable.Rows[0][0].ToString(), out nonCrop); } decimal maxValue = 922337203685477.5807M; if (nonCrop > maxValue) { if (isChange) { MessageBox.Show(SharedFunctions.GetResourceString("NonCropDollarExceeds"), "TerraScan T2", MessageBoxButtons.OK, MessageBoxIcon.Information); this.CountyTextBox.Text = "0.00000"; this.CountyTextBox.Focus(); } else { MessageBox.Show(SharedFunctions.GetResourceString("NonCropDollarExceeds"), "TerraScan T2", MessageBoxButtons.OK, MessageBoxIcon.Information); this.CropTextBox.Text = "$ 0.00"; this.CropTextBox.Focus(); } this.NonCropTextBox.Text = "$ 0.00"; } else { this.NonCropTextBox.Text = Convert.ToString(nonCrop); } //} }