Example #1
0
        private void RetrieveDetails(string Keyword)
        {
            clsGlossary        obj       = new clsGlossary();
            clsGlossaryDetails objdetail = new clsGlossaryDetails();

            objdetail = obj.Retrievewithkeyword(Keyword);
            if (objdetail != null)
            {
                //rtbExplain.Clear();
                lblNoorpa.Text  = string.Empty;
                lblExplain.Text = string.Empty;
                lblWord.Text    = string.Empty;


                lblWord.Text = "சொல் : " + Keyword;

                lblChapter.Text = "இயல் : " + objdetail.Chapter;


                if (!string.IsNullOrEmpty(objdetail.Noorpa))
                {
                    lblNoorpa.Text = "நூற்பா : " + Environment.NewLine + "      " + objdetail.Noorpa;
                }
                //rtbExplain.Text = objdetail.Explanation;
                lblExplain.Text = "விளக்கம் : " + Environment.NewLine + "      " + objdetail.Explanation;
            }
        }
        public clsGlossaryDetails Retrievewithkeyword(string Keyword)
        {
            clsGlossaryDetails objDetail = new clsGlossaryDetails();
            XmlNode            node      = null;

            initialize();
            string Query = "/Tolkappiyam/TechnicalTerm[Keyword = '" + Keyword + "']";

            node = xmlDoc.SelectSingleNode(Query);

            if (node != null)
            {
                objDetail.Keyword     = node["Keyword"].InnerXml.ToString().Trim();
                objDetail.Explanation = node["Explanation"].InnerXml.ToString() + node["Explanation1"].InnerXml.ToString();
                objDetail.Noorpa      = node["Noorpa"].InnerXml.ToString().Trim();
                objDetail.Chapter     = node["Chapter"].InnerXml.ToString().Trim();
            }

            return(objDetail);
        }
        private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            clsGlossary        obj       = new clsGlossary();
            clsGlossaryDetails objdetail = new clsGlossaryDetails();

            if ((!(e.Node.Text == "எழுத்ததிகாரம்" || e.Node.Text == "சொல்லதிகாரம்" || e.Node.Text == "பொருளதிகாரம்")) && (!(e.Node.Parent.Text == "எழுத்ததிகாரம்" || e.Node.Parent.Text == "சொல்லதிகாரம்" || e.Node.Parent.Text == "பொருளதிகாரம்")))
            {
                string Keyword = e.Node.Text;
                string Chapter = e.Node.Parent.Text;
                //MessageBox.Show(Keyword + "," + Chapter);
                objdetail = obj.Retrievewithkeyword(Chapter, Keyword);
                if (objdetail != null)
                {
                    //rtbExplain.Clear();
                    lblDisplay.Text = string.Empty;
                    lblExplain.Text = string.Empty;


                    lblDisplay.Text = objdetail.Division + "-->" + objdetail.Chapter + "-->" + objdetail.Keyword;
                    //rtbExplain.Text = objdetail.Explanation;
                    lblExplain.Text = objdetail.Explanation;
                }
            }
        }