Exemple #1
0
 private void F36090LoadFormDetails()
 {
     try
     {
         if (this.IncomeSourceData.GetIncomeSource != null)
         {
             if (this.IncomeSourceData.GetIncomeSource.Rows.Count == 0)
             {
                 this.IncomeSourceData = this.form36090Control.WorkItem.GetIncomeSourceDetail(Convert.ToInt32(this.IncomeSourceID));
             }
         }
         if (IncomeSourceData.Tables["GetIncomeSource"].Rows.Count > 0)
         {
             this.RollYearTextBox.Text            = this.IncomeSourceData.Tables["GetIncomeSource"].Rows[0]["RollYear"].ToString();
             this.SourceCodeTextBox.Text          = this.IncomeSourceData.Tables["GetIncomeSource"].Rows[0]["SourceCode"].ToString();
             this.DescriptionTextBox.Text         = this.IncomeSourceData.Tables["GetIncomeSource"].Rows[0]["Description"].ToString();
             this.LeaseTypeTextBox.Text           = this.IncomeSourceData.Tables["GetIncomeSource"].Rows[0]["LeaseType"].ToString();
             this.UnitTypeTextBox.Text            = this.IncomeSourceData.Tables["GetIncomeSource"].Rows[0]["UnitType"].ToString();
             this.BaseRentTextBox.Text            = this.IncomeSourceData.Tables["GetIncomeSource"].Rows[0]["BaseRent"].ToString();
             this.UnitTermsComboBox.SelectedIndex = this.UnitTermsComboBox.FindString(this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.UnitTermColumn].ToString());
             this.BaseRentTextBox.Text            = AmountFormat(this.BaseRentTextBox.Text);
             // BaseRentFormat(BaseRentTextBox.Text);
         }
         else
         {
             this.ClearControls();
             this.EnableControls(false);
         }
     }
     catch (Exception ex)
     {
     }
 }
Exemple #2
0
        /// <summary>
        /// Lists the type of the Unit Terms.
        /// </summary>
        /// <returns>The dataset containing the Unit Terms</returns>
        public static F36090IncomeSourceData ListUnitTerms()
        {
            F36090IncomeSourceData unitTermsData = new F36090IncomeSourceData();
            Hashtable ht = new Hashtable();

            Utility.LoadDataSet(unitTermsData.ListUnitTerms, "f31090_pclst_UnitTerm", ht);
            return(unitTermsData);
        }
Exemple #3
0
        /// <summary>
        /// Gets the Income Source Detail.
        /// </summary>
        /// <param name="IncomeSourceID">The IncomeSource id.</param>
        /// <returns>The dataset containing the Income Source information based on IncomeSourceID</returns>
        public static F36090IncomeSourceData GetIncomeSourceData(int IncomeSourceID)
        {
            F36090IncomeSourceData IncomeSourceTemplateData = new F36090IncomeSourceData();
            Hashtable ht = new Hashtable();

            ht.Add("@IncomeSourceID", IncomeSourceID);
            Utility.LoadDataSet(IncomeSourceTemplateData.GetIncomeSource, "f31090_pcget_IncomeSource", ht);
            return(IncomeSourceTemplateData);
        }
Exemple #4
0
        /// <summary>
        /// Gets the income source details.
        /// </summary>
        /// <param name="templateId">The IncomeSourceID id.</param>
        private void GetIncomeSourceDetails(int IncomeSourceID)
        {
            try
            {
                if (this.IncomeSourceData.GetIncomeSource != null)
                {
                    if (this.IncomeSourceData.GetIncomeSource.Rows.Count == 0)
                    {
                        this.IncomeSourceData = this.form36090Control.WorkItem.GetIncomeSourceDetail(Convert.ToInt32(this.IncomeSourceID));
                    }
                }
            }
            catch (SoapException ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }

            try
            {
                if (this.IncomeSourceData.GetIncomeSource != null)
                {
                    if (this.IncomeSourceData.GetIncomeSource.Rows.Count > 0)
                    {
                        this.RollYearTextBox.Text    = this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.RollYearColumn].ToString();
                        this.SourceCodeTextBox.Text  = this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.SourceCodeColumn].ToString();
                        this.DescriptionTextBox.Text = this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.DescriptionColumn].ToString();
                        this.LeaseTypeTextBox.Text   = this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.LeaseTypeColumn].ToString();
                        this.UnitTypeTextBox.Text    = this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.UnitTypeColumn].ToString();
                        // this.UnitTermsComboBox.SelectedValue = this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.UnitTermColumn].ToString();
                        this.UnitTermsComboBox.SelectedIndex = this.UnitTermsComboBox.FindString(this.IncomeSourceData.GetIncomeSource.Rows[0][this.IncomeSourceData.GetIncomeSource.UnitTermColumn].ToString());
                    }
                    else
                    {
                        this.IncomeSourceID = -1;
                        this.NullRecords    = true;
                        this.ClearControls();
                        this.LoadDefaultView();
                        this.pageMode = TerraScanCommon.PageModeTypes.View;
                    }
                }
            }
            catch (Exception ex1)
            {
                ExceptionManager.ManageException(ex1, ExceptionManager.ActionType.Display, this.ParentForm);
            }
        }
Exemple #5
0
        /// <summary>
        /// To load the Unit Terms Combo Box
        /// </summary>
        private void LoadUnitTermsComboBox()
        {
            try
            {
                if (this.IncomeSourceData.ListUnitTerms != null)
                {
                    if (this.IncomeSourceData.ListUnitTerms.Rows.Count == 0)
                    {
                        IncomeSourceData = this.form36090Control.WorkItem.ListUnitTerms();
                    }
                }

                this.UnitTermsComboBox.ValueMember   = "UnitTermID";
                this.UnitTermsComboBox.DisplayMember = "UnitTerm";
                this.UnitTermsComboBox.DataSource    = IncomeSourceData.ListUnitTerms;
            }
            catch (SoapException ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
Exemple #6
0
        public void OnD9030_F9030_SaveConfirmed(object sender, EventArgs eventArgs)
        {
            try
            {
                if ((this.pageMode == TerraScanCommon.PageModeTypes.Edit && this.slicePermissionField.editPermission) || (this.pageMode == TerraScanCommon.PageModeTypes.New && this.slicePermissionField.newPermission))
                {
                    if (this.IncomeSourceID == -99)
                    {
                        this.IncomeSourceID = null;
                    }
                    if (this.pageMode.Equals(TerraScanCommon.PageModeTypes.New))
                    {
                        this.IncomeSourceID = null;
                    }
                    F36090IncomeSourceData insertincomesourceDetails = new F36090IncomeSourceData();
                    F36090IncomeSourceData.IncomeSourceItemsRow dr   = insertincomesourceDetails.IncomeSourceItems.NewIncomeSourceItemsRow();
                    if (!string.IsNullOrEmpty(this.RollYearTextBox.Text.Trim()))
                    {
                        dr.RollYear = Convert.ToInt32(this.RollYearTextBox.Text.Trim());
                    }
                    if (!string.IsNullOrEmpty(this.SourceCodeTextBox.Text.Trim()))
                    {
                        dr.SourceCode = Convert.ToInt32(this.SourceCodeTextBox.Text.Trim());
                    }
                    dr.Description = this.DescriptionTextBox.Text.Trim();
                    dr.LeaseType   = this.LeaseTypeTextBox.Text.Trim();
                    dr.UnitType    = this.UnitTypeTextBox.Text.Trim();
                    if (!string.IsNullOrEmpty(this.UnitTermsComboBox.Text.Trim()))
                    {
                        dr.UnitTermID = Convert.ToInt32(this.UnitTermsComboBox.SelectedValue);
                    }
                    if (!string.IsNullOrEmpty(this.BaseRentTextBox.Text.Trim()))
                    {
                        dr.BaseRent = Convert.ToDecimal(this.BaseRentTextBox.Text.Trim());
                    }
                    insertincomesourceDetails.IncomeSourceItems.Rows.Add(dr);
                    insertincomesourceDetails.IncomeSourceItems.AcceptChanges();
                    DataSet tempDataSet = new DataSet("Root");
                    tempDataSet.Clear();
                    tempDataSet.Tables.Add(insertincomesourceDetails.IncomeSourceItems.Copy());
                    tempDataSet.Tables[0].TableName = "Table";
                    this.savedIncomeSourceId        = this.form36090Control.WorkItem.SaveIncomeSourceDetails(this.IncomeSourceID, tempDataSet.GetXml(), TerraScanCommon.UserId);

                    SliceReloadActiveRecord sliceUpdateActiveRecord = new SliceReloadActiveRecord();
                    sliceUpdateActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceUpdateActiveRecord.SelectedKeyId = this.savedIncomeSourceId;
                    this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs <SliceReloadActiveRecord>(sliceUpdateActiveRecord));
                    SliceReloadActiveRecord sliceReloadActiveRecord;
                    sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceReloadActiveRecord.SelectedKeyId = this.savedIncomeSourceId;
                    this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
                    this.pageMode = TerraScanCommon.PageModeTypes.View;
                }
                else
                {
                    SliceReloadActiveRecord sliceUpdateActiveRecord = new SliceReloadActiveRecord();
                    sliceUpdateActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceUpdateActiveRecord.SelectedKeyId = Convert.ToInt32(this.IncomeSourceID);
                    this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs <SliceReloadActiveRecord>(sliceUpdateActiveRecord));
                    SliceReloadActiveRecord sliceReloadActiveRecord;
                    sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceReloadActiveRecord.SelectedKeyId = Convert.ToInt32(this.IncomeSourceID);
                    this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
                    this.pageMode = TerraScanCommon.PageModeTypes.View;
                }
                this.PermissionControlLock(!this.PermissionFiled.editPermission);
            }
            catch (SoapException soapException)
            {
                ExceptionManager.ManageException(soapException, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }