public override global::System.Data.DataSet Clone() { F9610QuickFind cln = ((F9610QuickFind)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
/// <summary> /// F9610s the quick find. /// </summary> /// <param name="form">The form.</param> /// <param name="keyword">The keyword.</param> /// <returns></returns> public static F9610QuickFind F9610QuickFind(int form,string keyword) { F9610QuickFind quickfinditems = new F9610QuickFind(); Hashtable ht = new Hashtable(); ht.Add("@Form", form); ht.Add("@KeyWord", keyword); string[] tableName = new string[] { quickfinditems.F9610_GetQuickFindItem.TableName, quickfinditems.F9610_GetQuickFindRows.TableName }; Utility.LoadDataSet(quickfinditems, "f9610_pcget_QuickFind", ht, tableName); return quickfinditems; }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { F9610QuickFind ds = new F9610QuickFind(); 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> /// Handles the Click event of the FindButton 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 FindButton_Click(object sender, EventArgs e) { try { string findvalue = string.Empty; if (!string.IsNullOrEmpty((this.FindTextBox.Text.Trim()))) { if (this.FindTextBox.Text.Trim().Contains("'")) { findvalue = this.FindTextBox.Text.Trim().Replace("'", "''"); } else { findvalue = this.FindTextBox.Text.Trim(); } this.quickfinditem.F9610_GetQuickFindItem.Clear(); this.quickfinditem = this.form9610Control.WorkItem.F9610QuickFind(this.formno, findvalue); this.CustomizeGridView(); if (this.quickfinditem.F9610_GetQuickFindItem.Rows.Count > 0) { this.findRowIndex = 0; this.FindListDataGridView.DataSource = null; this.FindListDataGridView.DataSource = this.quickfinditem.F9610_GetQuickFindItem.DefaultView; int.TryParse(this.quickfinditem.F9610_GetQuickFindItem.Rows[0]["KeyID"].ToString(), out this.tempKeyId); if (this.FindListDataGridView.OriginalRowCount > 10) { this.MasterNameVerticalScroll.Visible = false; } else { this.MasterNameVerticalScroll.Visible = true; } if (this.quickfinditem.F9610_GetQuickFindRows.Count > 0) { noofrows = this.quickfinditem.F9610_GetQuickFindRows[0]["NoOFRows"].ToString(); if (int.Parse(noofrows) > 0) { this.RecordCountLabel.Text = 1 + " / " + noofrows + " " + "Found"; this.PreviewButton.Enabled = true; this.CloseButton.Enabled = true; } else { this.PreviewButton.Enabled = false; this.CloseButton.Enabled = false; this.RecordCountLabel.Text = "None Found"; } } } else { this.FindListDataGridView.DataSource = null; this.RecordCountLabel.Text = "0 record(s) match."; this.MasterNameVerticalScroll.Visible = true; this.PreviewButton.Enabled = false; this.CloseButton.Enabled = false; } } else { this.FindListDataGridView.DataSource = null; this.RecordCountLabel.Text = null; this.MasterNameVerticalScroll.Visible = true; this.PreviewButton.Enabled = false; this.CloseButton.Enabled = false; } } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } finally { if (this.quickfinditem.F9610_GetQuickFindRows.Rows.Count > 0) { this.FormMaster_FormVisibility(true); } } }
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(); F9610QuickFind ds = new F9610QuickFind(); 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 = "F9610_GetQuickFindRowsDataTable"; 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); }