Exemplo n.º 1
0
        /// <summary>
        /// Transforms the XML to result table.
        /// </summary>
        /// <param name="responseXml">The response XML.</param>
        /// <param name="textReader">The text reader.</param>
        /// <param name="currentPageNumber">The current page number.</param>
        /// <param name="sortByColumn">The sort by column.</param>
        /// <param name="sortOrder">The sort order.</param>
        /// <param name="searchType">Type of the search.</param>
        /// <param name="activeDiv">The active div.</param>
        protected void TransformXmlToResultTable(XmlDocument responseXml, XmlTextReader textReader,
                                              string currentPageNumber, string sortByColumn, string sortOrder,
                                              string searchType, string activeDiv)
        {
            XslCompiledTransform xslTransform = null;
            XmlDocument objXmlDocForXSL = null;
            XsltArgumentList xsltArgsList = null;
            DateTimeConvertor objDateTimeConvertor = null;
            object objSessionUserPreference = null;
            int intRecordCount = 0;
            Pagination objPagination = null;

            if(responseXml != null && textReader != null)
            {
                xslTransform = new XslCompiledTransform();
                objXmlDocForXSL = new XmlDocument();
                //Inititlize the XSL
                objXmlDocForXSL.Load(textReader);
                xslTransform.Load(objXmlDocForXSL);
                xsltArgsList = new XsltArgumentList();
                objSessionUserPreference = CommonUtility.GetSessionVariable(Page, enumSessionVariable.UserPreferences.ToString());
                /// get count of records per page from User's Preference if set
                if(objSessionUserPreference != null)
                {
                    /// read the User Preferences from the session.
                    objPreferences = (UserPreferences)objSessionUserPreference;
                    if(string.IsNullOrEmpty(strDepthUnit))
                    {
                        strDepthUnit = objPreferences.DepthUnits;
                    }
                    intRecordsPerPage = Convert.ToInt16(objPreferences.RecordsPerPage);
                }
                //setting record count
                intRecordCount = GetRecordCountFromResult(responseXml, searchType);

                /// the below condition validates the sortOrder parameter value.
                if(string.IsNullOrEmpty(sortOrder))
                {
                    sortOrder = SORTDEFAULTORDER;
                }
                if(string.IsNullOrEmpty(sortByColumn))
                    sortByColumn = string.Empty;

                /// Add the required parameters to the XsltArgumentList object
                /// passing parameters to XSL
                ///creating Pagination related parameter
                objPagination = new Pagination(Convert.ToInt32(currentPageNumber), intRecordCount, intRecordsPerPage, blnSkipCountEnabled);

                CreatePaginationXslParameter(ref xsltArgsList, objPagination);
                GetDataQualityRange(ref xsltArgsList);
                objDateTimeConvertor = new DateTimeConvertor();
                xsltArgsList.AddExtensionObject("urn:DATE", objDateTimeConvertor);
                xsltArgsList.AddParam(ACTIVEDIV, string.Empty, activeDiv);
                xsltArgsList.AddParam(SORTCOLUMN, string.Empty, sortByColumn);
                xsltArgsList.AddParam(SORTORDER, string.Empty, sortOrder);
                xsltArgsList.AddParam(SEARCHTYPEPARAMETER, string.Empty, searchType.ToLowerInvariant());
                xsltArgsList.AddParam(USERPREFERENCELABEL, string.Empty, strDepthUnit.ToLowerInvariant());
                xsltArgsList.AddParam(FORMULAVALUETITLE, string.Empty, PIVALUE);
                xsltArgsList.AddParam(COLUMNNAMES, string.Empty, strColNames);
                xsltArgsList.AddParam(COLUMNDISPLAYSTATUS, string.Empty, strColDisplayStatus);
                xsltArgsList.AddParam(PRESSUREUNIT, string.Empty, strPressureUnit.ToLowerInvariant());
                xsltArgsList.AddParam(TEMPERATUREUNIT, string.Empty, strTemperatureUnit);
                xsltArgsList.AddParam(REORDERDIVHTML, string.Empty, strReorderDivHTML);
                if(hidRowSelectedCheckBoxes != null)
                    xsltArgsList.AddParam(PARAMROWSELECTEDCHECKBOXES, string.Empty, hidRowSelectedCheckBoxes.Value);
                if(hidColSelectedCheckBoxes != null)
                    xsltArgsList.AddParam(PARAMCOLSELECTEDCHECKBOXES, string.Empty, hidColSelectedCheckBoxes.Value);
                xsltArgsList.AddParam(ASSETCOLNAME, string.Empty, GetAssetNameCol(hidAssetName.Value));
                StringBuilder builder = new StringBuilder();
                StringWriter stringWriter = new StringWriter(builder);
                xslTransform.Transform(responseXml, xsltArgsList, stringWriter);
                strResultTable = stringWriter.GetStringBuilder();
            }
            else
            {
                throw new Exception("Invalid Arguments");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Transforms the search results to XSL.
        /// </summary>
        /// <param name="document">The document.</param>
        /// <param name="textReader">The text reader.</param>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="sortByColumn">The sort by column.</param>
        /// <param name="sortOrder">The sort order.</param>
        /// <param name="searchType">Type of the search.</param>
        /// <param name="maxRecords">The max records.</param>
        /// <param name="windowTitle">The window title.</param>
        /// <param name="recordCount">The record count.</param>
        /// <param name="activeDiv">The active div.</param>
        protected void TransformSearchResultsToXSL(XmlDocument document, XmlTextReader textReader,
                                                string pageNumber, string sortByColumn, string sortOrder,
                                                string searchType, int maxRecords, string windowTitle, int recordCount, string activeDiv)
        {
            XslTransform xslTransform = null;
            XmlDocument objXmlDocForXSL = null;
            XsltArgumentList xsltArgsList = null;
            XmlNodeList objXmlNodeList = null;
            XPathDocument objXPathDocument = null;
            MemoryStream objMemoryStream = null;
            DateTimeConvertor objDateTimeConvertor = null;

            ServiceProvider objFactory = new ServiceProvider();
            //calls the appropriate factory class from the controller layer.
            objMossController = objFactory.GetServiceManager(MOSSSERVICE);

            int intPageNumber = 0;

            int intRecordCount = 0;
            double dblCurrentPage = 0D;
            string strSortOrder = SORTDEFAULTORDER;
            string strRequestID = string.Empty;
            object objSessionUserPreference = null;

            try
            {
                if(document != null && textReader != null)
                {
                    /// Inititlize the system and custom objects
                    objCommonUtility = new CommonUtility();
                    xslTransform = new XslTransform();
                    objXmlDocForXSL = new XmlDocument();
                    xsltArgsList = new XsltArgumentList();
                    objPreferences = new UserPreferences();
                    objMemoryStream = new MemoryStream();
                    document.Save(objMemoryStream);
                    objMemoryStream.Position = 0;
                    objXPathDocument = new XPathDocument(objMemoryStream);

                    /// Inititlize the XSL
                    objXmlDocForXSL.Load(textReader);
                    xslTransform.Load(objXmlDocForXSL);
                    /// the below condition validates the pageNumber parameter value.
                    if(pageNumber.Length > 0)
                    {
                        intPageNumber = Convert.ToInt32(pageNumber);
                    }
                    /// the below condition validates the sortOrder parameter value.
                    if(sortOrder.Length > 0)
                    {
                        strSortOrder = sortOrder;
                    }
                    objSessionUserPreference = CommonUtility.GetSessionVariable(Page, enumSessionVariable.UserPreferences.ToString());
                    /// get count of records per page from User's Preference if set
                    if(objSessionUserPreference != null)
                    {
                        /// read the User Preferences from the session.
                        objPreferences = (UserPreferences)objSessionUserPreference;
                        if(string.IsNullOrEmpty(strDepthUnit))
                        {
                            strDepthUnit = objPreferences.DepthUnits;
                        }
                        intRecordsPerPage = Convert.ToInt16(objPreferences.RecordsPerPage);
                    }
                    /// Get the Total Record Count
                    objXmlNodeList = document.SelectNodes(XPATH);
                    if(objXmlNodeList != null)
                    {
                        foreach(XmlNode xmlNode in objXmlNodeList)
                        {
                            intRecordCount = Convert.ToInt32(xmlNode.SelectSingleNode("recordcount").InnerXml.ToString());
                            intDetailRecordCount = intRecordCount;
                        }
                    }
                    /// the below condition validates the pageNumber parameter value.
                    if(pageNumber.Length > 0)
                    {
                        dblCurrentPage = Double.Parse(pageNumber);
                        intRecordCount = recordCount; //Added for cashing
                    }
                    /// Added for cashing
                    /// Get the Response ID
                    objXmlNodeList = document.SelectNodes("response");
                    if(objXmlNodeList != null)
                    {
                        foreach(XmlNode xmlNode in objXmlNodeList)
                        {
                            if(xmlNode.Attributes["requestid"] != null)
                            {
                                strRequestID = xmlNode.Attributes["requestid"].Value.ToString();
                            }
                        }
                    }
                    if(sortByColumn == null)
                        sortByColumn = string.Empty;
                    int intColumnsToLock = GetNumberofRecordsToLock(document, RESULTRECORDLOCKXPATH);
                    /// Add the required parameters to the XsltArgumentList object
                    GetDataQualityRange(ref xsltArgsList);

                    objDateTimeConvertor = new DateTimeConvertor();
                    #region DREAM 4.0 - Paging functionality in My Team, My Team Assets and Team Management
                    /// Multi Team Owner Implementation
                    /// Changed By: Yasotha
                    /// Date : 24-Jan-2010
                    /// Modified Lines: 435-438
                    #endregion
                    /// passing parameters to XSL
                    xsltArgsList.AddExtensionObject("urn:DATE", objDateTimeConvertor);
                    xsltArgsList.AddParam(RECORDSPERPAGE, string.Empty, intRecordsPerPage);
                    xsltArgsList.AddParam(PAGENUMBER, string.Empty, intPageNumber);
                    xsltArgsList.AddParam(ACTIVEDIV, string.Empty, activeDiv);
                    xsltArgsList.AddParam(RECORDCOUNT, string.Empty, intRecordCount);
                    xsltArgsList.AddParam(CURRENTPAGENAME, string.Empty, objCommonUtility.GetCurrentPageName(true));
                    xsltArgsList.AddParam(CURRENTPAGE, string.Empty, dblCurrentPage + 1);
                    xsltArgsList.AddParam(MAXPAGES, string.Empty, MAXPAGEVALUE);
                    xsltArgsList.AddParam(SORTCOLUMN, string.Empty, sortByColumn);
                    xsltArgsList.AddParam(SORTORDER, string.Empty, strSortOrder);
                    xsltArgsList.AddParam(COLUMNSTOLOCK, string.Empty, intColumnsToLock);
                    xsltArgsList.AddParam(SEARCHTYPEPARAMETER, string.Empty, searchType);
                    xsltArgsList.AddParam(USERPREFERENCELABEL, string.Empty, strDepthUnit.ToLower());
                    xsltArgsList.AddParam(FORMULAVALUETITLE, string.Empty, PIVALUE);
                    xsltArgsList.AddParam(MAXRECORDS, string.Empty, maxRecords);
                    /// DREAM 3.0 code
                    /// start
                    xsltArgsList.AddParam(COLUMNNAMES, string.Empty, strColNames);
                    xsltArgsList.AddParam(COLUMNDISPLAYSTATUS, string.Empty, strColDisplayStatus);
                    xsltArgsList.AddParam(PRESSUREUNIT, string.Empty, strPressureUnit.ToLowerInvariant());
                    xsltArgsList.AddParam(TEMPERATUREUNIT, string.Empty, strTemperatureUnit);//.ToLowerInvariant());
                    xsltArgsList.AddParam(REORDERDIVHTML, string.Empty, strReorderDivHTML);
                    /// end
                    if(!windowTitle.Equals("My Team Assets"))
                    {
                        xsltArgsList.AddParam(WINDOWTITLE, string.Empty, windowTitle);
                    }
                    else
                    {
                        xsltArgsList.AddParam(WINDOWTITLE, string.Empty, string.Empty);
                    }
                    xsltArgsList.AddParam(REQUESTID, string.Empty, strRequestID);
                    StringBuilder builder = new StringBuilder();
                    StringWriter stringWriter = new StringWriter(builder);
                    xslTransform.Transform(objXPathDocument, xsltArgsList, stringWriter);
                    strResultTable = stringWriter.GetStringBuilder();
                }
                else
                {
                    throw new Exception("Invalid Arguments");
                }
            }
            finally
            {
                if(objMemoryStream != null)
                {
                    objMemoryStream.Close();
                    objMemoryStream.Dispose();
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Transforms the EP catalog results to XSL.
        /// </summary>
        /// <param name="document">The document.</param>
        /// <param name="textReader">The text reader.</param>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="sortColumn">The sort column.</param>
        /// <param name="sortOrder">The sort order.</param>
        /// <param name="maxRecords">The max records.</param>
        /// <param name="windowTitle">The window title.</param>
        /// <param name="searchType">Type of the search.</param>
        protected void TransformEPCatalogResultsToXSL(XmlDocument document, XmlTextReader textReader, string pageNumber, string sortColumn, string sortOrder, int maxRecords, string windowTitle, string searchType)
        {
            XslTransform xslTransform = null;
            XmlDocument objXmlDocForXSL = null;
            XsltArgumentList xsltArgsList = null;
            XmlNodeList objXmlNodeList = null;
            XPathDocument objXPathDocument = null;
            DateTimeConvertor objDateTimeConvertor = null;
            int intPageNumber = 0;
            int intRecordCount = 0;
            double dblCurrentPage = 0D;
            string strSortXPATH = string.Empty;
            string strRequestID = string.Empty;
            object objSessionUserPreference = null;
            MemoryStream objMemoryStream = null;

            try
            {
                if(document != null && textReader != null)
                {
                    xslTransform = new XslTransform();
                    objXmlDocForXSL = new XmlDocument();
                    xsltArgsList = new XsltArgumentList();
                    objPreferences = new UserPreferences();

                    objSessionUserPreference = CommonUtility.GetSessionVariable(Page, enumSessionVariable.UserPreferences.ToString());
                    if(objSessionUserPreference != null)
                    {
                        objPreferences = (UserPreferences)objSessionUserPreference;
                        intRecordsPerPage = Convert.ToInt16(objPreferences.RecordsPerPage);
                    }

                    objMemoryStream = new MemoryStream();
                    document.Save(objMemoryStream);
                    objMemoryStream.Position = 0;
                    objXPathDocument = new XPathDocument(objMemoryStream);

                    /// Inititlize the XSL
                    objXmlDocForXSL.Load(textReader);
                    xslTransform.Load(objXmlDocForXSL);

                    /// Get the Total Record Count
                    objXmlNodeList = document.SelectNodes(EPXPATH);
                    if(objXmlNodeList != null)
                    {
                        foreach(XmlNode xmlNode in objXmlNodeList)
                        {
                            intRecordCount = Convert.ToInt32(xmlNode.SelectSingleNode("Count").InnerXml.ToString());
                        }
                    }
                    if(pageNumber.Length > 0)
                    {
                        intPageNumber = Convert.ToInt32(pageNumber);
                        /// the below condition validates the pageNumber parameter value.
                        dblCurrentPage = Double.Parse(pageNumber);
                    }
                    /// Added for cashing
                    /// Get the Response ID
                    strRequestID = (document.SelectSingleNode("ResultSet/requestid") != null ? document.SelectSingleNode("ResultSet/requestid").InnerText : string.Empty);

                    if(sortColumn == null)
                        sortColumn = string.Empty;
                    strSortXPATH = GetSortXPath(sortColumn);

                    /// Add the required parameters to the XsltArgumentList object
                    objDateTimeConvertor = new DateTimeConvertor();
                    xsltArgsList.AddExtensionObject("urn:DATE", objDateTimeConvertor);
                    xsltArgsList.AddParam("recordsPerPage", string.Empty, intRecordsPerPage);
                    xsltArgsList.AddParam(PAGENUMBER, string.Empty, intPageNumber);
                    xsltArgsList.AddParam(RECORDCOUNT, string.Empty, intRecordCount);
                    xsltArgsList.AddParam(CURRENTPAGENAME, string.Empty, HttpContext.Current.Request.Url.AbsolutePath + "?");
                    xsltArgsList.AddParam(CURRENTPAGE, string.Empty, dblCurrentPage + 1);
                    xsltArgsList.AddParam(MAXPAGES, string.Empty, 5);
                    xsltArgsList.AddParam("searchType", string.Empty, searchType);
                    xsltArgsList.AddParam(SORTCOLUMN, string.Empty, sortColumn);
                    xsltArgsList.AddParam(SORTORDER, string.Empty, sortOrder);
                    xsltArgsList.AddParam(WINDOWTITLE, string.Empty, windowTitle);
                    xsltArgsList.AddParam("SortXPath", string.Empty, strSortXPATH);
                    xsltArgsList.AddParam(MAXRECORDS, string.Empty, maxRecords);
                    xsltArgsList.AddParam(REQUESTID, string.Empty, strRequestID);
                    StringBuilder builder = new StringBuilder();
                    StringWriter stringWriter = new StringWriter(builder);
                    xslTransform.Transform(objXPathDocument, xsltArgsList, stringWriter);
                    strResultTable = stringWriter.GetStringBuilder();
                }
                else
                {
                    throw new Exception("Invalid Arguments");
                }
            }
            finally
            {
                if(objMemoryStream != null)
                    objMemoryStream.Dispose();
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Transforms the EP catalog XML to result table.
        /// </summary>
        /// <param name="responseXml">The response XML.</param>
        /// <param name="textReader">The text reader.</param>
        /// <param name="currentPageNumber">The current page number.</param>
        /// <param name="sortByColumn">The sort by column.</param>
        /// <param name="sortOrder">The sort order.</param>
        /// <param name="searchType">Type of the search.</param>
        protected void TransformEPCatalogXmlToResultTable(XmlDocument responseXml, XmlTextReader textReader,
                                              string currentPageNumber, string sortByColumn, string sortOrder,
                                              string searchType)
        {
            XslCompiledTransform xslTransform = null;
            XmlDocument objXmlDocForXSL = null;
            XsltArgumentList xsltArgsList = null;
            DateTimeConvertor objDateTimeConvertor = null;
            object objSessionUserPreference = null;
            int intRecordCount = 0;
            Pagination objPagination = null;
            string strSortXPATH = string.Empty;

            if(responseXml != null && textReader != null)
            {
                xslTransform = new XslCompiledTransform();
                objXmlDocForXSL = new XmlDocument();
                //Inititlize the XSL
                objXmlDocForXSL.Load(textReader);
                xslTransform.Load(objXmlDocForXSL);
                xsltArgsList = new XsltArgumentList();
                objSessionUserPreference = CommonUtility.GetSessionVariable(Page, enumSessionVariable.UserPreferences.ToString());
                /// get count of records per page from User's Preference if set
                if(objSessionUserPreference != null)
                {
                    /// read the User Preferences from the session.
                    objPreferences = (UserPreferences)objSessionUserPreference;
                    if(string.IsNullOrEmpty(strDepthUnit))
                    {
                        strDepthUnit = objPreferences.DepthUnits;
                    }
                    intRecordsPerPage = Convert.ToInt16(objPreferences.RecordsPerPage);
                }
                //setting record count
                intRecordCount = GetRecordCountFromResult(responseXml, searchType);

                /// the below condition validates the sortOrder parameter value.
                if(string.IsNullOrEmpty(sortOrder))
                {
                    sortOrder = SORTDEFAULTORDER;
                }
                if(string.IsNullOrEmpty(sortByColumn))
                    sortByColumn = string.Empty;
                strSortXPATH = GetSortXPath(sortByColumn);
                /// Add the required parameters to the XsltArgumentList object
                /// passing parameters to XSL
                ///creating Pagination related parameter
                objPagination = new Pagination(Convert.ToInt32(currentPageNumber), intRecordCount, intRecordsPerPage, false);
                CreatePaginationXslParameter(ref xsltArgsList, objPagination);
                objDateTimeConvertor = new DateTimeConvertor();
                xsltArgsList.AddExtensionObject("urn:DATE", objDateTimeConvertor);
                xsltArgsList.AddParam("SortXPath", string.Empty, strSortXPATH);
                xsltArgsList.AddParam(SORTCOLUMN, string.Empty, sortByColumn);
                xsltArgsList.AddParam(SORTORDER, string.Empty, sortOrder);
                xsltArgsList.AddParam(SEARCHTYPEPARAMETER, string.Empty, searchType.ToLowerInvariant());
                StringBuilder builder = new StringBuilder();
                StringWriter stringWriter = new StringWriter(builder);
                xslTransform.Transform(responseXml, xsltArgsList, stringWriter);
                strResultTable = stringWriter.GetStringBuilder();
            }
            else
            {
                throw new Exception("Invalid Arguments");
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Transforms the form search results to XSL.
        /// </summary>
        /// <param name="document">The XML document.</param>
        /// <param name="textReader">The XML text reader.</param>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="sortByColumn">The sortby column.</param>
        /// <param name="sortOrder">The sortorder.</param>
        /// <param name="searchType">Type of the search.</param>
        public StringWriter TransformSearchResultsToXSL(XmlDocument document, XmlTextReader textReader,
                                                string pageNumber, string sortByColumn, string sortOrder,
                                                string searchType, int maxRecords, string windowTitle, int recordCount, string context)
        {
            //XslCompiledTransform xslTransform = null;
            XslTransform xslTransform = null;
            XmlDocument objXmlDocForXSL = null;
            XsltArgumentList xsltArgsList = null;
            XmlNodeList objXmlNodeList = null;
            XPathDocument objXPathDocument = null;
            MemoryStream objMemoryStream = null;
            DateTimeConvertor objDateTimeConvertor = null;

            ServiceProvider objFactory = new ServiceProvider();
            objMOSSController = objFactory.GetServiceManager(MOSSSERVICE);
            strwr = new StringWriter();
            int intPageNumber = 0;

            int intRecordCount = 0;
            double dblCurrentPage = 0D;
            string strSortOrder = SORTDEFAULTORDER;
            //string strDepthUnit = string.Empty;
            string strDepthUnit = "metres";
            string strRequestID = string.Empty;

            try
            {
                if (document != null && textReader != null)
                {
                    //Inititlize the system and custom objects
                    objCommonUtility = new CommonUtility();
                    xslTransform = new XslTransform();
                    objXmlDocForXSL = new XmlDocument();
                    xsltArgsList = new XsltArgumentList();

                    objMemoryStream = new MemoryStream();
                    document.Save(objMemoryStream);
                    objMemoryStream.Position = 0;
                    objXPathDocument = new XPathDocument(objMemoryStream);

                    //Inititlize the XSL
                    objXmlDocForXSL.Load(textReader);
                    xslTransform.Load(objXmlDocForXSL);
                    //the below condition validates the pageNumber parameter value.
                    if (pageNumber.Length > 0)
                    {
                        intPageNumber = Convert.ToInt32(pageNumber);
                    }
                    //the below condition validates the sortOrder parameter value.
                    if (sortOrder.Length > 0)
                    {
                        strSortOrder = sortOrder;
                    }

                    //Get the Total Record Count
                    objXmlNodeList = document.SelectNodes(XPATH);
                    if (objXmlNodeList != null)
                    {
                        foreach (XmlNode xmlNode in objXmlNodeList)
                        {
                            intRecordCount = Convert.ToInt32(xmlNode.SelectSingleNode("recordcount").InnerXml.ToString());
                        }
                    }
                    //the below condition validates the pageNumber parameter value.
                    if (pageNumber.Length > 0)
                    {
                        dblCurrentPage = Double.Parse(pageNumber);
                        intRecordCount = recordCount; //Added for cashing
                    }
                    //Added for cashing
                    //Get the Response ID
                    objXmlNodeList = document.SelectNodes("response");
                    if (objXmlNodeList != null)
                    {
                        foreach (XmlNode xmlNode in objXmlNodeList)
                        {
                            strRequestID = xmlNode.Attributes["requestid"].Value.ToString();
                        }
                    }
                    if (sortByColumn == null)
                        sortByColumn = string.Empty;
                    int intColumnsToLock = GetNumberofRecordsToLock(document, RESULTRECORDLOCKXPATH);
                    //Add the required parameters to the XsltArgumentList object
                    GetDataQualityRange(ref xsltArgsList, context);

                    objDateTimeConvertor = new DateTimeConvertor();
                    //xsltArgsList.AddExtensionObject(EXTENSIONOBJECT, objDateTimeConvertor);
                    //xsltArgsList.AddParam(RECORDSPERPAGE, string.Empty, intRecordsPerPage);
                    //xsltArgsList.AddParam(PAGENUMBER, string.Empty, intPageNumber);
                    //xsltArgsList.AddParam(RECORDCOUNT, string.Empty, intRecordCount);
                    //xsltArgsList.AddParam(CURRENTPAGENAME, string.Empty, objCommonUtility.GetCurrentPageName(true));
                    //xsltArgsList.AddParam(CURRENTPAGE, string.Empty, dblCurrentPage + 1);
                    //xsltArgsList.AddParam(MAXPAGES, string.Empty, MAXPAGEVALUE);
                    //xsltArgsList.AddParam(SORTCOLUMN, string.Empty, sortByColumn);
                    //xsltArgsList.AddParam(SORTORDER, string.Empty, strSortOrder);
                    //xsltArgsList.AddParam(COLUMNSTOLOCK, string.Empty, intColumnsToLock);
                    //xsltArgsList.AddParam(SEARCHTYPEPARAMETER, string.Empty, searchType);
                    //xsltArgsList.AddParam(USERPREFERENCELABEL, string.Empty, strDepthUnit.ToLower());
                    //xsltArgsList.AddParam(FORMULAVALUETITLE, string.Empty, PIVALUE);
                    //xsltArgsList.AddParam(MAXRECORDS, string.Empty, maxRecords);
                    //xsltArgsList.AddParam(WINDOWTITLE, string.Empty, windowTitle);
                    //xsltArgsList.AddParam(REQUESTID, string.Empty, strRequestID);
                    //xsltArgsList.AddParam(ISSORTAPPLICABLE, string.Empty, FALSE);

                    xsltArgsList.AddExtensionObject("urn:DATE", objDateTimeConvertor);
                    xsltArgsList.AddParam(RECORDSPERPAGE, string.Empty, intRecordsPerPage);
                    xsltArgsList.AddParam(PAGENUMBER, string.Empty, intPageNumber);
                    xsltArgsList.AddParam(RECORDCOUNT, string.Empty, intRecordCount);
                    xsltArgsList.AddParam(CURRENTPAGENAME, string.Empty, objCommonUtility.GetCurrentPageName(true));
                    xsltArgsList.AddParam(CURRENTPAGE, string.Empty, dblCurrentPage + 1);
                    xsltArgsList.AddParam(MAXPAGES, string.Empty, MAXPAGEVALUE);
                    xsltArgsList.AddParam(SORTCOLUMN, string.Empty, sortByColumn);
                    xsltArgsList.AddParam(SORTORDER, string.Empty, strSortOrder);
                    xsltArgsList.AddParam(COLUMNSTOLOCK, string.Empty, intColumnsToLock);
                    xsltArgsList.AddParam(SEARCHTYPEPARAMETER, string.Empty, searchType);
                    xsltArgsList.AddParam(USERPREFERENCELABEL, string.Empty, strDepthUnit.ToLower());
                    xsltArgsList.AddParam(FORMULAVALUETITLE, string.Empty, PIVALUE);
                    xsltArgsList.AddParam(MAXRECORDS, string.Empty, maxRecords);
                    xsltArgsList.AddParam(WINDOWTITLE, string.Empty, windowTitle);
                    xsltArgsList.AddParam(REQUESTID, string.Empty, strRequestID);

                    xslTransform.Transform(objXPathDocument, xsltArgsList, strwr);
                }
                else
                {
                    throw new Exception("Invalid Arguments");
                }
                return strwr;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                if (objMemoryStream != null)
                {
                    objMemoryStream.Close();
                    objMemoryStream.Dispose();
                }
            }
        }