Beispiel #1
0
 private void RemoveAllChannel()
 {
     if (MsgBox.QuestionShow("确认清空所有通道吗?") == MsgBoxResult.OK)
     {
         ChannelCollection?.Clear();
     }
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOK_Click(object sender, EventArgs e)
        {
            ChannelCollection cc = SessionManager.WaterUserSession.WaterUser.ChannelCollection;

            cc.Clear();
            foreach (ListItem item in this.clChannel.Items)
            {
                if (item.Selected)
                {
                    int          id = Convert.ToInt32(item.Value);
                    ChannelClass c  = ChannelFactory.CreateChannel(id);
                    cc.Add(c);
                }
            }
            Response.Redirect("WaterUser.aspx");
        }