View Single Post
  #3 (permalink)  
Old 02-07-2008, 12:32 PM
Paayaa Paayaa is offline
Junior Member
 
Join Date: Jan 2008
Posts: 7
Default copied but don't show it in checkbox

Thanks for reply,

One issue and one question. I start with the issue :

I use admin account that have full access right and here is the code I use to to copy a survey as a new survey (assuming I know the TemplateID)

public static ResponseTemplate CreateNewPoll(int pollTemplateID)
{
//Initialize the user manager, only needs to be done once per IIS Application lifetime.
UserManager.Initialize();
string[] adminRoles = { "System Administrator" };
IIdentity adminID = UserManager.GetUserIdentity("admin");
ExtendedPrincipal adminPrincipal = new ExtendedPrincipal(adminID, adminRoles);

string language = WebTextManager.GetUserLanguage();

ResponseTemplate newPoll = ResponseTemplateManager.CopyTemplate(pollTemplateI D, adminPrincipal, language);
return newPoll;

}

It will create the survey but when I login to checkbox using admin username, password I can not see the survey. I checked the database and I can see it added a row to ckbx_ResponseTemplateTable. What am I missing?

Question : If I want to create this new survey under a folder which function(s) I should use?

Thanks again
Reply With Quote