public void ShouldBuildEntireQueryStringForJobSummaryViewIfAllParametersArePassed()
        {
            //Arrange
            Mock<IDashboardView> mockDashboardView = new Mock<IDashboardView>();
            mockDashboardView.SetupProperty(e => e.DashBoardViewType, Globals.Dashboard.ViewType.JobSummaryView);
            mockDashboardView.SetupProperty(e => e.JobStatusFilterValue, 1);
            mockDashboardView.SetupProperty(e => e.JobNumberFilterValue, 2);
            mockDashboardView.SetupProperty(e => e.DivisionFilterValue, 3);
            mockDashboardView.SetupProperty(e => e.CustomerFilterValue, 4);
            mockDashboardView.SetupProperty(e => e.DateFilterTypeValue, Globals.Dashboard.DateFilterType.InitialCallDate);
            mockDashboardView.SetupProperty(e => e.BeginDateJobSummaryValue, new DateTime(2011, 04, 15));
            mockDashboardView.SetupProperty(e => e.EndDateJobSummaryValue, new DateTime(2011, 04, 25));
            mockDashboardView.SetupProperty(e => e.OrderBy, new string[] { "orderby", "ASC" });
            WebUtil util = new WebUtil();

            //Act
            string value = util.BuildQueryStringToPrintJobSummaryInDashBoardView(mockDashboardView.Object);

            //Assert
            Assert.AreEqual("?ViewPoint=2&JobStatusFilter=1&JobNumberFilter=2&DivisionFilter=3&CustomerFilter=4&DateTypeFilter=1&StartDateFilter=04/15/2011&EndDateFilter=04/25/2011&OrderBy=orderby ASC", value);
        }
 public void ConfigurePrintButtonScript()
 {
     try
     {
         WebUtil util = new WebUtil();
         string script = string.Empty;
         if (this.DashBoardViewType == Globals.Dashboard.ViewType.JobCallLogView)
             script = util.BuildNewWindowClientScript("/DashboardPrint.aspx", util.BuildQueryStringToPrintCallLogViewInDashBoardView(this), string.Empty, 800, 600, true, true, true);
         else if (this.DashBoardViewType == Globals.Dashboard.ViewType.JobSummaryView)
             script = util.BuildNewWindowClientScript("/DashboardPrint.aspx", util.BuildQueryStringToPrintJobSummaryInDashBoardView(this), string.Empty, 800, 600, true, true, true);
         btnPrint.OnClientClick = script;
     }
     catch (Exception)
     {
         DisplayMessage("Error while generating Print Button Script", false);
     }
 }