Beispiel #1
0
        private void okButton_Click(object sender, EventArgs e)
        {
            if (ChannelID == 0)
            {
                rssDataSet.ChannelRow channel = rssDataSet.Channel.NewChannelRow();

                channel.FolderID    = int.Parse(folderComboBox.SelectedValue.ToString());
                channel.Title       = titleTextBox.Text;
                channel.URL         = urlTextBox.Text;
                channel.LastUpdated = DateTime.Now;

                rssDataSet.Channel.AddChannelRow(channel);
            }
            else
            {
                // Find the existing channel
                rssDataSet.ChannelRow channel = rssDataSet.Channel.FindByChannelID(ChannelID);

                channel.BeginEdit();
                channel.FolderID    = int.Parse(folderComboBox.SelectedValue.ToString());
                channel.Title       = titleTextBox.Text;
                channel.URL         = urlTextBox.Text;
                channel.LastUpdated = DateTime.Parse(lastUpdatedTextBox.Text);
                channel.EndEdit();
            }
            Close();
        }