private void initLocation() { //初始化用户下拉列表 string sql = "select distinct location_code from ms_location_time where gzdd in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')" + "and location_code not in (select location_code from code_location where pline_code in (select pline_id from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "' )) order by location_code"; SqlLocation.SelectCommand = sql; SqlLocation.DataBind(); }
protected void ASPxListBoxLocation_Callback(object sender, CallbackEventArgsBase e) { string pline = e.Parameter; string sql = "select distinct location_code from ms_location_time where gzdd ='" + pline + "'" + "and location_code not in (select location_code from code_location ) order by location_code"; SqlLocation.SelectCommand = sql; SqlLocation.DataBind(); ASPxListBoxLocation.DataBind(); }