Exemplo n.º 1
0
        private void BindData()
        {
            int lineupId = Convert.ToInt32(Request["Id"]);

            d.Lineup  lineup   = new d.Lineup(lineupId);
            DataTable dtPhotos = new d.PhotoData().GetPhotosByLineup(lineupId);

            int           photoId;
            int           dtPhotosPosition = 0;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < POSITIONS; i++)
            {
                sb.Append("\n\t<td style=\"width:96px;\">");
                if (i == lineup.SuspectPhotoPosition)
                {
                    sb.AppendFormat("<img src='{0}' style=\"border:2px red solid;\">", b.UrlHelper.GetSuspectImageUrl(lineup.SuspectId, b.ImageHelper.SMALL_PHOTO_SUFFIX));
                }
                else
                {
                    photoId = Convert.ToInt32(dtPhotos.Rows[dtPhotosPosition][0]);
                    sb.AppendFormat("<img src='{0}' style=\"border:1px #666666 solid;\">", b.UrlHelper.GetPhotoImageUrl(photoId, b.ImageHelper.SMALL_PHOTO_SUFFIX));
                    dtPhotosPosition++;
                }
                sb.Append("</td>");
            }
            ltrLineup.Text = sb.ToString();

            ltrStart.Text = "<a href=\"javascript:open_win(" + lineupId + ");\">Start Lineup Administration</a>";
        }
Exemplo n.º 2
0
        private void loadPhoto()
        {
            d.Lineup  lineup            = new d.Lineup(LineupId);
            DataTable dtPhotos          = new d.PhotoData().GetPhotosByLineup(LineupId);
            int       lastPhotoPosition = dtPhotos.Rows.Count - 1;

            if (CurrentPhotoIndex > lastPhotoPosition && SuspectIsProcessed)
            {
                pnlPhotoView.Visible     = false;
                pnlFinalComments.Visible = true;
            }
            else
            {
                if (!SuspectIsProcessed && lineup.SuspectPhotoPosition == CurrentPhotoIndex)
                {
                    lblPhoto.Text         = "<img src='" + b.UrlHelper.GetSuspectImageUrl(lineup.SuspectId, b.ImageHelper.LARGE_PHOTO_SUFFIX) + "' border='1'>";
                    CurrentPhotoId        = -1;
                    CurrentPhotoIsSuspect = true;
                }
                else
                {
                    int photoId = Convert.ToInt32(dtPhotos.Rows[CurrentPhotoIndex][0]);
                    lblPhoto.Text = "<img src='" + b.UrlHelper.GetPhotoImageUrl(photoId, b.ImageHelper.LARGE_PHOTO_SUFFIX) + "' border='1'>";
                    CurrentPhotoIndex++;
                    CurrentPhotoId        = photoId;
                    CurrentPhotoIsSuspect = false;
                }
            }
        }
Exemplo n.º 3
0
        private void rptResults_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Footer)
            {
                string photoId    = DataBinder.Eval(e.Item.DataItem, "photoid").ToString();
                int    resultCode = Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "resultcode"));
                string certainty  = DataBinder.Eval(e.Item.DataItem, "certainty").ToString();

                Literal ltrPhoto     = (Literal)e.Item.FindControl("ltrPhoto");
                Literal ltrPhotoRef  = (Literal)e.Item.FindControl("ltrPhotoRef");
                Literal ltrResult    = (Literal)e.Item.FindControl("ltrResult");
                Literal ltrCertainty = (Literal)e.Item.FindControl("ltrCertainty");

                StringBuilder sb = new StringBuilder();
                if (photoId == "")
                {
                    int          lineupViewId = Convert.ToInt32(Request["Id"]);
                    d.LineupView lv           = new d.LineupView(lineupViewId);
                    d.Lineup     lineup       = new d.Lineup(lv.LineupId);
                    sb.AppendFormat("<img src='{0}' width='120px' style='border:2px solid red;'>",
                                    b.UrlHelper.GetSuspectImageUrl(lineup.SuspectId, b.ImageHelper.SMALL_PHOTO_SUFFIX));
                }
                else
                {
                    sb.AppendFormat("<img src='{0}' width='120px' style='border:1px solid #777777;'>",
                                    b.UrlHelper.GetPhotoImageUrl(Convert.ToInt32(photoId), b.ImageHelper.SMALL_PHOTO_SUFFIX));
                }

                ltrPhoto.Text = sb.ToString();

                ltrPhotoRef.Text  = photoId;
                ltrResult.Text    = interpretResult(resultCode);
                ltrCertainty.Text = certainty;
            }
        }
Exemplo n.º 4
0
        private void BindData()
        {
            int lineupViewId = Convert.ToInt32(Request["Id"]);

            d.LineupView lv     = new d.LineupView(lineupViewId);
            d.Lineup     lineup = new d.Lineup(lv.LineupId);
            ltrWitness.Text        = lv.WitnessFirstName + ", " + lv.WitnessLastName;
            ltrAdministered.Text   = lv.Administered + " by " + lv.AdministeredByName;
            ltrRelevanceNotes.Text = lv.RelevanceNotes.Replace("\n", "<br>");

            DataTable dtResults = new d.PhotoViewData().GetByLineupView(lineupViewId);

            rptResults.DataSource = dtResults;
            rptResults.DataBind();
        }
Exemplo n.º 5
0
        private void BindData()
        {
            ltrJsHelper1.Text = System.Configuration.ConfigurationSettings.AppSettings["JsHelper1"];
            ltrJsHelper2.Text = System.Configuration.ConfigurationSettings.AppSettings["JsHelper2"];

            btnSave.Attributes["onclick"] = "javascript:return confirm('Are you sure you want to save this lineup? No further edits will be allowed.')";

            d.Lineup  lineup  = new d.Lineup(getLineupId());
            d.Suspect suspect = new d.Suspect(lineup.SuspectId);

            BindPosition();
            BindLineup(lineup.SuspectId);
            BindLists(suspect);
            BindToDisplayList();
            BindPhotos();
        }
Exemplo n.º 6
0
        private void BindData()
        {
            int lineupId = Convert.ToInt32(Request["Id"]);

            d.Lineup  lineup   = new d.Lineup(lineupId);
            DataTable dtPhotos = new d.PhotoData().GetPhotosByLineup(lineupId);

            int           photoId;
            int           dtPhotosPosition = 0;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < POSITIONS; i++)
            {
                sb.Append("\n\t<td style=\"width:96px;\">");
                if (i == lineup.SuspectPhotoPosition)
                {
                    sb.AppendFormat("<img src='{0}' style=\"border:2px red solid;\">", b.UrlHelper.GetSuspectImageUrl(lineup.SuspectId, b.ImageHelper.SMALL_PHOTO_SUFFIX));
                }
                else
                {
                    photoId = Convert.ToInt32(dtPhotos.Rows[dtPhotosPosition][0]);
                    sb.AppendFormat("<img src='{0}' style=\"border:1px #666666 solid;\">", b.UrlHelper.GetPhotoImageUrl(photoId, b.ImageHelper.SMALL_PHOTO_SUFFIX));
                    dtPhotosPosition++;
                }
                sb.Append("</td>");
            }
            ltrLineup.Text = sb.ToString();

            ltrDescription.Text = lineup.Description;
            ltrNotes.Text       = lineup.Notes;

            d.CCase ccase = new d.CCase(lineup.CaseId);
            ltrCase.Text = ccase.Number;

            d.Suspect suspect = new d.Suspect(lineup.SuspectId);
            ltrSuspect.Text = suspect.Number;
        }
Exemplo n.º 7
0
 private void ddlPosition_SelectedIndexChanged(object sender, EventArgs e)
 {
     d.Lineup lineup = new d.Lineup(getLineupId());
     BindLineup(lineup.SuspectId);
 }