/// <summary>
 /// This method Saves or Upadates the values into BatchImportXML
 /// </summary>
 private void SaveOrUpdateBatchImportXML()
 {
     objBatchImport = new Shell.SharePoint.DWB.Business.DataObjects.BatchImport();
     objBatchImport.BookID = strBookID;
     objBatchImport.DefaultSharedPath = strSharedAreaPath;
     objBatchImport.UserName = GetUserName();
     string strRowFilter;
     arlPageName = new ArrayList();
     foreach (GridViewRow gdvRow in grdBatchImportConfiguration.Rows)
     {
         objPageName = new PageName();
         objPageName.Name = HttpUtility.HtmlDecode(gdvRow.Cells[0].Text);
         DataTable dtResult = objWellBookBLL.GetTypeIIIPagesForBook(strParentSiteURL, strBookID, "No");
         DataView dvResultTable;
         dvResultTable = dtResult.DefaultView;
         strRowFilter = "Page_Name = '" + objPageName.Name + "'";
         dvResultTable.RowFilter = strRowFilter;
         dtResult = dvResultTable.ToTable();
         objPageName.PageCount = dtResult.Rows.Count.ToString();
         TextBox txtSharedAreaPath = (TextBox)gdvRow.FindControl("txtSharedAreaPath");
         objSharedPath = new SharedPath();
         objSharedPath.Path = txtSharedAreaPath.Text;
         objPageName.SharedPath = objSharedPath;
         DropDownList cboFileType = (DropDownList)gdvRow.FindControl("cboFileType");
         objFileType = new FileType();
         objFileType.Type = cboFileType.SelectedItem.Text;
         objPageName.FileType = objFileType;
         DropDownList cboNamingConvention = (DropDownList)gdvRow.FindControl("cboNamingConvention");
         objFileFormat = new FileFormat();
         objFileFormat.Format = cboNamingConvention.SelectedItem.Text;
         objFileFormat.ActualFormat = cboNamingConvention.SelectedItem.Value;
         objPageName.FileFormat = objFileFormat;
         arlPageName.Add(objPageName);
     }
     objBatchImport.PageName = arlPageName;
     objBatchImports = new BatchImports();
     arlBatchImport = new ArrayList();
     arlBatchImport.Add(objBatchImport);
     objBatchImports.BatchImport = arlBatchImport;
     BatchImportXmlGeneratotorBLL objBatchImportXmlGeneratotorBLL;
     objBatchImportXmlGeneratotorBLL = new BatchImportXmlGeneratotorBLL();
     XmlDocument xmlDoc = objBatchImportXmlGeneratotorBLL.CreateBatchImportXML(objBatchImports);
     //GetXMLFileData(xmlDoc, strBookID);
     BatchImportBLL objBatchImportBLL;
     objBatchImportBLL = new BatchImportBLL();
     objBatchImportBLL.UploadToDocumentLib(strBookID, xmlDoc);
 }
        /// <summary>
        /// Creates the file format.
        /// </summary>
        /// <param name="fileFormat">The file format.</param>
        /// <param name="PageNameElement">The page name element.</param>
        private void CreateFileFormat(FileFormat fileFormat, XmlElement PageNameElement)
        {
            XmlElement FileFormatElement = objXmlDocument.CreateElement(FILEFORMAT);
            PageNameElement.AppendChild(FileFormatElement);

            //Creating type attribute for filetype node.
            if (fileFormat.Format.ToString().Length > 0)
            {
                XmlAttribute Format = objXmlDocument.CreateAttribute(FORMAT);
                FileFormatElement.Attributes.Append(Format);
                Format.Value = fileFormat.Format;
            }
            //Creating actual format attribute for filetype node.
            if (fileFormat.ActualFormat.ToString().Length > 0)
            {
                XmlAttribute ActualFormat = objXmlDocument.CreateAttribute(ACTUALFORMAT);
                FileFormatElement.Attributes.Append(ActualFormat);
                ActualFormat.Value = fileFormat.ActualFormat;
            }
        }