Пример #1
0
 protected void btnAddNewTopic_Click(object sender, EventArgs e)
 {
     if (!HasWriteAccess)
         return;
     
     ProfileTopic topic = new ProfileTopic();
     topic.Name = "NewTopic";
     topic.EditColumns = 1;
     topic.ViewColumns = 1;
     topic.Save();
     PopulateDataGrid();
 }
Пример #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (!HasWriteAccess)
         return;
     
     ProfileTopic topic = new ProfileTopic(Convert.ToInt32(TopicID));
     topic.Name = txtTopicTitle.Text;
     topic.EditColumns = Convert.ToInt32(dropEditColumns.SelectedValue);
     topic.ViewColumns = Convert.ToInt32(dropViewColumns.SelectedValue);
     topic.Save();
     ClearTempTopic();
     Response.Redirect("EditTopics.aspx");
 }