Permalink
Browse files

Resolved multi-channel issue, added readme with License details and I…

…nstallation instructions
  • Loading branch information...
BDizzle committed Jul 28, 2008
1 parent f98e672 commit 30b263757bf354bf650e324cb9e9ebdd1ae302a8
Showing with 68 additions and 12 deletions.
  1. +2 −2 Default.aspx
  2. +29 −10 Default.aspx.cs
  3. +37 −0 Readme.txt
View
@@ -57,13 +57,13 @@
 on
<asp:Label ID="uxCurrentChannelName" runat="server"></asp:Label>
.<br />
- The programing on
+ <p style="font-weight:bold; color:Red">The programing on
<asp:Label ID="uxChannelName2" runat="server"></asp:Label>
&nbsp;will be deleted, and replaced, from
<asp:Label ID="uxDestStartDate" runat="server"></asp:Label>
&nbsp;to
<asp:Label ID="uxDestEndDate" runat="server"></asp:Label>
- .<br />
+ .<p/>
If you are sure you want to do this, press Next</asp:WizardStep>
<asp:WizardStep ID="Review" runat="server" Title="Review">
Removed
View
@@ -26,7 +26,8 @@ public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
{
//Get the list of Channels from the Cablecast Database, add them to the Drop Down
- PopulateChannelList();
+ if(SuperCopyWizard.ActiveStepIndex == 0 && this.IsPostBack == false)
+ PopulateChannelList();
//Since we are not ready to continue, disable the Next Button for now.
NextButtonEnabled(false);
@@ -37,10 +38,13 @@ protected void SuperCopyWizard_NextButtonClick(object sender, WizardNavigationEv
if (SuperCopyWizard.ActiveStepIndex == 0)
{
//The user clicked next on the first step, get the second step ready to go
-
+ //Save the selected channel name
+ m_CurrentChannelID = int.Parse(uxChannel.SelectedValue);
+ m_CurrentChannelName = uxChannel.SelectedItem.Text;
+
//Set the text of the various labels
- uxChannelName2.Text = uxChannel.SelectedItem.Text;
- uxCurrentChannelName.Text = uxChannel.SelectedItem.Text;
+ uxChannelName2.Text = m_CurrentChannelName;
+ uxCurrentChannelName.Text = m_CurrentChannelName;
uxSourceDateName.Text = uxSourceDay.SelectedDate.ToShortDateString();
uxDestStartDate.Text = uxSourceDay.SelectedDate.AddDays(1).ToShortDateString();
uxDestEndDate.Text = uxEndDate.SelectedDate.ToShortDateString();
@@ -69,7 +73,7 @@ private void ClearAndCopyRuns()
//Remove the runs from the schedule for the selected days.
int RemovedRuns =
ClearSchedule(
- int.Parse(uxChannel.SelectedValue),
+ m_CurrentChannelID,
uxSourceDay.SelectedDate.AddDays(1),
uxEndDate.SelectedDate);
@@ -79,7 +83,7 @@ private void ClearAndCopyRuns()
//Copy the schedule for the selected days
int AddedRuns =
CopySchedule(
- int.Parse(uxChannel.SelectedValue),
+ m_CurrentChannelID,
uxSourceDay.SelectedDate,
uxEndDate.SelectedDate);
@@ -100,10 +104,7 @@ private void ClearAndCopyRuns()
protected void uxSourceDate_SelectionChanged(object sender, EventArgs e)
{
uxNumberOfSourceRuns.Text = NumberOfRunsDescription(
- GetNumberOfRuns(
- int.Parse(
- uxChannel.SelectedValue),
- uxSourceDay.SelectedDate));
+ GetNumberOfRuns(m_CurrentChannelID, uxSourceDay.SelectedDate));
}
protected void uxStartDate_SelectionChanged(object sender, EventArgs e)
@@ -378,6 +379,24 @@ private int m_StepCompleted
get { return ViewState["StepCompleted"] == null ? 0 : (int)ViewState["StepCompleted"]; }
set { ViewState["StepCompleted"] = value; }
}
+
+ /// <summary>
+ /// Keeps track of the currently selected channel
+ /// </summary>
+ private int m_CurrentChannelID
+ {
+ get { return ViewState["CurrentChannelID"] == null ? 0 : (int)ViewState["CurrentChannelID"]; }
+ set { ViewState["CurrentChannelID"] = value; }
+ }
+
+ /// <summary>
+ /// Keeps track of the current channel's name
+ /// </summary>
+ private string m_CurrentChannelName
+ {
+ get { return ViewState["CurrentChannelName"] == null ? string.Empty : ViewState["CurrentChannelName"].ToString(); }
+ set { ViewState["CurrentChannelName"] = value; }
+ }
#endregion
}
View
@@ -0,0 +1,37 @@
+The MIT License
+
+Copyright (c) 2008 Brandon McKenzie
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+Installation:
+
+Place the enclosed files in
+ D:\TRMS\Web\Cablecast\Plugins\SuperCopy\
+
+Create a directory called bin in the above folder
+
+Copy TRMS.Components.UserManagement.dll and MediaChase.FileUploader.dll from D:\TRMS\Web\Cablecast\bin to the bin folder you just created.
+
+In the IIS applet, navigate to <Web Site Root>/Cablecast/Web/Plugins, right click on SuperCopy, select Properties
+
+Under 'Application' click [Create]. Click [OK].
+
+That should be it!

0 comments on commit 30b2637

Please sign in to comment.