public void LoadRegions(string ConstituencyId, DropDownList Region)
 {
     votObj.constId        = ConstituencyId;
     Region.DataSource     = votObj.getRegionMaster();
     Region.DataTextField  = "regName";
     Region.DataValueField = "regionId";
     Region.DataBind();
     Region.Items.Insert(0, new ListItem("Select Region Name", "0"));
 }
Exemplo n.º 2
0
 public void LoadRegions()
 {
     votObj.constId           = ddlConstituency.SelectedValue;
     ddlRegion.DataSource     = votObj.getRegionMaster();
     ddlRegion.DataTextField  = "regName";
     ddlRegion.DataValueField = "regionId";
     ddlRegion.DataBind();
     ddlRegion.Items.Insert(0, new ListItem("Select Region Name", "0"));
 }
    public static string loadRegion(string constId)
    {
        string   JSON     = "";
        VoterBLL voterObj = new VoterBLL();

        voterObj.constId = constId;
        DataTable dtTemp = voterObj.getRegionMaster();

        JSON = JsonConvert.SerializeObject(dtTemp, Newtonsoft.Json.Formatting.Indented);
        return(JSON);
    }