Ejemplo n.º 1
0
        public void OnD9030_F9030_SaveConfirmed(object sender, EventArgs eventArgs)
        {
            try
            {
                //if (this.pageMode == TerraScanCommon.PageModeTypes.Edit && this.slicePermissionField.editPermission)
                if ((this.pageMode == TerraScanCommon.PageModeTypes.Edit && this.slicePermissionField.editPermission) || (this.pageMode == TerraScanCommon.PageModeTypes.New && this.slicePermissionField.newPermission))
                {
                    if (this.streetId == -99)
                    {
                        this.streetId = null;
                    }
                    this.streetListManagementData.ListStreetManagement.Rows.Clear();
                    F25011StreetListManagementData.ListStreetManagementRow dr = this.streetListManagementData.ListStreetManagement.NewListStreetManagementRow();

                    if (this.pageMode.Equals(TerraScanCommon.PageModeTypes.New))
                    {
                        this.streetId = null;
                    }
                    dr.FullStreetName = this.FullStreetNameTextBox.Text.Trim();

                    if (!string.IsNullOrEmpty(this.CityComboBox.Text.Trim()))
                    {
                        dr.City = this.CityComboBox.Text.Trim();
                    }

                    dr.StreetName = this.StreetNameTextBox.Text.Trim();
                    if (!string.IsNullOrEmpty(this.DirectionalComboBox.Text.Trim()))
                    {
                        dr.Directional = this.DirectionalComboBox.Text.Trim();
                    }

                    if (!string.IsNullOrEmpty(this.SuffixComboBox.Text.Trim()))
                    {
                        dr.Suffix = this.SuffixComboBox.Text.Trim();
                    }

                    dr.ZipCode = this.ZipCodeTextBox.Text.Trim();
                    this.streetListManagementData.ListStreetManagement.Rows.Add(dr);

                    this.savedStreetId = this.form25011Control.WorkItem.F25011_SaveStreetListManagement(Convert.ToInt32(this.streetId), (Utility.GetXmlString(this.streetListManagementData.ListStreetManagement.Copy())), TerraScanCommon.UserId);

                    //this.streetId = this.savedStreetId;
                    //SliceReloadActiveRecord currentSliceInfo;
                    //currentSliceInfo.MasterFormNo = this.masterFormNo;
                    //currentSliceInfo.SelectedKeyId = savedStreetId;//this.streetId;
                    //this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs<SliceReloadActiveRecord>(currentSliceInfo));
                    //this.pageMode = TerraScanCommon.PageModeTypes.View;

                    SliceReloadActiveRecord sliceUpdateActiveRecord = new SliceReloadActiveRecord();
                    sliceUpdateActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceUpdateActiveRecord.SelectedKeyId = savedStreetId;
                    //this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs<SliceReloadActiveRecord>(sliceUpdateActiveRecord));

                    SliceReloadActiveRecord sliceReloadActiveRecord;
                    sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceReloadActiveRecord.SelectedKeyId = savedStreetId;
                    this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
                    this.pageMode = TerraScanCommon.PageModeTypes.View;
                    this.Cursor   = Cursors.Default;
                }
                else
                {
                    this.savedStreetId = this.form25011Control.WorkItem.F25011_SaveStreetListManagement(0, (Utility.GetXmlString(this.streetListManagementData.ListStreetManagement.Copy())), TerraScanCommon.UserId);

                    //this.streetId = this.savedStreetId;
                    //SliceReloadActiveRecord currentSliceInfo;
                    //currentSliceInfo.MasterFormNo = this.masterFormNo;
                    //currentSliceInfo.SelectedKeyId = Convert.ToInt32(this.streetId);//this.streetId;
                    //this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs<SliceReloadActiveRecord>(currentSliceInfo));
                    //this.pageMode = TerraScanCommon.PageModeTypes.View;


                    SliceReloadActiveRecord sliceUpdateActiveRecord = new SliceReloadActiveRecord();
                    sliceUpdateActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceUpdateActiveRecord.SelectedKeyId = Convert.ToInt32(this.streetId);
                    //this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs<SliceReloadActiveRecord>(sliceUpdateActiveRecord));
                    SliceReloadActiveRecord sliceReloadActiveRecord;
                    sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceReloadActiveRecord.SelectedKeyId = Convert.ToInt32(this.streetId);
                    this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
                    this.pageMode = TerraScanCommon.PageModeTypes.View;
                }
            }
            catch (SoapException soapException)
            {
                ExceptionManager.ManageException(soapException, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
Ejemplo n.º 2
0
        private void SaveSampleFormDetails()
        {
            F1500SampleForm.FormSliceDetailsDataTable dtSampleForm = new F1500SampleForm.FormSliceDetailsDataTable();
            F1500SampleForm.FormSliceDetailsRow       drSampleForm = dtSampleForm.NewFormSliceDetailsRow();

            drSampleForm.Form        = Int32.Parse(this.FormIDTextBox.Text);
            drSampleForm.FormFile    = this.FormFileTextBox.Text;
            drSampleForm.MenuName    = this.MenuNameTextBox1.Text;
            drSampleForm.Description = this.DescriptionTextBox.Text;
            int menugroupId;

            int.TryParse(this.MenuGroupIdComboBox.SelectedValue.ToString(), out menugroupId);
            drSampleForm.MenuGroupID = menugroupId;
            int appId;

            int.TryParse(this.ApplicationIDComboBox.SelectedValue.ToString(), out appId);
            drSampleForm.ApplicationID = appId;
            drSampleForm.Report        = int.Parse(ReportTextBox.Text);
            int temp;

            int.TryParse(this.MenuOrderTextBox.Text, out temp);
            drSampleForm.MenuOrder = temp;
            int tempWebHeight;

            int.TryParse(this.WebHeightTextBox.Text, out tempWebHeight);
            drSampleForm.WebHeight = tempWebHeight;
            //drSampleForm.WebHeight = int.Parse(WebHeightTextBox.Text);
            int tempGroupId;

            int.TryParse(this.GroupIDTextBox.Text, out tempGroupId);
            drSampleForm.GroupID = tempGroupId;

            if (this.IsPermissionMenuComboBox.SelectedIndex.Equals(0))
            {
                drSampleForm.IsPermissionMenu = true;
            }
            else
            {
                drSampleForm.IsPermissionMenu = false;
            }


            if (this.IsPermissionOpenComboBox.SelectedIndex.Equals(0))
            {
                drSampleForm.IsPermissionOpen = true;
            }
            else
            {
                drSampleForm.IsPermissionOpen = false;
            }
            if (this.IsPermissionAddComboBox.SelectedIndex.Equals(0))
            {
                drSampleForm.IsPermissionAdd = true;
            }
            else
            {
                drSampleForm.IsPermissionAdd = false;
            }
            if (this.IsPermissionEditComboBox.SelectedIndex.Equals(0))
            {
                drSampleForm.IsPermissionEdit = true;
            }
            else
            {
                drSampleForm.IsPermissionEdit = false;
            }
            if (this.IsPermissionDeleteComboBox.SelectedIndex.Equals(0))
            {
                drSampleForm.IsPermissionDelete = true;
            }
            else
            {
                drSampleForm.IsPermissionDelete = false;
            }

            dtSampleForm.Rows.Add(drSampleForm);
            DataSet tempDataSet = new DataSet("Root");

            tempDataSet.Tables.Add(dtSampleForm.Copy());
            tempDataSet.Tables[0].TableName = "Table";
            string tempXmlData = TerraScanCommon.GetXmlString(dtSampleForm);

            int returnValue = this.Form1500Controller.WorkItem.InsertSampleFormDetails(drSampleForm.Form, tempXmlData, TerraScanCommon.UserId);



            SliceReloadActiveRecord currentKeyIdInfo;

            currentKeyIdInfo.MasterFormNo  = this.masterFormNo;
            currentKeyIdInfo.SelectedKeyId = returnValue;
            this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs <SliceReloadActiveRecord>(currentKeyIdInfo));
            SliceReloadActiveRecord sliceReloadActiveRecord = new SliceReloadActiveRecord();

            sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
            sliceReloadActiveRecord.SelectedKeyId = returnValue;
            this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
        }
Ejemplo n.º 3
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.stateId == -99)
                    {
                        this.stateId = null;
                    }

                    string StateAssessedOwner = string.Empty;
                    F35075StateAssessedData.GetStateAssessedOwnerDataTable currentTable = new F35075StateAssessedData.GetStateAssessedOwnerDataTable();
                    F35075StateAssessedData.GetStateAssessedOwnerRow       currenRow    = currentTable.NewGetStateAssessedOwnerRow();
                    if (this.pageMode.Equals(TerraScanCommon.PageModeTypes.New))
                    {
                        this.stateId      = null;
                        currenRow.StateID = Convert.ToInt32(this.stateId);
                    }
                    else
                    {
                        currenRow.StateID = Convert.ToInt32(this.stateId);
                    }

                    currenRow.OwnerID   = this.ownerid;
                    currenRow.OwnerName = this.OwnerLinkLabel.Text;
                    if (!string.IsNullOrEmpty(this.RollYearTextBox.Text.Trim()))
                    {
                        currenRow.RollYear = this.RollYearTextBox.Text;
                    }
                    else
                    {
                        currenRow.RollYear = string.Empty;
                    }
                    currenRow.Address1      = this.Address1TextBox.Text;
                    currenRow.Address2      = this.Address2TextBox.Text;
                    currenRow.city          = this.CityTextBox.Text;
                    currenRow.State         = this.StateTextBox.Text;
                    currenRow.Zip           = this.ZipTextBox.Text;
                    currenRow.CompanyNumber = this.CompanyNumberTextBox.Text.Trim();
                    currentTable.Rows.Add(currenRow);
                    StateAssessedOwner = TerraScanCommon.GetXmlString(currentTable);

                    int returnValue = this.form35075Control.WorkItem.F35075_SaveStateAssessedOwner(this.stateId, StateAssessedOwner, TerraScanCommon.UserId);
                    SliceReloadActiveRecord sliceUpdateActiveRecord = new SliceReloadActiveRecord();
                    sliceUpdateActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceUpdateActiveRecord.SelectedKeyId = returnValue;
                    this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs <SliceReloadActiveRecord>(sliceUpdateActiveRecord));

                    SliceReloadActiveRecord sliceReloadActiveRecord;
                    sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceReloadActiveRecord.SelectedKeyId = returnValue;
                    this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
                    this.pageMode = TerraScanCommon.PageModeTypes.View;
                    this.Cursor   = Cursors.Default;
                }
                else
                {
                    SliceReloadActiveRecord sliceUpdateActiveRecord = new SliceReloadActiveRecord();
                    sliceUpdateActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceUpdateActiveRecord.SelectedKeyId = Convert.ToInt32(this.stateId);
                    this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs <SliceReloadActiveRecord>(sliceUpdateActiveRecord));
                    SliceReloadActiveRecord sliceReloadActiveRecord;
                    sliceReloadActiveRecord.MasterFormNo  = this.masterFormNo;
                    sliceReloadActiveRecord.SelectedKeyId = Convert.ToInt32(this.stateId);
                    this.OnD9030_F9030_ReloadAfterSave(new TerraScan.Infrastructure.Interface.EventArgs <SliceReloadActiveRecord>(sliceReloadActiveRecord));
                    this.pageMode = TerraScanCommon.PageModeTypes.View;
                }
                this.PermissionControlLock(!this.PermissionFiled.editPermission);
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 4
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);
            }
        }