.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

Create XML of Some Particular Row from datagrid view

Posted By: kamlesh     Posted Date: March 02, 2011    Points:2   Category :Windows Application
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinExplorerBarGroupBoxAtRuntime.Export
{
public class clsExport
{
int _UserCount;
List<ClsExportUserMetaData> _UserList;

public clsExport()
{
_UserList = new List<ClsExportUserMetaData>();
}
public int UserCount
{
get { return _UserCount; }
set { _UserCount = value; }
}

public List<ClsExportUserMetaData> UserList
{
get { return _UserList; }
set { _UserList = value; }
}
}
}

is this code will work

Responses
Author: kamlesh             
Posted Date: March 02, 2011     Points: 20   

public clsExport createExportData()
{
clsExport Export= new clsExport();
Export.UserCount = 1;
List<ClsExportUserMetaData> userList = new List<ClsExportUserMetaData>();
ClsExportUserMetaData user = new ClsExportUserMetaData();
user.ExportType = ExportTypeEnum.Selected;
user.UserName = "praveen";
List<clsExportFolder> folderList = new List<clsExportFolder>();
clsExportFolder folder1 = new clsExportFolder();
folder1.ExportType = ExportTypeEnum.Full;
folder1.FolderName = "Inbox";

clsExportFolder folder2 = new clsExportFolder();
folder2.ExportType = ExportTypeEnum.Selected;
folder2.FolderName = "Drafts";
List<clsExportMail> MailList = new List<clsExportMail>();
clsExportMail Mail1 = new clsExportMail();
clsExportMail Mail2 = new clsExportMail();
clsExportMail Mail3 = new clsExportMail();
Mail1.SentDate = System.DateTime.Now;
Mail1.Subject = "Test1";

Mail2.SentDate = System.DateTime.Now;
Mail2.Subject = "Test1";

Mail3.SentDate = System.DateTime.Now;
Mail3.Subject = "Test1";

MailList.Add(Mail1);
MailList.Add(Mail2);
MailList.Add(Mail3);
folder2.MailList = MailList;
folderList.Add(folder1);
folderList.Add(folder2);
user.FolderList = folderList;
userList.Add(user);
Export.UserList = userList;
return Export;
}


}

}

Thanks And Regards.
Kamlesh Nikam
Author: Karthikeyan Anbarasan       [Moderator]      
Posted Date: March 04, 2011     Points: 20   

Hi,

Please post your issue!!!

Thanks
Karthik
http://www.f5debug.net
Mark as Answer if the answer solves your issue!!!
Author: kamlesh             
Posted Date: March 06, 2011     Points: 20   

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinExplorerBarGroupBoxAtRuntime.Export
{
public class clsExportFolder
{
string _FolderName;
ExportTypeEnum _ExportType;
List<clsExportMail> _MailList;

public clsExportFolder()
{
_MailList = new List<clsExportMail>();
}
public string FolderName
{
get { return _FolderName; }
set { _FolderName = value; }
}

public ExportTypeEnum ExportType
{
get { return _ExportType; }
set { _ExportType = value; }
}

public List<clsExportMail> MailList
{
get { return _MailList; }
set { _MailList = value; }
}

}

public enum ExportTypeEnum
{
Full= 0,
Selected = 2,

}
}



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinExplorerBarGroupBoxAtRuntime.Export
{
public class clsExportMail
{
private string _Subject;
private DateTime _SentDate;

public string Subject
{
get { return _Subject; }
set { _Subject = value; }
}

public DateTime SentDate
{
get { return _SentDate; }
set { _SentDate = value; }
}

}
}

Thanks And Regards.
Kamlesh Nikam
Author: kamlesh             
Posted Date: March 06, 2011     Points: 20   

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.IO;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinExplorerBarGroupBoxAtRuntime.Export
{
public class ClsExportUserMetaData
{

string _UserName;
ExportTypeEnum _ExportType;
int _FolderCount;
List<clsExportFolder> _FolderList;

public string UserName
{
get { return _UserName; }
set { _UserName = value; }
}
public ExportTypeEnum ExportType
{
get { return _ExportType; }
set { _ExportType = value; }
}
public int FolderCount
{
get { return _FolderCount; }
set { _FolderCount = value; }
}

public List<clsExportFolder> FolderList
{
get { return _FolderList; }
set { _FolderList = value; }
}

}
}



Thanks And Regards.
Kamlesh Nikam


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend