private void InitStartUp()
        {
            if (IsPostBack)
            {
                SaveUploaderImage();
            }
            else
            {
                Master.ManageMessages();
            }

            Master.Master.ScriptBundles.Add("~/" + Utilities.GetAdministrationFolder() + "/scripts/cm/moviedetailspictures.js");
            Master.Master.PermissionCode = "15DF4BFC-D656-42E1-9019-45BC68037257";
            Master.Pictures.Attributes.Add("class", "current_link");
            Master.Pictures.HRef = "#";

            Master.Master.EnableFancyBox = true;

            if (int.TryParse(Request.QueryString["ID"], out _movieId) && !IsPostBack)
            {
                Master.General.HRef = "MovieDetails.aspx?id=" + _movieId;

                var movie = new Movie().GetMovieByID(_movieId, IncludeFiles: true);

                Master.Master.PageTitle = movie.GeorgianTitle;

                ListRepeater.DataSource = movie.Files;
                ListRepeater.DataBind();
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Create an object and create the work item
            GetWorkItems customer = new GetWorkItems();

            // Declare Lists to hold work item fields
            List <int>    resultWIID          = new List <int>();
            List <string> resultWIState       = new List <string>();
            List <string> resultWITitle       = new List <string>();
            List <string> resultWIDescription = new List <string>();
            List <string> resultWISubmittedBy = new List <string>();

            // Retrieve the work item fields
            resultWIID          = customer.GetWorkItemsByQuery().Item1;
            resultWIState       = customer.GetWorkItemsByQuery().Item2;
            resultWITitle       = customer.GetWorkItemsByQuery().Item3;
            resultWIDescription = customer.GetWorkItemsByQuery().Item4;
            resultWISubmittedBy = customer.GetWorkItemsByQuery().Item5;

            List <string> openList     = new List <string>();
            List <string> closedList   = new List <string>();
            int           active_count = 0;
            int           closed_count = 0;

            //Populate open items table
            for (int i = 0; i < resultWIID.Count; i++)
            {
                if (resultWIState[i] != "Closed")
                {
                    openList.Add("<strong>ID</strong>: " + resultWIID[i].ToString() + "<br/><strong>State</strong>: " + resultWIState[i] + "<br/><strong>Title</strong>: " + resultWITitle[i] + "<br/><strong>Description</strong>: " + resultWIDescription[i] + "<br/><strong>Submitted By</strong>:" + resultWISubmittedBy[i]);
                    ListRepeater.DataSource = openList;
                    ListRepeater.DataBind();
                    active_count++;
                }

                if (resultWIState[i] == "Closed")
                {
                    closedList.Add("<strong>ID:</strong> " + resultWIID[i].ToString() + "<br/><strong>State:</strong> " + resultWIState[i] + "<br/><strong>Title:</strong> " + resultWITitle[i] + "<br/><strong>Description:</strong> " + resultWIDescription[i] + "<br/><strong>Submitted By:</strong>" + resultWISubmittedBy[i]);
                    Repeater2.DataSource = closedList;
                    Repeater2.DataBind();
                    closed_count++;
                }
            }

            // Set the total tickets in the footer
            lblActiveCount.Text = active_count.ToString();
            lblClosedCount.Text = closed_count.ToString();
        }// End of page load