Esempio n. 1
0
 /// <summary>
 /// Gets the event properties.
 /// </summary>
 /// <param name="eventId">The event id.</param>
 private void GetEventProperties(int eventId)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         this.eventPropertiesDataSet = this.form8102Control.WorkItem.GetEventEngineEventProperties(eventId);
         if (this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows.Count > 0)
         {
             this.FormTextBox.Text           = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.FormColumn].ToString();
             this.NumberTextBox.Text         = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.NumberColumn].ToString();
             this.StartTextBox.Text          = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.StartColumn].ToString();
             this.StopTextBox.Text           = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.StopColumn].ToString();
             this.StructuralTextBox.Text     = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.StructuralColumn].ToString();
             this.RootsTextBox.Text          = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.RootsColumn].ToString();
             this.SummaryTextBox.Text        = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.SummaryColumn].ToString();
             this.RecommendationTextBox.Text = this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.RecommendationColumn].ToString();
             this.ReverseCheckBox.Checked    = Convert.ToBoolean(this.eventPropertiesDataSet.GetEventEngineEventProperties.Rows[0][this.eventPropertiesDataSet.GetEventEngineEventProperties.ReverseColumn].ToString());
         }
         else
         {
             this.DisableControls(false);
             ////this.EventPropertiesPanel.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Gets the Event Properties
        /// </summary>
        /// <param name="eventId">The event id.</param>
        /// <returns>returns dataset contains Event Properties Details</returns>
        public static SanitaryPipeInspectionData GetEventEngineEventProperties(int eventId)
        {
            SanitaryPipeInspectionData sanitaryPipeInspectionData = new SanitaryPipeInspectionData();
            Hashtable ht = new Hashtable();

            ht.Add("@EventID", eventId);
            Utility.LoadDataSet(sanitaryPipeInspectionData.GetEventEngineEventProperties, "f8102_pcget_FSSanPipeInspection", ht);
            return(sanitaryPipeInspectionData);
        }
Esempio n. 3
0
        /// <summary>
        /// Saves the event properties.
        /// </summary>
        private void SaveEventProperties()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                SanitaryPipeInspectionData sanitaryPipeInspectionData           = new SanitaryPipeInspectionData();
                SanitaryPipeInspectionData.SaveEventEngineEventPropertiesRow dr = sanitaryPipeInspectionData.SaveEventEngineEventProperties.NewSaveEventEngineEventPropertiesRow();

                dr.EventID = this.keyId;
                dr.Form    = this.FormTextBox.Text.Trim();
                dr.Number  = this.NumberTextBox.Text.Trim();
                dr.Start   = this.StartTextBox.Text.Trim();
                dr.Stop    = this.StopTextBox.Text.Trim();
                if (this.ReverseCheckBox.Checked == true)
                {
                    dr.Reverse = true;
                }
                else
                {
                    dr.Reverse = false;
                }

                int tempStructural;
                int.TryParse(this.StructuralTextBox.Text.Trim(), out tempStructural);
                dr.Structural = Convert.ToByte(tempStructural);

                int tempRoot;
                int.TryParse(this.RootsTextBox.Text.Trim(), out tempRoot);
                dr.Roots = Convert.ToByte(tempRoot);

                dr.Summary        = this.SummaryTextBox.Text.Trim();
                dr.Recommendation = this.RecommendationTextBox.Text.Trim();

                sanitaryPipeInspectionData.SaveEventEngineEventProperties.Rows.Add(dr);
                DataSet tempDataSet = new DataSet("Root");
                tempDataSet.Tables.Add(sanitaryPipeInspectionData.SaveEventEngineEventProperties.Copy());
                tempDataSet.Tables[0].TableName = "Table";

                this.form8102Control.WorkItem.SaveEventEngineEventProperties(tempDataSet.GetXml(), TerraScanCommon.UserId);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }