Exemple #1
0
        public override global::System.Data.DataSet Clone()
        {
            F84124SanitaryPipeLocationData cln = ((F84124SanitaryPipeLocationData)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
        /// <summary>
        ///  To Load F84124 Sanitary pipe Location.
        /// </summary>
        /// <param name="keyId">The key id.</param>
        /// <param name="formId">The form id.</param>
        /// <returns>Typed DataSet Containing All the Sanitary Pipe properties Details</returns>
        public static F84124SanitaryPipeLocationData F84124_GetSanitaryPipeLocation(int keyId, int formId)
        {
            F84124SanitaryPipeLocationData sanitaryPipeLocationData = new F84124SanitaryPipeLocationData();
            Hashtable ht = new Hashtable();

            ht.Add("@PipeID", keyId);
            ht.Add("@FormID", formId);
            Utility.LoadDataSet(sanitaryPipeLocationData.GetSanitaryPipeLocation, "f84124_pcget_FS_SanitaryPipeLocation", ht);
            return(sanitaryPipeLocationData);
        }
Exemple #3
0
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            F84124SanitaryPipeLocationData ds = new F84124SanitaryPipeLocationData();

            global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny         any      = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace))
            {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                    {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length))
                        {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) &&
                                    (s1.ReadByte() == s2.ReadByte()));)
                            {
                                ;
                            }
                            if ((s1.Position == s1.Length))
                            {
                                return(type);
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null))
                    {
                        s1.Close();
                    }
                    if ((s2 != null))
                    {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return(type);
        }
Exemple #4
0
        /// <summary>
        /// Customizes the Sanitary pipe Location.
        /// </summary>
        private void CustomizeSanitaryPipeLocation()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                this.sanitaryPipeLocationData = this.form84124Control.WorkItem.F84124_GetSanitaryPipeLocation(this.pipeId, this.formNo);
                if (this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows.Count > 0)
                {
                    this.LocationNotesTextBox.Text   = this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows[0][this.sanitaryPipeLocationData.GetSanitaryPipeLocation.LocationDescriptionColumn].ToString();
                    this.DistrictProjectTextBox.Text = this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows[0][this.sanitaryPipeLocationData.GetSanitaryPipeLocation.District_ProjectColumn].ToString();

                    this.administrativeAreaId = Convert.ToInt32(this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows[0][this.sanitaryPipeLocationData.GetSanitaryPipeLocation.AdministrativeAreaIDColumn]);
                    this.operationalAreaId    = Convert.ToInt32(this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows[0][this.sanitaryPipeLocationData.GetSanitaryPipeLocation.OperationalAreaIDColumn]);
                    this.gridId = Convert.ToInt32(this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows[0][this.sanitaryPipeLocationData.GetSanitaryPipeLocation.GridIDColumn]);
                }
                else
                {
                    this.ClearSanitaryPipeForm();
                    this.LockControls(false);
                }

                ////To Load All The ComBoBoxs
                this.LoadAllComboBox();
            }
            catch (SoapException e)
            {
                ExceptionManager.ManageException(e, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemple #5
0
        /// <summary>
        /// Saves the Sanitary Pipe location.
        /// </summary>
        private void SaveSanitaryPipeLocation()
        {
            try
            {
                string tempSanitaryPipeLocation;
                this.Cursor = Cursors.WaitCursor;

                F84124SanitaryPipeLocationData sanitaryPipeLocationData1 = new F84124SanitaryPipeLocationData();
                //this.sanitaryPipeLocationData.GetSanitaryPipeLocation.Rows.Clear();
                F84124SanitaryPipeLocationData.GetSanitaryPipeLocationRow dr = sanitaryPipeLocationData1.GetSanitaryPipeLocation.NewGetSanitaryPipeLocationRow();

                if (!string.IsNullOrEmpty(this.LocationNotesTextBox.Text.Trim()))
                {
                    dr.LocationDescription = this.LocationNotesTextBox.Text.Trim();
                }

                if (!string.IsNullOrEmpty(this.DistrictProjectTextBox.Text.Trim()))
                {
                    dr.District_Project = this.DistrictProjectTextBox.Text.Trim();
                }

                if (!string.IsNullOrEmpty(this.AdministrativeAreaComboBox.Text.Trim()))
                {
                    dr.AdministrativeAreaID = Convert.ToInt32(this.AdministrativeAreaComboBox.SelectedValue);
                }
                else
                {
                    dr.AdministrativeAreaID = 0;
                }

                if (!string.IsNullOrEmpty(this.OperationalAreaComboBox.Text.Trim()))
                {
                    dr.OperationalAreaID = Convert.ToInt32(this.OperationalAreaComboBox.SelectedValue);
                }
                else
                {
                    dr.OperationalAreaID = 0;
                }

                if (!string.IsNullOrEmpty(this.GridComboBox.Text.Trim()))
                {
                    dr.GridID = Convert.ToInt32(this.GridComboBox.SelectedValue);
                }
                else
                {
                    dr.GridID = 0;
                }

                sanitaryPipeLocationData1.GetSanitaryPipeLocation.Rows.Add(dr);

                tempSanitaryPipeLocation = Utility.GetXmlString(sanitaryPipeLocationData1.GetSanitaryPipeLocation.Copy());

                this.pipeId = this.form84124Control.WorkItem.F84124_SaveSanitaryPipeLocation(this.pipeId, tempSanitaryPipeLocation, TerraScanCommon.UserId);

                ////to sent the this keyid(this.pipeId)
                this.FormSlice_OnSave_SetKeyId(this, new DataEventArgs <int>(this.pipeId));
            }
            catch (SoapException e)
            {
                ExceptionManager.ManageException(e, ExceptionManager.ActionType.Display, this.ParentForm);
            }
            catch (Exception ex)
            {
                //////TODO : Need to find specific exception and handle it.
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemple #6
0
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                F84124SanitaryPipeLocationData ds = new F84124SanitaryPipeLocationData();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "GetSanitaryPipeLocationDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }