public void ExecuteTags(ref string PageStr, normal_channel _Channel) { PageStr = PageStr.Replace("{$ChannelId}", _Channel.Id.ToString()); PageStr = PageStr.Replace("{$ChannelName}", _Channel.Title); PageStr = PageStr.Replace("{$ChannelInfo}", _Channel.Info); PageStr = PageStr.Replace("{$ChannelType}", _Channel.Type); PageStr = PageStr.Replace("{$ChannelDir}", _Channel.Dir); PageStr = PageStr.Replace("{$ChannelItemName}", _Channel.ItemName); PageStr = PageStr.Replace("{$ChannelItemUnit}", _Channel.ItemUnit); PageStr = PageStr.Replace("{$ChannelLink}", "/Enterprise/web/" + _Channel.Type + "classList?ccid=" + _Channel.Id + "&sessionid={$Sessionid}"); }
partial void Deletenormal_channel(normal_channel instance);
partial void Updatenormal_channel(normal_channel instance);
partial void Insertnormal_channel(normal_channel instance);
private void detach_normal_channel(normal_channel entity) { this.SendPropertyChanging(); entity.employeeInfo = null; }
/// <summary> /// 修改频道信息 /// </summary> /// <param name="channel"></param> /// <returns>受影响的行数</returns> public int UpdateChannel(normal_channel channel) { string sql = string.Format(@"update normal_channel set title='{0}',info='{1}',Itemname='{2}',itemunit='{3}',[Enabled]={4} where id={5}", channel.Title, channel.Info, channel.ItemName, channel.ItemUnit, channel.Enabled, channel.Id); return SqlHelper.ExecuteNonQuery(System.Data.CommandType.Text, sql) ; }
/// <summary> /// 添加频道 /// </summary> /// <param name="Channel"></param> /// <returns>返回添加后的ID</returns> public int InsertChannel(normal_channel Channel) { db.normal_channel.InsertOnSubmit(Channel); db.SubmitChanges(); return Channel.Id; }