public override global::System.Data.DataSet Clone()
        {
            F84726WaterPipeLocationData cln = ((F84726WaterPipeLocationData)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
Exemplo n.º 2
0
        /// <summary>
        /// To Load Water Pipe Location.
        /// </summary>
        /// <param name="pipeId">The Pipe Id.</param>
        /// <returns>Typed Dataset Containg the Water Pipe Location Details.</returns>
        public static F84726WaterPipeLocationData F84726_GetWaterPipeLocation(int pipeId)
        {
            F84726WaterPipeLocationData waterPipeLocationData = new F84726WaterPipeLocationData();
            Hashtable ht = new Hashtable();

            ht.Add("@PipeID", pipeId);
            Utility.LoadDataSet(waterPipeLocationData.GetWaterPipeLocationDataTable, "f84726_pcget_FS_WaterPipeLocation", ht);
            return(waterPipeLocationData);
        }
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            F84726WaterPipeLocationData ds = new F84726WaterPipeLocationData();

            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);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Customizes the water Pipe location.
        /// </summary>
        private void CustomizeWaterPipeLocation()
        {
            this.waterPipeLocationData = this.form84726Control.WorkItem.F84726_GetWaterPipeLocation(this.pipeId);
            if (this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows.Count > 0)
            {
                this.ElevationTextBox.Text       = this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.ElevationColumn].ToString();
                this.DepthTextBox.Text           = this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.DepthColumn].ToString();
                this.DistrictProjectTextBox.Text = this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.District_ProjectColumn].ToString();
                this.LocationNotesTextBox.Text   = this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.LocationDescriptionColumn].ToString();

                this.administrativeAreaId = Convert.ToInt32(this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.AdministrativeAreaIDColumn]);
                this.operationalAreaId    = Convert.ToInt32(this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.OperationalAreaIDColumn]);
                this.gridId = Convert.ToInt32(this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows[0][this.waterPipeLocationData.GetWaterPipeLocationDataTable.GridIDColumn]);
            }
            else
            {
                this.ClearWaterPipeLocationControls();
                this.LockControls(false);
            }

            ////To Load All The ComBoBoxs
            this.LoadAllComboBox();
        }
            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();
                F84726WaterPipeLocationData ds = new F84726WaterPipeLocationData();

                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 = "GetWaterPipeLocationDataTableDataTable";
                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);
            }
Exemplo n.º 6
0
        /// <summary>
        /// Saves the water pipe location.
        /// </summary>
        private void SaveWaterPipeLocation()
        {
            decimal tempElevation;
            decimal tempDepth;

            F84726WaterPipeLocationData waterPipeLocationData1 = new F84726WaterPipeLocationData();

            //this.waterPipeLocationData.GetWaterPipeLocationDataTable.Rows.Clear();
            F84726WaterPipeLocationData.GetWaterPipeLocationDataTableRow dr = waterPipeLocationData1.GetWaterPipeLocationDataTable.NewGetWaterPipeLocationDataTableRow();

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

            if (!string.IsNullOrEmpty(this.ElevationTextBox.Text.Trim()))
            {
                Decimal.TryParse(this.ElevationTextBox.Text.Trim(), out tempElevation);
                dr.Elevation = tempElevation;
            }

            if (!string.IsNullOrEmpty(this.DepthTextBox.Text.Trim()))
            {
                Decimal.TryParse(this.DepthTextBox.Text.Trim(), out tempDepth);
                dr.Depth = tempDepth;
            }

            if (!string.IsNullOrEmpty(this.LocationNotesTextBox.Text.Trim()))
            {
                dr.LocationDescription = this.LocationNotesTextBox.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;
            }

            waterPipeLocationData1.GetWaterPipeLocationDataTable.Rows.Add(dr);
            this.pipeId = this.form84726Control.WorkItem.F84726_SaveWaterPipeLocation(this.pipeId, (Utility.GetXmlString(waterPipeLocationData1.GetWaterPipeLocationDataTable.Copy())), TerraScanCommon.UserId);
            ////to sent the this keyid(this.pipeId)
            SliceReloadActiveRecord currentKeyIdInfo;

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