本文整理汇总了C#中Voodoo.Basement.DataEntities.AddToMovieUrlBaidu方法的典型用法代码示例。如果您正苦于以下问题:C# DataEntities.AddToMovieUrlBaidu方法的具体用法?C# DataEntities.AddToMovieUrlBaidu怎么用?C# DataEntities.AddToMovieUrlBaidu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voodoo.Basement.DataEntities
的用法示例。
在下文中一共展示了DataEntities.AddToMovieUrlBaidu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btn_Save_Click
protected void btn_Save_Click(object sender, EventArgs e)
{
DataEntities ent = new DataEntities();
movieID = WS.RequestInt("movieid", 0);
MovieInfo movie = //MovieInfoView.GetModelByID(movieID.ToS());
(from l in ent.MovieInfo where l.id == movieID select l).FirstOrDefault();
#region deal
switch (type)
{
case "kuaib":
var kuaibUrl = (from l in ent.MovieUrlKuaib where l.id == id select l).FirstOrDefault();
kuaibUrl.MovieTitle = movie.Title;
kuaibUrl.Title = txt_Title.Text;
kuaibUrl.Url = txt_Url.Text;
kuaibUrl.MovieID = movie.id;
kuaibUrl.UpdateTime = DateTime.Now;
if (kuaibUrl.id <= 0)
{
ent.AddToMovieUrlKuaib(kuaibUrl);
}
break;
case "baidu":
var baiduUrl = (from l in ent.MovieUrlBaidu where l.id == id select l).FirstOrDefault();
baiduUrl.MovieTitle = movie.Title;
baiduUrl.Title = txt_Title.Text;
baiduUrl.Url = txt_Url.Text;
baiduUrl.MovieID = movie.id;
baiduUrl.UpdateTime = DateTime.Now;
if (baiduUrl.id <= 0)
{
ent.AddToMovieUrlBaidu(baiduUrl);
}
break;
case "mag":
var magUrl = (from l in ent.MovieUrlMag where l.id == id select l).FirstOrDefault();
magUrl.MovieTitle = movie.Title;
magUrl.Title = txt_Title.Text;
magUrl.Url = txt_Url.Text;
magUrl.MovieID = movie.id;
magUrl.UpdateTime = DateTime.Now;
if (magUrl.id <= 0)
{
ent.AddToMovieUrlMag(magUrl);
}
break;
}
#endregion
ent.SaveChanges();
ent.Dispose();
Response.Redirect("UrlList.aspx?type=" + type + "&movieid="+movieID);
}