jeudi 23 juillet 2015

asp.net C# multiple listview with multiple checkbox hitting procedure for refined in on checked change of Checkbox in pre render its showing old data

Ive wriiten Query to Search Based on 32 diff parameters now to do refine Search like in flipkart n other ecommerce sites in asp.net C# Ive multiple listview with multiple checkbox im hitting procedure to fetch refine in on checked change of Checkbox but in pre render its showing old data itself(Ive put on_prerender for listview and datapager for restricting data).

protected void OnCheckedChanged_ChkPreferedLocationBasedOnSkills(object sender, EventArgs e) { NewRefinedCity = null;

    foreach (ListViewDataItem li in lstviewLocation.Items)
    {
        CheckBox cb = (CheckBox)li.FindControl("ChkRefineLocation");
        if (cb.Checked)
        {
            HiddenField hdn = (HiddenField)li.FindControl("hdnRefineLocation");
            if (NewRefinedCity == null)
            {
                NewRefinedCity = hdn.Value;
            }
            else
            {

                NewRefinedCity += "," + hdn.Value;
            }
        }
    }
    DataSet dt = ObjBLCandidateAdvanceSearch.GetSearchedCandidates(keyskills, AreaOfInterest, MinExpectedCTC, MaxExpectedCTC, JobType,
             MinCurrentCTC, MaxCurrentCTC, CurrentJobTitle, CurrentCompany, EmployeeType, NewRefinedCity, MinTotalYearExp, MaxTotalYearExp, ProjectType,
             ProjectSkills, CurrentLocation, Gender, MinAge, MaxAge, Industry, FunctionalArea, CourseType, Course, Branch, MinPassoutYear, MaxPassoutYear,
             University, College, MinPercentage, MaxPercentage, MinCGPA, MaxCGPA, Visibility, ProjectTitle);
    if (dt.Tables[0].Rows.Count > 0)
    {
        lblMsg.Visible = false;
        LstSearchedCandidates.DataSource = dt.Tables[0];
        LstSearchedCandidates.DataBind();
    }
    else
    {
        lblMsg.Visible = true;
        lblMsg.Text = "No records found for the given Search";
        pgrSearchedCandidates.Visible = false;
    }


 //   BindGetNoOfCandidateSkills(dt.Tables[1]);
 ////   BindCandidatePreferedLocationBasedOnSkills(dt.Tables[2]);
 //   BindCandidatePreferedLocation(dt.Tables[3]);
 //   BindGetNoOfIndustry(dt.Tables[4]);
 //   BindGetNoOfCandidateFunctionalArea(dt.Tables[5]);
}




Aucun commentaire:

Enregistrer un commentaire