Exemplo n.º 1
0
 void bindConstituency()
 {
     votObj.constId                 = "%";
     ddlConstituency.DataSource     = votObj.getConstituencyMasterByID();
     ddlConstituency.DataTextField  = "constituencyName";
     ddlConstituency.DataValueField = "constituencyId";
     ddlConstituency.DataBind();
     ddlConstituency.Items.Insert(0, new ListItem("Select Constituency", "0"));
 }
    public static string LoadConstituency(string constId)
    {
        string   JSON     = "";
        VoterBLL voterObj = new VoterBLL();

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

        JSON = JsonConvert.SerializeObject(dtTemp, Newtonsoft.Json.Formatting.Indented);
        return(JSON);
    }
    public void LoadConstituencys()
    {
        votObj.constId                = "%";
        ddl_ConstInReg.DataSource     = votObj.getConstituencyMasterByID();
        ddl_ConstInReg.DataTextField  = "constituencyName";
        ddl_ConstInReg.DataValueField = "constituencyId";
        ddl_ConstInReg.DataBind();
        ddl_ConstInReg.Items.Insert(0, new ListItem("Select Constituency Name", "0"));

        ddl_ConstInArea.DataSource     = votObj.getConstituencyMasterByID();
        ddl_ConstInArea.DataTextField  = "constituencyName";
        ddl_ConstInArea.DataValueField = "constituencyId";
        ddl_ConstInArea.DataBind();
        ddl_ConstInArea.Items.Insert(0, new ListItem("Select Constituency Name", "0"));

        ddl_ConstInBooth.DataSource     = votObj.getConstituencyMasterByID();
        ddl_ConstInBooth.DataTextField  = "constituencyName";
        ddl_ConstInBooth.DataValueField = "constituencyId";
        ddl_ConstInBooth.DataBind();
        ddl_ConstInBooth.Items.Insert(0, new ListItem("Select Constituency Name", "0"));
    }