Esempio n. 1
0
        /// <summary>
        /// insert or update channel
        /// </summary>
        public void Save()
        {
            string n = this.ChannelName;
            string r = this.ChannelRemark;

            if (IsAdd())
            {
                ChannelDBI.AddChannel(n, r, GetStationIDs());
            }
            else
            {
                // edit
                //
                ChannelDBI.EditChannel(this.ChannelID, n, r, GetStationIDs());
            }

            // save station color
            //
            foreach (StationClass station in StationCollection)
            {
                if (station.Color != System.Drawing.Color.White)
                {
                    StationDBI.UpdateColor(station.StationID, station.Color);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// insert or update channel
        /// </summary>
        public void Save()
        {
            string n = this.ChannelName;
            string r = this.ChannelRemark;

            if (IsAdd())
            {
                ChannelDBI.AddChannel(n, r, GetStationIDs());
            }
            else
            {
                // edit
                //
                ChannelDBI.EditChannel(this.ChannelID, n, r, GetStationIDs());
            }
        }