/// <summary> /// Loads the Unit Type Combo Box /// </summary> private void LoadUnitType() { DataRow customRow = this.listUnitTypeDataTable.NewRow(); this.listUnitTypeDataTable.Clear(); customRow[this.listUnitTypeDataTable.UnitIDColumn.ColumnName] = "0"; customRow[this.listUnitTypeDataTable.UnitColumn.ColumnName] = string.Empty; this.listUnitTypeDataTable.Rows.Add(customRow); this.situsManagementData = this.form25004Control.WorkItem.F25003_ListUnitType(); this.listUnitTypeDataTable.Merge(this.situsManagementData.ListUnitType); if (this.listUnitTypeDataTable.Rows.Count > 0) { this.UnitTypeComboBox.DataSource = this.listUnitTypeDataTable; this.UnitTypeComboBox.DisplayMember = this.listUnitTypeDataTable.UnitColumn.ColumnName; this.UnitTypeComboBox.ValueMember = this.listUnitTypeDataTable.UnitIDColumn.ColumnName; if (this.unitId > 0) { this.UnitTypeComboBox.SelectedValue = this.unitId; } else { this.UnitTypeComboBox.SelectedIndex = 0; } } }
/// <summary> /// Loads the name of the street. /// </summary> private void LoadStreetName() { //DataRow customRow = this.listStreetDataTable.NewRow(); //this.listStreetDataTable.Clear(); //customRow[this.listStreetDataTable.StreetIDColumn.ColumnName] = "0"; //customRow[this.listStreetDataTable.StreetNameColumn.ColumnName] = string.Empty; //this.listStreetDataTable.Rows.Add(customRow); this.situsManagementData = this.form25004Control.WorkItem.F25003_ListStreet(); this.listStreetDataTable = this.situsManagementData.ListStreet; if (this.listStreetDataTable.Rows.Count > 0) { this.StreetNameComboBox.DataSource = this.listStreetDataTable; this.StreetNameComboBox.DisplayMember = this.listStreetDataTable.StreetNameColumn.ColumnName; this.StreetNameComboBox.ValueMember = this.listStreetDataTable.StreetIDColumn.ColumnName; if (this.streetId > 0) { this.StreetNameComboBox.SelectedValue = this.streetId; } else { this.StreetNameComboBox.SelectedIndex = 0; } } }
/// <summary> /// To list Unit Type Details. /// </summary> /// <returns>Typed DataSet containing the Unit Type Details</returns> public static F25003SitusManagementData F25003_ListUnitType() { F25003SitusManagementData situsManagementData = new F25003SitusManagementData(); Hashtable ht = new Hashtable(); Utility.LoadDataSet(situsManagementData.ListUnitType, "f25003_pclst_Unit", ht); return(situsManagementData); }
/// <summary> /// Loads the situs management grid. /// </summary> private void LoadSitusManagementGrid() { this.listSitusManagementDataTable.Clear(); this.situsManagementData = this.form25003Control.WorkItem.F25003_ListSitusMangement(this.parcelId, this.invalidsiusId); this.listSitusManagementDataTable = this.situsManagementData.ListSitusManagement; if (this.situsManagementData.ListParcelValidID.Rows.Count > 0) { int.TryParse(this.situsManagementData.ListParcelValidID.Rows[0][this.situsManagementData.ListParcelValidID.KeyIDColumn.ColumnName].ToString(), out this.validKeyId); } else { this.validKeyId = 0; } this.listSitusManagementDataTableRowCount = this.listSitusManagementDataTable.Rows.Count; if (this.listSitusManagementDataTableRowCount > 0) { this.SetSmartPartHeight(this.listSitusManagementDataTableRowCount); this.SitusManagementGrid.DataSource = this.listSitusManagementDataTable.DefaultView; this.SitusManagementGrid.Rows[0].Selected = true; this.SitusManagementGrid.Enabled = true; ////TerraScanCommon.SetDataGridViewPosition(this.SitusManagementGrid, 0); this.SitusGridpanel.Enabled = true; this.TitlePanel.Enabled = true; this.ModifyDeletePanel.Enabled = true; } else { this.ClearSitusManagementGrid(); this.SitusGridpanel.Enabled = false; this.TitlePanel.Enabled = true; this.ModifyDeletePanel.Enabled = false; } if (this.listSitusManagementDataTableRowCount > this.SitusManagementGrid.NumRowsVisible) { this.SitusGridVerticalScroll.Visible = false; } else { this.SitusGridVerticalScroll.Visible = true; } SliceResize sliceResize; sliceResize.MasterFormNo = this.masterFormNo; sliceResize.SliceFormName = Utility.GetFormNameSpace(this.Name); sliceResize.SliceFormHeight = this.SitusManagementPictureBox.Height; this.OnFormSlice_Resize(new DataEventArgs <SliceResize>(sliceResize)); if (!this.flagLoadOnProcess) { this.SitusManagementPictureBox.Image = ExtendedGraphics.GenerateVerticalImage(this.SitusManagementPictureBox.Height, this.SitusManagementPictureBox.Width, this.sectionIndicatorText, this.redColor, this.greenColor, this.blueColor); } }
public void OnD9030_F9030_SetSlicePermission(object sender, DataEventArgs <SlicePermissionReload> eventArgs) { try { if (this.masterFormNo == eventArgs.Data.MasterFormNo) { this.slicePermissionField.deletePermission = this.PermissionFiled.deletePermission; this.slicePermissionField.editPermission = this.PermissionFiled.editPermission; this.slicePermissionField.newPermission = this.PermissionFiled.newPermission; this.slicePermissionField.openPermission = this.PermissionFiled.openPermission; ////to check for invalid key id if (this.parcelId != eventArgs.Data.KeyId) { this.parcelId = eventArgs.Data.KeyId; this.situsManagementData = this.form25003Control.WorkItem.F25003_ListSitusMangement(this.parcelId, -999); if (this.situsManagementData.ListParcelValidID.Rows.Count > 0) { int.TryParse(this.situsManagementData.ListParcelValidID.Rows[0][this.situsManagementData.ListParcelValidID.KeyIDColumn.ColumnName].ToString(), out this.validKeyId); } else { this.validKeyId = 0; } } if (this.validKeyId > 0) { eventArgs.Data.FlagInvalidSliceKey = false; } else { //// Coding Added for the issue 4212 0n 30/5/2009. //// Last Slice does not have a record also it will not return invalid slice if (eventArgs.Data.FlagInvalidSliceKey) { eventArgs.Data.FlagInvalidSliceKey = true; } } this.ToSetSlicePermission(); } } catch (SoapException soapException) { ExceptionManager.ManageException(soapException, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } }
/// <summary> /// To List Situs Mangement Details. /// </summary> /// <param name="parcelId">The parcel id.</param> /// <param name="situsId">The situs id.</param> /// <returns>Typed Dataset containing the Situs Mangement Details</returns> public static F25003SitusManagementData F25003_ListSitusMangement(int parcelId, int situsId) { F25003SitusManagementData situsManagementData = new F25003SitusManagementData(); Hashtable ht = new Hashtable(); string[] optionalParameter = new string[] { situsManagementData.ListSitusManagement.TableName, situsManagementData.ListParcelValidID.TableName }; if (parcelId != -999) { ht.Add("@ParcelID", parcelId); } if (situsId != -999) { ht.Add("@SitusID", situsId); } Utility.LoadDataSet(situsManagementData, "f25003_pclst_Situs", ht, optionalParameter); return(situsManagementData); }
/// <summary> /// Handles the Load event of the F25004 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 F25004_Load(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; this.dataOnLoad = true; this.CancelButton = this.SitusEditCancelButton; ////this.SaveToolStripMenuItem.Click += new EventHandler(this.SitusEditSaveButton_Click); ////Added by Biju on 04/May/2010 to implement #6973 string situsValue = ""; this.SetMaxLength(); if (this.situsId > 0) { this.situsManagementData = this.form25004Control.WorkItem.F25003_ListSitusMangement(this.parcelIdonLoad, this.situsId); if (this.situsManagementData.ListSitusManagement.Rows.Count > 0) { this.HouseNumberTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.HouseNumberColumn].ToString(); ////int.TryParse(this.streetListManagementData.ListStreetManagement.Rows[0][this.streetListManagementData.ListStreetManagement.StreetIDColumn].ToString(), out this.currentStreetId); this.UnitNumberTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.UnitNumberColumn].ToString(); this.ZipCodeTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.ZipCodeColumn].ToString(); this.CityTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.CityColumn].ToString(); ////Commented by Biju on 04/May/2010 to implement #6973 ////this.SitusTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.SitusColumn].ToString(); ////Added by Biju on 04/May/2010 to implement #6973 situsValue = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.SitusColumn].ToString(); this.XCoordinatesTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.X_CoordColumn].ToString(); this.YCoordinatesTextBox.Text = this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.Y_CoordColumn].ToString(); int.TryParse(this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.UnitIDColumn].ToString(), out this.unitId); int.TryParse(this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.StreetIDColumn].ToString(), out this.streetId); int.TryParse(this.situsManagementData.ListSitusManagement.Rows[0][this.situsManagementData.ListSitusManagement.StreetIDColumn].ToString(), out this.currentStreetId); this.SitusIDAuditlinkLabel.Enabled = true; this.SitusIDAuditlinkLabel.Text = "tTs_Situs [SitusID] " + this.situsId; } else { this.SitusIDAuditlinkLabel.Text = "tTs_Situs [SitusID] " + ""; this.SitusIDAuditlinkLabel.Enabled = false; } } else { this.pageMode = TerraScanCommon.PageModeTypes.New; this.ClearSitusEdit(); this.SitusIDAuditlinkLabel.Text = "tTs_Situs [SitusID] " + ""; this.SitusIDAuditlinkLabel.Enabled = false; } this.LoadStreetName(); this.LoadUnitType(); ////Added by Biju on 04/May/2010 to implement #6973 this.SitusTextBox.Text = situsValue; //// commented to Fix an issue due to New TSCO# 7167 ////to fill the Zip code and city textbox // this.FillZipCodeAndCityTextBox(); this.EnablesaveCancelButton(false); this.pageMode = TerraScanCommon.PageModeTypes.View; this.dataOnLoad = false; } catch (SoapException ex1) { ExceptionManager.ManageException(ex1, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm); } finally { this.Cursor = Cursors.Default; } }