From: <mas...@us...> - 2008-01-07 09:18:25
|
Revision: 55 http://mp-webinterface.svn.sourceforge.net/mp-webinterface/?rev=55&view=rev Author: maschine Date: 2008-01-07 01:18:23 -0800 (Mon, 07 Jan 2008) Log Message: ----------- Fixed page titles; templates for new pages; search works (basic) for date searches; updated dlls. Modified Paths: -------------- trunk/Version2/Web App/MPW/Bin/DirectShowLib.dll trunk/Version2/Web App/MPW/Bin/TVDatabase.dll trunk/Version2/Web App/MPW/Bin/TVLibrary.dll trunk/Version2/Web App/MPW/Bin/TvBusinessLayer.dll trunk/Version2/Web App/MPW/Bin/TvControl.dll trunk/Version2/Web App/MPW/Bin/TvLibrary.Interfaces.dll trunk/Version2/Web App/MPW/Default.aspx trunk/Version2/Web App/MPW/Default.aspx.cs trunk/Version2/Web App/MPW/MPW.master trunk/Version2/Web App/MPW/NowNext.aspx trunk/Version2/Web App/MPW/NowNext.aspx.cs trunk/Version2/Web App/MPW/Schedules.aspx trunk/Version2/Web App/MPW/Schedules.aspx.cs trunk/Version2/Web App/MPW/Search.aspx trunk/Version2/Web App/MPW/Search.aspx.cs trunk/Version2/Web App/MPW/css/mpw_style.css Added Paths: ----------- trunk/Version2/Web App/MPW/LiveTV.aspx trunk/Version2/Web App/MPW/LiveTV.aspx.cs trunk/Version2/Web App/MPW/Recordings.aspx trunk/Version2/Web App/MPW/Recordings.aspx.cs Modified: trunk/Version2/Web App/MPW/Bin/DirectShowLib.dll =================================================================== (Binary files differ) Modified: trunk/Version2/Web App/MPW/Bin/TVDatabase.dll =================================================================== (Binary files differ) Modified: trunk/Version2/Web App/MPW/Bin/TVLibrary.dll =================================================================== (Binary files differ) Modified: trunk/Version2/Web App/MPW/Bin/TvBusinessLayer.dll =================================================================== (Binary files differ) Modified: trunk/Version2/Web App/MPW/Bin/TvControl.dll =================================================================== (Binary files differ) Modified: trunk/Version2/Web App/MPW/Bin/TvLibrary.Interfaces.dll =================================================================== (Binary files differ) Modified: trunk/Version2/Web App/MPW/Default.aspx =================================================================== --- trunk/Version2/Web App/MPW/Default.aspx 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/Default.aspx 2008-01-07 09:18:23 UTC (rev 55) @@ -1,5 +1,5 @@ <%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" - Inherits="_Default" Title="Untitled Page" %> + Inherits="Default" Title="Guide" %> <asp:Content ID="Content1" ContentPlaceHolderID="MPWContent" runat="Server"> <asp:UpdatePanel ID="GuideUpdatePanel" runat="server" UpdateMode="Conditional"> Modified: trunk/Version2/Web App/MPW/Default.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/Default.aspx.cs 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/Default.aspx.cs 2008-01-07 09:18:23 UTC (rev 55) @@ -12,7 +12,7 @@ using MPW; using TvDatabase; -public partial class _Default : System.Web.UI.Page +public partial class Default : System.Web.UI.Page { DateTime guideStart; DateTime guideEnd; @@ -27,6 +27,10 @@ protected void Page_Load(object sender, EventArgs e) { + //Set localized page title + MPWMaster m = (MPWMaster)Page.Master; + m.Sectiontitle = Resources.Resource.Guide; + //Establish the connection to the TV Server and the DB. MPWUtils.SetupConnection(); Added: trunk/Version2/Web App/MPW/LiveTV.aspx =================================================================== --- trunk/Version2/Web App/MPW/LiveTV.aspx (rev 0) +++ trunk/Version2/Web App/MPW/LiveTV.aspx 2008-01-07 09:18:23 UTC (rev 55) @@ -0,0 +1,15 @@ +<%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="LiveTV.aspx.cs" + Inherits="LiveTV" Title="Live TV" %> + +<asp:Content ID="Content_search" ContentPlaceHolderID="MPWContent" runat="Server"> + <h1> + <asp:Label ID="label_searchresults" runat="server" Text="<%$ Resources:Resource, LiveTV %>"></asp:Label></h1> + <asp:UpdatePanel ID="GuideUpdatePanel" runat="server" UpdateMode="Conditional"> + <contenttemplate> + <asp:Table ID="Guide" runat="server" CssClass="guidetable"> + </asp:Table> + </contenttemplate> + <triggers> + </triggers> + </asp:UpdatePanel> +</asp:Content> Added: trunk/Version2/Web App/MPW/LiveTV.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/LiveTV.aspx.cs (rev 0) +++ trunk/Version2/Web App/MPW/LiveTV.aspx.cs 2008-01-07 09:18:23 UTC (rev 55) @@ -0,0 +1,25 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using MPW; +using TvDatabase; + +public partial class LiveTV : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + //Set localized page title + MPWMaster m = (MPWMaster)Page.Master; + m.Sectiontitle = Resources.Resource.LiveTV; + } + +} Modified: trunk/Version2/Web App/MPW/MPW.master =================================================================== --- trunk/Version2/Web App/MPW/MPW.master 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/MPW.master 2008-01-07 09:18:23 UTC (rev 55) @@ -62,14 +62,14 @@ </td> <td id="nav_rec" class="navcell"> <asp:HyperLink ID="LinkRecordings" runat="server" Text="<%$ Resources:Resource, Recordings %>" - NavigateUrl="~/Default.aspx" CssClass="navilink"></asp:HyperLink> + NavigateUrl="~/Recordings.aspx" CssClass="navilink"></asp:HyperLink> </td> <td id="bar5"> | </td> <td id="nav_live" class="navcell"> <asp:HyperLink ID="LinkLiveTV" runat="server" Text="<%$ Resources:Resource, LiveTV %>" - NavigateUrl="~/Default.aspx" CssClass="navilink"></asp:HyperLink> + NavigateUrl="~/LiveTV.aspx" CssClass="navilink"></asp:HyperLink> </td> </tr> </table> Modified: trunk/Version2/Web App/MPW/NowNext.aspx =================================================================== --- trunk/Version2/Web App/MPW/NowNext.aspx 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/NowNext.aspx 2008-01-07 09:18:23 UTC (rev 55) @@ -1,4 +1,4 @@ -<%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="NowNext.aspx.cs" Inherits="Default2" Title="Untitled Page" %> +<%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="NowNext.aspx.cs" Inherits="NowNext" Title="Untitled Page" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> Modified: trunk/Version2/Web App/MPW/NowNext.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/NowNext.aspx.cs 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/NowNext.aspx.cs 2008-01-07 09:18:23 UTC (rev 55) @@ -13,11 +13,10 @@ using MPW; using System.Collections.Generic; -public partial class Default2 : System.Web.UI.Page +public partial class NowNext : System.Web.UI.Page { IList _schedules; IList groups; - IList channels; private int chosengroup = 0; @@ -43,13 +42,14 @@ protected void Page_Load(object sender, EventArgs e) { + //Set localized page title + MPWMaster m = (MPWMaster)Page.Master; + m.Sectiontitle = Resources.Resource.NowNext; + //Establish the connection to the TV Server and the DB. MPWUtils.SetupConnection(); if (!IsPostBack) { - MPWMaster m = (MPWMaster)Page.Master; - //Set language resources - m.Sectiontitle = Resources.Resource.NowNext; LabelChannelGroup.Text = Resources.Resource.ChannelGroup; groups = ChannelGroup.ListAll(); Added: trunk/Version2/Web App/MPW/Recordings.aspx =================================================================== --- trunk/Version2/Web App/MPW/Recordings.aspx (rev 0) +++ trunk/Version2/Web App/MPW/Recordings.aspx 2008-01-07 09:18:23 UTC (rev 55) @@ -0,0 +1,13 @@ +<%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="Recordings.aspx.cs" + Inherits="Recordings" Title="Recordings" %> + +<asp:Content ID="Content_recordings" ContentPlaceHolderID="MPWContent" runat="Server"> + <h1> + <asp:Label ID="label_recordings" runat="server" Text="<%$ Resources:Resource, Recordings %>"></asp:Label></h1> + <asp:UpdatePanel ID="GuideUpdatePanel" runat="server" UpdateMode="Conditional"> + <ContentTemplate> + </ContentTemplate> + <Triggers> + </Triggers> + </asp:UpdatePanel> +</asp:Content> Added: trunk/Version2/Web App/MPW/Recordings.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/Recordings.aspx.cs (rev 0) +++ trunk/Version2/Web App/MPW/Recordings.aspx.cs 2008-01-07 09:18:23 UTC (rev 55) @@ -0,0 +1,24 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using MPW; +using TvDatabase; + +public partial class Recordings : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + //Set localized page title + MPWMaster m = (MPWMaster)Page.Master; + m.Sectiontitle = Resources.Resource.Recordings; + } +} Modified: trunk/Version2/Web App/MPW/Schedules.aspx =================================================================== --- trunk/Version2/Web App/MPW/Schedules.aspx 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/Schedules.aspx 2008-01-07 09:18:23 UTC (rev 55) @@ -1,5 +1,7 @@ -<%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="Schedules.aspx.cs" Inherits="Default2" Title="Untitled Page" %> -<asp:Content ID="Schedules" ContentPlaceHolderID="MPWContent" Runat="Server"> +<%@ Page Language="C#" MasterPageFile="~/MPW.master" AutoEventWireup="true" CodeFile="Schedules.aspx.cs" + Inherits="Schedules" Title="Schedules" %> + +<asp:Content ID="Schedules" ContentPlaceHolderID="MPWContent" runat="Server"> <asp:UpdatePanel ID="ContentUpdatePanel" runat="server" UpdateMode="Always"> <ContentTemplate> <asp:Panel ID="SchedulesPanel" runat="server"> @@ -7,4 +9,3 @@ </ContentTemplate> </asp:UpdatePanel> </asp:Content> - Modified: trunk/Version2/Web App/MPW/Schedules.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/Schedules.aspx.cs 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/Schedules.aspx.cs 2008-01-07 09:18:23 UTC (rev 55) @@ -12,13 +12,15 @@ using TvDatabase; using MPW; -public partial class Default2 : System.Web.UI.Page +public partial class Schedules : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { - MPWMaster m = (MPWMaster)Page.Master; - m.Sectiontitle = Resources.Resource.Schedules; - updateContents(); + //Set localized page title + MPWMaster m = (MPWMaster)Page.Master; + m.Sectiontitle = Resources.Resource.Schedules; + + updateContents(); } /// <summary> @@ -29,10 +31,10 @@ /// <param name="e"></param> protected void deleteSchedule(object sender, ImageClickEventArgs e) { - ImageButton b = (ImageButton)sender; - int idSchedule = int.Parse(b.CommandArgument); - MPWUtils.deleteSchedule(idSchedule); - updateContents(); + ImageButton b = (ImageButton)sender; + int idSchedule = int.Parse(b.CommandArgument); + MPWUtils.deleteSchedule(idSchedule); + updateContents(); } /// <summary> @@ -40,129 +42,129 @@ /// </summary> protected void updateContents() { - //Clear everything - SchedulesPanel.Controls.Clear(); + //Clear everything + SchedulesPanel.Controls.Clear(); - //Establish the connection to the TV Server and the DB. - MPWUtils.SetupConnection(); + //Establish the connection to the TV Server and the DB. + MPWUtils.SetupConnection(); - //A new Businesslayer - TvBusinessLayer layer = new TvBusinessLayer(); + //A new Businesslayer + TvBusinessLayer layer = new TvBusinessLayer(); - //Get all schedules - IList schedules = Schedule.ListAll(); - IList single = Schedule.ListAll(); - IList series = Schedule.ListAll(); + //Get all schedules + IList schedules = Schedule.ListAll(); + IList single = Schedule.ListAll(); + IList series = Schedule.ListAll(); - single.Clear(); - series.Clear(); + single.Clear(); + series.Clear(); - foreach (Schedule schedule in schedules) - { - if (schedule.ScheduleType > 0) - series.Add(schedule); - else - single.Add(schedule); - } + foreach (Schedule schedule in schedules) + { + if (schedule.ScheduleType > 0) + series.Add(schedule); + else + single.Add(schedule); + } - if (single.Count > 0) - { - addTable("single", single); - } + if (single.Count > 0) + { + addTable("single", single); + } - if (series.Count > 0) - { - addTable("series", series); - } + if (series.Count > 0) + { + addTable("series", series); + } } protected void addTable(String type, IList schedules) { - Table singleTable = new Table(); - singleTable.CellPadding = 0; - singleTable.CellSpacing = 0; - singleTable.CssClass = "grouptable"; + Table singleTable = new Table(); + singleTable.CellPadding = 0; + singleTable.CellSpacing = 0; + singleTable.CssClass = "grouptable"; - TableRow SeperatorRow = new TableRow(); - TableCell SeperatorCell = new TableCell(); - SeperatorCell.CssClass = "seperatorcell"; - SeperatorCell.ColumnSpan = 3; - Label l = new Label(); - if (type == "single") - l.Text = Resources.Resource.RecSingle; - else - l.Text = Resources.Resource.RecSeries; - SeperatorCell.Controls.Add(l); - SeperatorRow.Cells.Add(SeperatorCell); - singleTable.Rows.Add(SeperatorRow); + TableRow SeperatorRow = new TableRow(); + TableCell SeperatorCell = new TableCell(); + SeperatorCell.CssClass = "seperatorcell"; + SeperatorCell.ColumnSpan = 3; + Label l = new Label(); + if (type == "single") + l.Text = Resources.Resource.RecSingle; + else + l.Text = Resources.Resource.RecSeries; + SeperatorCell.Controls.Add(l); + SeperatorRow.Cells.Add(SeperatorCell); + singleTable.Rows.Add(SeperatorRow); - //Iterate through all the schedules - foreach (Schedule schedule in schedules) - { - TableRow scheduleNameRow = new TableRow(); + //Iterate through all the schedules + foreach (Schedule schedule in schedules) + { + TableRow scheduleNameRow = new TableRow(); - TableCell spacer = new TableCell(); - spacer.CssClass = "spacer"; - scheduleNameRow.Controls.Add(spacer); + TableCell spacer = new TableCell(); + spacer.CssClass = "spacer"; + scheduleNameRow.Controls.Add(spacer); - TableCell scheduleNameCell = new TableCell(); - scheduleNameCell.CssClass = "namecell"; - scheduleNameCell.ColumnSpan = 2; - Label channelName = new Label(); - channelName.Text = schedule.ProgramName; - scheduleNameCell.Controls.Add(channelName); + TableCell scheduleNameCell = new TableCell(); + scheduleNameCell.CssClass = "namecell"; + scheduleNameCell.ColumnSpan = 2; + Label channelName = new Label(); + channelName.Text = schedule.ProgramName; + scheduleNameCell.Controls.Add(channelName); - ImageButton deleteScheduleButton = new ImageButton(); - deleteScheduleButton.ImageUrl = "Images/redx.gif"; - deleteScheduleButton.CssClass = "deleteschedule"; - deleteScheduleButton.CommandArgument = schedule.IdSchedule.ToString(); - deleteScheduleButton.Click += new ImageClickEventHandler(deleteSchedule); - scheduleNameCell.Controls.Add(deleteScheduleButton); + ImageButton deleteScheduleButton = new ImageButton(); + deleteScheduleButton.ImageUrl = "Images/redx.gif"; + deleteScheduleButton.CssClass = "deleteschedule"; + deleteScheduleButton.CommandArgument = schedule.IdSchedule.ToString(); + deleteScheduleButton.Click += new ImageClickEventHandler(deleteSchedule); + scheduleNameCell.Controls.Add(deleteScheduleButton); - scheduleNameRow.Cells.Add(scheduleNameCell); - singleTable.Rows.Add(scheduleNameRow); + scheduleNameRow.Cells.Add(scheduleNameCell); + singleTable.Rows.Add(scheduleNameRow); - TableRow logoRow = new TableRow(); + TableRow logoRow = new TableRow(); - TableCell spacer2 = new TableCell(); - spacer2.CssClass = "spacer2"; - logoRow.Controls.Add(spacer2); + TableCell spacer2 = new TableCell(); + spacer2.CssClass = "spacer2"; + logoRow.Controls.Add(spacer2); - TableCell cell_logo = new TableCell(); - cell_logo.CssClass = "logocell"; + TableCell cell_logo = new TableCell(); + cell_logo.CssClass = "logocell"; - Image channelLogo = new Image(); - channelLogo.CssClass = "channellogo"; - Channel channel = Channel.Retrieve(schedule.IdChannel); - channelLogo.ImageUrl = MPWUtils.getChannelLogoPath(this.Server.MapPath("~/TVLogos/"), channel.Name); + Image channelLogo = new Image(); + channelLogo.CssClass = "channellogo"; + Channel channel = Channel.Retrieve(schedule.IdChannel); + channelLogo.ImageUrl = MPWUtils.getChannelLogoPath(this.Server.MapPath("~/TVLogos/"), channel.Name); - if (channelLogo.ImageUrl != "") - cell_logo.Controls.Add(channelLogo); + if (channelLogo.ImageUrl != "") + cell_logo.Controls.Add(channelLogo); - TableCell cell_description = new TableCell(); - cell_description.CssClass = "detailscell"; + TableCell cell_description = new TableCell(); + cell_description.CssClass = "detailscell"; - Label description = new Label(); + Label description = new Label(); - try - { - Channel c = Channel.Retrieve(schedule.IdChannel); - Program p = c.GetProgramAt(schedule.StartTime); - description.Text = p.Description; - cell_description.Controls.Add(description); - } - catch - { - description.Text = Resources.Resource.NoEPGInfo; - cell_description.Controls.Add(description); - } + try + { + Channel c = Channel.Retrieve(schedule.IdChannel); + Program p = c.GetProgramAt(schedule.StartTime); + description.Text = p.Description; + cell_description.Controls.Add(description); + } + catch + { + description.Text = Resources.Resource.NoEPGInfo; + cell_description.Controls.Add(description); + } - logoRow.Cells.Add(cell_logo); - logoRow.Cells.Add(cell_description); + logoRow.Cells.Add(cell_logo); + logoRow.Cells.Add(cell_description); - singleTable.Rows.Add(logoRow); + singleTable.Rows.Add(logoRow); - SchedulesPanel.Controls.Add(singleTable); - } + SchedulesPanel.Controls.Add(singleTable); + } } - } +} Modified: trunk/Version2/Web App/MPW/Search.aspx =================================================================== --- trunk/Version2/Web App/MPW/Search.aspx 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/Search.aspx 2008-01-07 09:18:23 UTC (rev 55) @@ -8,30 +8,33 @@ <strong> <asp:Label ID="label_searchbydate" runat="server" Text="<%$ Resources:Resource, searchbydate %>"></asp:Label></strong> <br /> - <asp:RadioButton ID="radio_searchbydate1" runat="server" Checked="True" /> - <asp:Label ID="label_searchbydate1" runat="server" Text="<%$ Resources:Resource, primetimeshows %>"></asp:Label> + <asp:RadioButton ID="radio_searchbydate1" runat="server" Checked="True" Text="<%$ Resources:Resource, primetimeshows %>" + GroupName="date" /> <br /> - <asp:RadioButton ID="radio_searchbydate2" runat="server" /> - <asp:Label ID="label_searchbydate2" runat="server" Text="<%$ Resources:Resource, nowontv %>"></asp:Label> + <asp:RadioButton ID="radio_searchbydate2" runat="server" Text="<%$ Resources:Resource, nowontv %>" + GroupName="date" /> <br /> - <asp:RadioButton ID="radio_searchbydate3" runat="server" /> - <asp:Label ID="label_searchbydate3" runat="server" Text="<%$ Resources:Resource, customtime %>"></asp:Label> + <asp:RadioButton ID="radio_searchbydate3" runat="server" Text="<%$ Resources:Resource, customtime %>" + GroupName="date" />: + <asp:TextBox ID="customtime_h" runat="server" CssClass="customtime"></asp:TextBox> + : + <asp:TextBox ID="customtime_m" runat="server" CssClass="customtime"></asp:TextBox> <br /> - <asp:Button ID="button_searchbydate" runat="server" Text="<%$ Resources:Resource, Search %>" /> + <asp:Button ID="button_searchbydate" runat="server" Text="<%$ Resources:Resource, Search %>" + OnClick="button_searchbydate_Click" /> </div> <div style="line-height: 25px; float: left; width: 250px;"> <strong> <asp:Label ID="label_searchtext" runat="server" Text="<%$ Resources:Resource, searchbytext %>"></asp:Label></strong> <br /> - <asp:CheckBox ID="check_searchintitle" runat="server" Checked="True" /> - <asp:Label ID="label_searchintitle" runat="server" Text="<%$ Resources:Resource, searchintitle %>">"></asp:Label> + <asp:CheckBox ID="check_searchintitle" runat="server" Checked="True" Text="<%$ Resources:Resource, searchintitle %>" /> <br /> - <asp:CheckBox ID="check_searchindescription" runat="server" Checked="True" /> - <asp:Label ID="label_searchindescription" runat="server" Text="<%$ Resources:Resource, searchindescription %>">"></asp:Label> + <asp:CheckBox ID="check_searchindescription" runat="server" Checked="True" Text="<%$ Resources:Resource, searchindescription %>" /> <br /> <asp:TextBox ID="field_searchtext" runat="server"></asp:TextBox> <br /> - <asp:Button ID="button_searchtext" runat="server" Text="<%$ Resources:Resource, Search %>" /> + <asp:Button ID="button_searchtext" runat="server" Text="<%$ Resources:Resource, Search %>" + OnClick="button_searchtext_Click" /> </div> <div style="line-height: 25px; float: left; width: 250px;"> <strong> @@ -40,16 +43,19 @@ <asp:DropDownList ID="dropdown_searchbygenre" runat="server"> </asp:DropDownList> <br /> - <asp:Button ID="button_searchbygenre" runat="server" Text="<%$ Resources:Resource, Search %>" /> + <asp:Button ID="button_searchbygenre" runat="server" Text="<%$ Resources:Resource, Search %>" + OnClick="button_searchbygenre_Click" /> </div> - <div style="clear: both;"></div> + <div style="clear: both;"> + </div> <h1> <asp:Label ID="label_searchresults" runat="server" Text="<%$ Resources:Resource, searchresults %>"></asp:Label></h1> <asp:UpdatePanel ID="GuideUpdatePanel" runat="server" UpdateMode="Conditional"> - <contenttemplate> - 123 - </contenttemplate> - <triggers> - </triggers> + <ContentTemplate> + <asp:Table ID="Guide" runat="server" CssClass="guidetable"> + </asp:Table> + </ContentTemplate> + <Triggers> + </Triggers> </asp:UpdatePanel> </asp:Content> Modified: trunk/Version2/Web App/MPW/Search.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/Search.aspx.cs 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/Search.aspx.cs 2008-01-07 09:18:23 UTC (rev 55) @@ -17,6 +17,108 @@ protected void Page_Load(object sender, EventArgs e) { - + //Set localized page title + MPWMaster m = (MPWMaster)Page.Master; + m.Sectiontitle = Resources.Resource.Search; } + + /// <summary> + /// Method to update all visible content. + /// </summary> + protected void updateContents(IList searchresults) + { + + //Iterate through all the channels + foreach (Program program in searchresults) + { + Channel channel = Channel.Retrieve(program.IdChannel); + if (!channel.IsTv) + continue; + TableRow r = new TableRow(); + TableCell cell_channel = new TableCell(); + TableCell cell_program = new TableCell(); + cell_program.Height = 80; + + cell_channel.CssClass = "logocell"; + + Image channelLogo = new Image(); + channelLogo.CssClass = "channellogo"; + channelLogo.ImageUrl = MPWUtils.getChannelLogoPath(this.Server.MapPath("~/TVLogos/"), channel.Name); + + if (channelLogo.ImageUrl != "") + { + cell_channel.Controls.Add(channelLogo); + Label br = new Label(); + br.Text = "<br />"; + cell_channel.Controls.Add(br); + } + + Label lbl_channel = new Label(); + lbl_channel.Text = "<strong>" + channel.Name + "</strong>"; + + cell_channel.Controls.Add(lbl_channel); + cell_channel.CssClass = "guideChannel"; + + Label resultdetails = new Label(); + resultdetails.Text = program.Description; + cell_program.Controls.Add(resultdetails); + + r.Cells.Add(cell_channel); + r.Cells.Add(cell_program); + + Guide.Rows.Add(r); + } + } + + /// <summary> + /// User chose to search by date and clicked the corresponding button. + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + protected void button_searchbydate_Click(object sender, EventArgs e) + { + // Primetime shows + if (radio_searchbydate1.Checked) + { + } + // On air now + else if (radio_searchbydate2.Checked) + { + TvBusinessLayer layer = new TvBusinessLayer(); + IList searchresults = layer.GetOnairNow(); + updateContents(searchresults); + } + // Custom time + else if (radio_searchbydate3.Checked) + { + DateTime now = DateTime.Now; + int h = Int32.Parse(customtime_h.Text); + int m = Int32.Parse(customtime_m.Text); + DateTime start = new DateTime(now.Year, now.Month, now.Day, h, m, 0); + DateTime end = new DateTime(now.Year, now.Month, now.Day, h, m, 0); + TvBusinessLayer layer = new TvBusinessLayer(); + IList searchresults = layer.GetPrograms(start, end); + updateContents(searchresults); + } + } + + /// <summary> + /// User chose to search by text and clicked the corresponding button. + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + protected void button_searchtext_Click(object sender, EventArgs e) + { + + } + + /// <summary> + /// User chose to search by genre and clicked the corresponding button. + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + protected void button_searchbygenre_Click(object sender, EventArgs e) + { + + } } Modified: trunk/Version2/Web App/MPW/css/mpw_style.css =================================================================== --- trunk/Version2/Web App/MPW/css/mpw_style.css 2008-01-04 14:35:55 UTC (rev 54) +++ trunk/Version2/Web App/MPW/css/mpw_style.css 2008-01-07 09:18:23 UTC (rev 55) @@ -121,8 +121,8 @@ table.guidetable { - table-layout:fixed; - overflow:hidden + table-layout: fixed; + overflow: hidden; } td.seperatorcell @@ -243,14 +243,19 @@ table.guidetable { - overflow:hidden; - width:90%; + overflow: hidden; + width: 90%; } td.guidecell { - overflow:hidden; - height:50px; - background-color:#D4D3D3; + overflow: hidden; + height: 50px; + background-color: #D4D3D3; border: 1px solid #000000; } + +input.customtime +{ + width: 20px; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |