示例#1
0
        private void BindLists()
        {
            d.VisualCriteriaData vcd = new d.VisualCriteriaData();

            cblGender.Items.Clear();
            cblGender.Items.Add(new ListItem("male", "'m'"));
            cblGender.Items.Add(new ListItem("female", "'f'"));

            cblRace.DataSource     = vcd.GetRaceList();
            cblRace.DataTextField  = "description";
            cblRace.DataValueField = "id";
            cblRace.DataBind();

            cblHair.DataSource     = vcd.GetHairColorList();
            cblHair.DataTextField  = "description";
            cblHair.DataValueField = "id";
            cblHair.DataBind();

            cblAge.DataSource     = vcd.GetAgeRangeList();
            cblAge.DataTextField  = "description";
            cblAge.DataValueField = "id";
            cblAge.DataBind();

            cblWeight.DataSource     = vcd.GetWeightRangeList();
            cblWeight.DataTextField  = "description";
            cblWeight.DataValueField = "id";
            cblWeight.DataBind();
        }
示例#2
0
        private void BindLists(d.Suspect suspect)
        {
            d.VisualCriteriaData vcd = new d.VisualCriteriaData();

            cblGender.Items.Clear();
            cblGender.Items.Add(new ListItem("male", "'m'"));
            cblGender.Items.Add(new ListItem("female", "'f'"));
            cblGender.SelectedValue = "'" + suspect.Gender + "'";

            cblRace.DataSource     = vcd.GetRaceList();
            cblRace.DataTextField  = "description";
            cblRace.DataValueField = "id";
            cblRace.DataBind();
            cblRace.SelectedValue = suspect.RaceId.ToString();

            cblHair.DataSource     = vcd.GetHairColorList();
            cblHair.DataTextField  = "description";
            cblHair.DataValueField = "id";
            cblHair.DataBind();
            cblHair.SelectedValue = suspect.HairColorId.ToString();

            cblAge.DataSource     = vcd.GetAgeRangeList();
            cblAge.DataTextField  = "description";
            cblAge.DataValueField = "id";
            cblAge.DataBind();
            cblAge.SelectedValue = suspect.AgeRangeId.ToString();

            cblWeight.DataSource     = vcd.GetWeightRangeList();
            cblWeight.DataTextField  = "description";
            cblWeight.DataValueField = "id";
            cblWeight.DataBind();
            cblWeight.SelectedValue = suspect.WeightRangeId.ToString();
        }
示例#3
0
 protected override void OnInit(EventArgs e)
 {
     vcd             = new d.VisualCriteriaData();
     dtRace          = vcd.GetRaceList();
     dtHair          = vcd.GetHairColorList();
     dtAge           = vcd.GetAgeRangeList();
     dtWeight        = vcd.GetWeightRangeList();
     sbJavaScript    = new StringBuilder();
     photosToDisplay = 10;
     this.rptPhotos.ItemDataBound += new RepeaterItemEventHandler(rptPhotos_ItemDataBound);
     base.OnInit(e);
 }
示例#4
0
        private void BindData()
        {
            d.Suspect suspect = new d.Suspect(GetId());
            tbxNumber.Text      = suspect.Number;
            tbxDescription.Text = suspect.Description;
            string urlMedium = b.UrlHelper.GetSuspectImageUrl(GetId(), b.ImageHelper.MEDIUM_PHOTO_SUFFIX);

            ltrPhoto.Text = "<img src='" + urlMedium + "' align='right' border='1'>";

            d.VisualCriteriaData vcd = new d.VisualCriteriaData();

            ddlGender.Items.Clear();
            ddlGender.Items.Add(new ListItem("male", "m"));
            ddlGender.Items.Add(new ListItem("female", "f"));
            ddlGender.SelectedValue = suspect.Gender;

            ddlRace.DataSource     = vcd.GetRaceList();
            ddlRace.DataTextField  = "description";
            ddlRace.DataValueField = "id";
            ddlRace.DataBind();
            ddlRace.SelectedValue = suspect.RaceId.ToString();

            ddlHairColor.DataSource     = vcd.GetHairColorList();
            ddlHairColor.DataTextField  = "description";
            ddlHairColor.DataValueField = "id";
            ddlHairColor.DataBind();
            ddlHairColor.SelectedValue = suspect.HairColorId.ToString();

            ddlAgeRange.DataSource     = vcd.GetAgeRangeList();
            ddlAgeRange.DataTextField  = "description";
            ddlAgeRange.DataValueField = "id";
            ddlAgeRange.DataBind();
            ddlAgeRange.SelectedValue = suspect.AgeRangeId.ToString();

            ddlWeightRange.DataSource     = vcd.GetWeightRangeList();
            ddlWeightRange.DataTextField  = "description";
            ddlWeightRange.DataValueField = "id";
            ddlWeightRange.DataBind();
            ddlWeightRange.SelectedValue = suspect.WeightRangeId.ToString();
        }
示例#5
0
        private void BindData()
        {
            d.VisualCriteriaData vcd = new d.VisualCriteriaData();

            ddlGender.Items.Clear();
            ddlGender.Items.Add(new ListItem("select one...", ""));
            ddlGender.Items.Add(new ListItem("male", "m"));
            ddlGender.Items.Add(new ListItem("female", "f"));

            ddlRace.Items.Clear();
            ddlRace.DataSource     = vcd.GetRaceList();
            ddlRace.DataTextField  = "description";
            ddlRace.DataValueField = "id";
            ddlRace.DataBind();
            ddlRace.Items.Insert(0, new ListItem("select one...", ""));

            ddlHairColor.Items.Clear();
            ddlHairColor.DataSource     = vcd.GetHairColorList();
            ddlHairColor.DataTextField  = "description";
            ddlHairColor.DataValueField = "id";
            ddlHairColor.DataBind();
            ddlHairColor.Items.Insert(0, new ListItem("select one...", ""));

            ddlAgeRange.Items.Clear();
            ddlAgeRange.DataSource     = vcd.GetAgeRangeList();
            ddlAgeRange.DataTextField  = "description";
            ddlAgeRange.DataValueField = "id";
            ddlAgeRange.DataBind();
            ddlAgeRange.Items.Insert(0, new ListItem("select one...", ""));

            ddlWeightRange.Items.Clear();
            ddlWeightRange.DataSource     = vcd.GetWeightRangeList();
            ddlWeightRange.DataTextField  = "description";
            ddlWeightRange.DataValueField = "id";
            ddlWeightRange.DataBind();
            ddlWeightRange.Items.Insert(0, new ListItem("select one...", ""));
        }