protected void LoadInfo() { switch (type) { case "kuaib": var kuaibUrl = MovieUrlKuaibView.GetModelByID(id.ToS()); txt_BookTitle.Text = kuaibUrl.MovieTitle; txt_Title.Text = kuaibUrl.Title; txt_Url.Text = kuaibUrl.Url; movieID = kuaibUrl.MovieID; break; case "baidu": var baiduUrl = MovieUrlBaiduView.GetModelByID(id.ToS()); txt_BookTitle.Text = baiduUrl.MovieTitle; txt_Title.Text = baiduUrl.Title; txt_Url.Text = baiduUrl.Url; movieID = baiduUrl.MovieID; break; case "mag": var magUrl = MovieUrlMagView.GetModelByID(id.ToS()); txt_BookTitle.Text = magUrl.MovieTitle; txt_Title.Text = magUrl.Title; txt_Url.Text = magUrl.Url; movieID = magUrl.MovieID; break; } }
/// <summary> /// 百度 /// </summary> /// <param name="id"></param> protected void Baidu(int id) { MovieUrlBaidu b = MovieUrlBaiduView.GetModelByID(id.ToS()); Response.Clear(); Response.Write(CreateDramapage(b, MovieInfoView.GetClass(b))); }
/// <summary> /// 生成百度影音剧集 /// </summary> /// <param name="id"></param> protected void CreateBaiduPage(long id) { MovieUrlBaidu b = MovieUrlBaiduView.GetModelByID(id.ToS()); if (b.Id > 0) { Class c = MovieInfoView.GetClass(b); Voodoo.Basement.CreatePage.CreateDramapage(b, c); Response.Write(string.Format("《{0}》-百度影音剧集《{1}》完成", b.MovieTitle, b.Title)); } else { Response.Write("不存在"); } }
protected void btn_Save_Click(object sender, EventArgs e) { movieID = WS.RequestInt("movieid", 0); MovieInfo movie = MovieInfoView.GetModelByID(movieID.ToS()); #region deal switch (type) { case "kuaib": var kuaibUrl = MovieUrlKuaibView.GetModelByID(id.ToS()); 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) { MovieUrlKuaibView.Update(kuaibUrl); } else { MovieUrlKuaibView.Insert(kuaibUrl); } break; case "baidu": var baiduUrl = MovieUrlBaiduView.GetModelByID(id.ToS()); 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) { MovieUrlBaiduView.Update(baiduUrl); } else { MovieUrlBaiduView.Insert(baiduUrl); } break; case "mag": var magUrl = MovieUrlMagView.GetModelByID(id.ToS()); 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) { MovieUrlMagView.Update(magUrl); } else { MovieUrlMagView.Insert(magUrl); } break; } #endregion Response.Redirect("UrlList.aspx?type=" + type + "&movieid=" + movieID); }