コード例 #1
0
    protected void ddlStation_SelectedIndexChanged(object sender, EventArgs e)
    {
        RentInfoHelper rentHelper = new RentInfoHelper();

        ddlPolice.DataSource = rentHelper.dtPoliceStation(ddlStation.SelectedValue);
        ddlPolice.DataBind();
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            UserInfoHelper helper     = new UserInfoHelper();
            RentInfoHelper rentHelper = new RentInfoHelper();

            ddlStation.DataSource = rentHelper.dtPoliceStation("0");
            ddlStation.DataBind();

            ddlPolice.DataSource = rentHelper.dtPoliceStation(ddlStation.SelectedValue);
            ddlPolice.DataBind();

            ddlUsers.DataSource = helper.GetCFUserList("7");
            ddlUsers.DataBind();
        }
    }
コード例 #3
0
ファイル: RentDetail.aspx.cs プロジェクト: Tony9866/anxinsu
    private void DataBindPoliceStation()
    {
        RentInfoHelper rentInfoHelper = new RentInfoHelper();

        DataTable dt = rentInfoHelper.dtPoliceStation(ddlPoliceStationParent.SelectedValue);

        if (dt != null)
        {
            ddlPoliceStation.DataSource     = dt;
            ddlPoliceStation.DataTextField  = "PSName";
            ddlPoliceStation.DataValueField = "PSID";
            ddlPoliceStation.DataBind();

            if (string.IsNullOrEmpty(RentNo) && EditType == "E")
            {
                AddListItem(ddlPoliceStation);
            }
        }
    }