private void BindRegionList()
 {
     DropDownListRegion.DataSource     = Region.GetRegionList();
     DropDownListRegion.DataTextField  = "Description";
     DropDownListRegion.DataValueField = "RegionId";
     DropDownListRegion.DataBind();
 }
Esempio n. 2
0
 protected void FillRegion()
 {
     try
     {
         openconnection();
         System.Data.DataSet dsClient;
         dsClient = SqlHelper.ExecuteDataset(cn, System.Data.CommandType.StoredProcedure, "PS_Region");
         DropDownListRegion.DataTextField  = "Region";
         DropDownListRegion.DataValueField = "iPKRegion";
         DropDownListRegion.DataSource     = dsClient;
         DropDownListRegion.DataBind();
         DropDownListRegion.Items.Add(new ListItem("Please select", "0"));
         DropDownListRegion.ClearSelection();
         DropDownListRegion.Items.FindByValue("0").Selected = true;
     }
     catch (Exception ex)
     {
         //lblMsg.Text = ex.Message;
         //lblMsg.ForeColor = System.Drawing.Color.Red;
     }
     finally
     {
         cn.Close();
     }
 }
Esempio n. 3
0
        private void BindRegion()
        {
            DropDownListRegion.DataSource     = SPARInsightManagement.Web.Code.Region.GetRegionList();
            DropDownListRegion.DataTextField  = "Description";
            DropDownListRegion.DataValueField = "RegionId";
            DropDownListRegion.DataBind();

            if (DropDownListRegion.Items.Count > 1)
            {
                DropDownListRegion.Items.Insert(0, new ListItem("Please select", "0"));
            }
        }