예제 #1
0
파일: Wizard.aspx.cs 프로젝트: chenx/Ci40_1
 protected void dlGeo_OnSelectedIndexChanged(object sender, EventArgs e)
 {
     string id = dlGeo.SelectedValue.ToString();
     //string sql = "SELECT ID, StateName FROM V_Geo_State WHERE GeoID = " + ClsDB.sqlEncode(id);
     string sql = "SELECT State, State FROM V_CountryStates WHERE Country = " + ClsDB.sqlEncode(id);
     ClsWizard wizard = new ClsWizard();
     wizard.connection().Open();
     wizard.populateDropdownList(dlState, sql, null, null);
     wizard.connection().Close();
     initSelectedStateList();
 }
예제 #2
0
파일: Wizard.aspx.cs 프로젝트: chenx/Ci40_1
    private void updateStateDrowdownLists(List<ClsKV> StateList)
    {
        ClsWizard wizard = new ClsWizard();
        string id = dlGeo.SelectedValue.ToString();
        //string sql = "SELECT ID, StateName FROM V_Geo_State WHERE GeoID = " + ClsDB.sqlEncode(id);
        string sql = "SELECT ID, State FROM V_CountryStates WHERE Country = " + ClsDB.sqlEncode(id);
        wizard.connection().Open();
        wizard.populateDropdownList(dlState, sql, null, StateList);
        wizard.populateDropdownList(dlStateSelected, StateList);
        wizard.connection().Close();

        Button b = wizard1.FindControl("StartNavigationTemplateContainerID").FindControl("StartNextButton") as Button;
        if (b != null) b.Enabled = (StateList.Count > 0);
    }
예제 #3
0
파일: Wizard.aspx.cs 프로젝트: chenx/Ci40_1
    protected void initStep1()
    {
        ClsWizard wizard = new ClsWizard();
        string sql = "SELECT Country, Country FROM T_CountryList WHERE Abbreviation in ('CN', 'US')";
        wizard.connection().Open();
        wizard.populateDropdownList(dlGeo, sql, "-- Select One --", null);
        sql = "SELECT ID, State FROM V_CountryStates WHERE ID = -1";
        wizard.populateDropdownList(dlState, sql, null, null);
        wizard.connection().Close();
        dlGeo.SelectedIndex = -1;
        dlGeo.SelectedIndex = -1;
        //Response.Write(dlGeo.SelectedIndex);

        Button b = wizard1.FindControl("StartNavigationTemplateContainerID").FindControl("StartNextButton") as Button;
        if (b != null) b.Enabled = false;
    }