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

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            ExciseRateDistrictSelectionData ds = new ExciseRateDistrictSelectionData();

            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);
        }
        /// <summary>
        /// Lists the excise rate district.
        /// </summary>
        /// <param name="district">The district.</param>
        /// <param name="year">The year.</param>
        /// <param name="description">The description.</param>
        /// <returns>The typed dataset containing the ExciseTaxReceipt information based on statementId</returns>
        public static ExciseRateDistrictSelectionData ListExciseRateDistrict(string district, int year, string description)
        {
            ExciseRateDistrictSelectionData exciseRateDistrictSelectionData = new ExciseRateDistrictSelectionData();
            Hashtable ht = new Hashtable();

            ////if (district != -999)
            ////{
            ht.Add("@District", district);
            ////}

            if (year != -999)
            {
                ht.Add("@Year", year);
            }

            if (!string.IsNullOrEmpty(description))
            {
                ht.Add("@Description", description);
            }

            Utility.LoadDataSet(exciseRateDistrictSelectionData.ListExciseRateDistrict, "f1102_pclst_ExciseRateDistrict", ht);
            return(exciseRateDistrictSelectionData);
        }
Пример #4
0
        /// <summary>
        /// Populates the search results.
        /// </summary>
        private void PopulateSearchResults()
        {
            int tempDistrict = 0;
            int tempYear     = 0;

            //if (!int.TryParse(this.DistrictTextBox.Text, out tempDistrict))
            //{
            //    tempDistrict = -999;
            //}

            if (!int.TryParse(this.YearTextBox.Text, out tempYear))
            {
                tempYear = -999;
            }

            if (string.IsNullOrEmpty(this.DistrictTextBox.Text.Trim()) && string.IsNullOrEmpty(this.YearTextBox.Text.Trim()) && string.IsNullOrEmpty(this.DescriptionTextBox.Text.Trim()))
            {
                this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict.Rows.Clear();
                //// Assing Data Count
                this.exciseRateDistrictDataCount = this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict.Rows.Count;
                this.ExciseRateDistrictSelectionGridView.DataSource = this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict;
                //// IF No Record Disable the Grid
                this.ExciseRateDistrictSelectionGridView.Enabled = false;
            }
            else
            {
                //int district = 0;
                //int.TryParse(this.DistrictTextBox.Text.Trim(), out district);
                this.exciseRateDistrictSelectionDataSet = this.form1102Control.WorkItem.ListExciseRateDistrict(this.DistrictTextBox.Text.Trim(), tempYear, this.DescriptionTextBox.Text.Trim());
                //this.exciseRateDistrictSelectionDataSet = this.form1102Control.WorkItem.ListExciseRateDistrict(district, tempYear, this.DescriptionTextBox.Text.Trim());
            }

            if (this.exciseRateDistrictSelectionDataSet != null)
            {
                if (this.exciseRateDistrictSelectionDataSet.Tables.Count > 0)
                {
                    if (this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict.Rows.Count > 0)
                    {
                        this.SearchResultLabel.Text = this.exciseRateDistrictSelectionDataSet.Tables[0].Rows.Count.ToString() + " record(s) match.";
                        //// Assing Data Count
                        this.exciseRateDistrictDataCount = this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict.Rows.Count;
                        ////  Record Enable the Grid
                        this.ExciseRateDistrictSelectionGridView.Enabled    = true;
                        this.ExciseRateDistrictSelectionGridView.DataSource = this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict;
                        this.ExciseRateDistrictSelectionGridView.Focus();
                        this.ExciseRateDistrictSelectionGridView.Rows[0].Selected = true;
                        if (this.exciseRateDistrictSelectionDataSet.Tables[0].Rows.Count > 5)
                        {
                            this.DistrictSelectionVscrollBar.Visible = false;
                        }
                        else
                        {
                            this.DistrictSelectionVscrollBar.Visible = true;
                        }

                        this.DistrictSelectAcceptButton.Enabled = true;
                    }
                    else
                    {
                        //// Assign Data Count
                        this.exciseRateDistrictDataCount = this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict.Rows.Count;
                        ////  Record Enable the Grid
                        this.ExciseRateDistrictSelectionGridView.Enabled = false;
                        this.SearchResultLabel.Text = this.exciseRateDistrictSelectionDataSet.Tables[0].Rows.Count.ToString() + SharedFunctions.GetResourceString("9101MasterNameSearch");
                        this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict.Rows.Clear();
                        this.ExciseRateDistrictSelectionGridView.DataSource  = this.exciseRateDistrictSelectionDataSet.ListExciseRateDistrict;
                        this.ExciseRateDistrictSelectionGridView.CurrentCell = null;
                        this.DistrictSelectionVscrollBar.Visible             = true;
                        this.DistrictSelectAcceptButton.Enabled = false;
                    }
                }
            }
        }
            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();
                ExciseRateDistrictSelectionData ds = new ExciseRateDistrictSelectionData();

                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 = "ListExciseRateDistrictDataTable";
                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);
            }