Exemplo n.º 1
0
        public void OnD9030_F9030_EnableNewMethod(object sender, EventArgs eventArgs)
        {
            if (WebSliceWebBrowser.Document != null)////Added by Biju on 12/Apr/2010 to fix #6421
            {
                mshtml.IHTMLWindow2 win = (mshtml.IHTMLWindow2)WebSliceWebBrowser.Document.Window.DomWindow;
                win.execScript("if(typeof tsNew=='function')tsNew();", "javascript");
            }
            if (eventArgs.ToString().Equals("91000"))
            {
                this.keyId = -99;

                datasetf95010GetWebFormXMLData          = new F95010GetWebFormXMLData();
                datasetf95010GetWebFormXMLData          = this.form95010Control.WorkItem.GetWebFormXML(this.keyId, this.currentFormNo, TerraScanCommon.UserId);
                this.WebSliceWebBrowser.AllowNavigation = true;

                this.formHeight = this.GetFormHeight();
                this.SetFormHeight();

                if (datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows.Count > 0)
                {
                    xmlTestDocument = datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows[0][datasetf95010GetWebFormXMLData.F95010GetWebFormXML.XmlDocumentColumn.ColumnName].ToString();

                    ////this.WebSliceWebBrowser.DocumentText = xmlTestDocument.ToString();
                    this.WebSliceWebBrowser.Navigate(xmlTestDocument);
                }
                else
                {
                    this.WebSliceWebBrowser.DocumentText = "about:blank";
                }
                this.pageMode = TerraScanCommon.PageModeTypes.Edit;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Handles the Load event of the F9510 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 F9510_Load(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         this.WebSliceWebBrowser.ObjectForScripting = this;
         this.datasetf95010GetWebFormXMLData        = new F95010GetWebFormXMLData();
         ////Get Form Number
         int formId = (int)this.Tag;
         this.datasetf95010GetWebFormXMLData = this.form9510Control.WorkItem.GetWebFormXML(formId, TerraScanCommon.UserId);
         if (this.datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows.Count > 0)
         {
             string xmlTestDocument = this.datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows[0][this.datasetf95010GetWebFormXMLData.F95010GetWebFormXML.XmlDocumentColumn.ColumnName].ToString();
             ////Set navigate url for WebBrowser
             this.WebSliceWebBrowser.Navigate(xmlTestDocument);
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Handles the Load event of the F1207 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 F1207_Load(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                // sets an object that can be accessed by scripting code that is contained within a Web page displayed in the WebBrowser control.
                this.WebSliceWebBrowser.ObjectForScripting = this;

                this.datasetGetWebFormData = new F95010GetWebFormXMLData();

                // DataBase call for: Procedure f95010_pcget_WebFormXML(KeyId, FormId, UserId)
                this.datasetGetWebFormData = this.form1207Control.WorkItem.GetWebFormDetails(null, 1207, TerraScanCommon.UserId);

                if (this.datasetGetWebFormData.F95010GetWebFormXML.Rows.Count > 0)
                {
                    string displayDocument = this.datasetGetWebFormData.F95010GetWebFormXML.Rows[0][this.datasetGetWebFormData.F95010GetWebFormXML.XmlDocumentColumn.ColumnName].ToString();

                    // Loads the document at the specified URL into the WebBrowser control
                    this.WebSliceWebBrowser.Navigate(displayDocument);
                }
            }
            catch (SoapException ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            catch (Exception ex)
            {
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemplo n.º 4
0
        public override global::System.Data.DataSet Clone()
        {
            F95010GetWebFormXMLData cln = ((F95010GetWebFormXMLData)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Gets the webformXML.
        /// </summary>
        /// <param name="form">form</param>
        /// <param name="userId">UserID</param>
        /// <returns>Typed dataset</returns>
        public static F95010GetWebFormXMLData GetWebFormXML(int form, int userId)
        {
            F95010GetWebFormXMLData form9510getwebFormXMLData = new F95010GetWebFormXMLData();
            Hashtable ht = new Hashtable();

            ht.Add("@Form", form);
            ht.Add("@UserID", userId);
            Utility.LoadDataSet(form9510getwebFormXMLData, "f9510_pcget_WebFormURL", ht, new string[] { form9510getwebFormXMLData.F95010GetWebFormXML.TableName });
            return(form9510getwebFormXMLData);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Gets the webformXML.
        /// </summary>
        /// <param name="keyId">keyid</param>
        /// <param name="form">form</param>
        /// <param name="userId">UserID</param>
        /// <returns>Typed dataset</returns>
        public static F95010GetWebFormXMLData GetWebFormXML(int?keyId, int form, int userId)
        {
            F95010GetWebFormXMLData form95010getwebFormXMLData = new F95010GetWebFormXMLData();
            Hashtable ht = new Hashtable();

            ht.Add("@KeyID", keyId);
            ht.Add("@Form", form);
            ht.Add("@UserID", userId);
            string[] tableName = new string[] { form95010getwebFormXMLData.F95010GetWebFormXML.TableName, form95010getwebFormXMLData.WebFormHeight.TableName };
            Utility.LoadDataSet(form95010getwebFormXMLData, "f95010_pcget_WebFormXML", ht, tableName);
            return(form95010getwebFormXMLData);
        }
Exemplo n.º 7
0
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            F95010GetWebFormXMLData ds = new F95010GetWebFormXMLData();

            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.º 8
0
        public void OnD9030_F9030_LoadSliceDetails(object sender, DataEventArgs <SliceReloadActiveRecord> eventArgs)
        {
            try
            {
                if (this.currentMasterFormNo == eventArgs.Data.MasterFormNo)
                {
                    //if (!this.isSaveMode)
                    //{
                    this.flagFormLoad = true;
                    this.WebSliceWebBrowser.ScrollBarsEnabled = true;
                    this.FlagSliceForm = true;
                    this.keyId         = eventArgs.Data.SelectedKeyId;

                    // this.currentFormNo = eventArgs.Data.SelectedKeyId;
                    //F95010GetWebFormXMLData
                    datasetf95010GetWebFormXMLData = new F95010GetWebFormXMLData();
                    datasetf95010GetWebFormXMLData = this.form95011Control.WorkItem.GetWebFormXML(this.keyId, this.currentFormNo, TerraScanCommon.UserId);

                    this.formHeight = this.GetFormHeight();
                    this.SetFormHeight();

                    if (datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows.Count > 0)
                    {
                        xmlTestDocument = datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows[0][datasetf95010GetWebFormXMLData.F95010GetWebFormXML.XmlDocumentColumn.ColumnName].ToString();

                        ////this.WebSliceWebBrowser.DocumentText = xmlTestDocument.ToString();
                        if (!string.IsNullOrEmpty(xmlTestDocument))
                        {
                            this.WebSliceWebBrowser.Navigate(xmlTestDocument);
                        }
                    }
                    //else
                    //{
                    //    this.WebSliceWebBrowser.DocumentText = string.Empty;
                    //}
                    this.previousUrl  = string.Empty;
                    this.flagFormLoad = false;
                    //}
                    //else
                    //{
                    //    this.isSaveMode = false;
                    //}
                }
            }
            catch (Exception ex)
            {
                F95012.IsQuickFindFlag = true;
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// Handles the Load event of the F95010 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 F95010_Load(object sender, EventArgs e)
        {
            try
            {
                this.flagFormLoad = true;
                //this.WebSlicePanel.Location = new System.Drawing.Point(-2, -2);
                this.WebSliceWebBrowser.ScrollBarsEnabled = true;
                this.FlagSliceForm = true;
                this.WebSliceWebBrowser.ObjectForScripting = this;
                this.loadedUrl = string.Empty;
                this.pageMode  = TerraScanCommon.PageModeTypes.View;
                // this.WebSliceWebBrowser.Url = new Uri(@"http://google.co.in?sid=102001&9002P1=5&9002P2=1&9002PF=91000");
                // this.WebSliceWebBrowser.Url = new Uri(@"http://google.co.in");
                //F95010GetWebFormXMLData
                datasetf95010GetWebFormXMLData = new F95010GetWebFormXMLData();
                datasetf95010GetWebFormXMLData = this.form95010Control.WorkItem.GetWebFormXML(this.keyId, this.currentFormNo, TerraScanCommon.UserId);

                this.formHeight = this.GetFormHeight();
                this.SetFormHeight();

                if (datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows.Count > 0)
                {
                    string xmlTestDocument = datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows[0][datasetf95010GetWebFormXMLData.F95010GetWebFormXML.XmlDocumentColumn.ColumnName].ToString();

                    this.WebSliceWebBrowser.Navigate(xmlTestDocument);
                }
            }
            catch (Exception ex)
            {
                F95012.IsQuickFindFlag = true;
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                // this.flagFormLoad = false;
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// Handles the Load event of the F95010 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 F95011_Load(object sender, EventArgs e)
        {
            try
            {
                this.flagFormLoad = true;
                this.WebSliceWebBrowser.ScrollBarsEnabled = true;
                this.FlagSliceForm = true;
                this.WebSliceWebBrowser.ObjectForScripting = this;

                this.pageMode = TerraScanCommon.PageModeTypes.View;
                // this.WebSliceWebBrowser.Url = new Uri(@"http://google.co.in?sid=102001&9002P1=5&9002P2=1&9002PF=91000");
                // this.WebSliceWebBrowser.Url = new Uri(@"http://google.co.in");
                //F95010GetWebFormXMLData
                datasetf95010GetWebFormXMLData = new F95010GetWebFormXMLData();
                datasetf95010GetWebFormXMLData = this.form95011Control.WorkItem.GetWebFormXML(this.keyId, this.currentFormNo, TerraScanCommon.UserId);

                this.formHeight = this.GetFormHeight();
                this.SetFormHeight();

                if (datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows.Count > 0)
                {
                    string xmlTestDocument = datasetf95010GetWebFormXMLData.F95010GetWebFormXML.Rows[0][datasetf95010GetWebFormXMLData.F95010GetWebFormXML.XmlDocumentColumn.ColumnName].ToString();

                    ////string text = this.form95010Control.WorkItem.GetWebBrowserStringValue(xmlTestDocument);
                    // this.WebSliceWebBrowser.DocumentText = xmlTestDocument.ToString();

                    this.WebSliceWebBrowser.Navigate(xmlTestDocument);
                    //this.WebSliceWebBrowser.Navigate("www.google.com");
                    ////this.WebSliceWebBrowser.DocumentText = text.ToString();
                    //// this.WebSliceWebBrowser.Show();

                    //if (xmlTestDocument != string.Empty)
                    //{
                    //    this.WebSliceWebBrowser.DocumentText = xmlTestDocument;
                    //    //string filepath = Environment.SpecialFolder.LocalApplicationData.ToString();

                    //    ////StreamWriter sw = new StreamWriter(filepath + "\\" + "Temp.Xml");
                    //    ////sw.Write(xmlDocument);
                    //    ////sw.Close();

                    //    //string path = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + "Temp.Xml";
                    //   // if (!File.Exists(path))
                    //    //{
                    //        // Create a file to write to.
                    //     //   using (StreamWriter sw = File.CreateText(path))
                    //     //   {
                    //     //       sw.Write(xmlDocument);
                    //     //   }
                    //   // }

                    //    //this.WebSliceWebBrowser.Url = new System.Uri(path, System.UriKind.Absolute);
                    //}
                    //Sample subClass = new Sample();
                    //subClass.LoadSample();
                }
            }
            catch (Exception ex)
            {
                F95012.IsQuickFindFlag = true;
                ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
            }
            finally
            {
                // this.flagFormLoad = false;
            }
        }
Exemplo n.º 11
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();
                F95010GetWebFormXMLData ds = new F95010GetWebFormXMLData();

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