protected void BtnviewEmployee_Click(object sender, EventArgs e) { if (DdlCity.SelectedIndex == 0) { cityid = branchid = deptid = 0; } else { cityid=Convert.ToInt64(DdlCity.SelectedValue.ToString()); branchid=Convert.ToInt64(DdlBranch.SelectedValue.ToString()); if (branchid == 0) { deptid = 0; } else { deptid = Convert.ToInt64(DdlDepartment.SelectedValue.ToString()); } } countryid = Convert.ToInt64(Ddlcountry.SelectedValue.ToString()); if (countryid != 0 && cityid != 0 && branchid != 0 && deptid != 0) { dsinfo = bl.BsearchEmp(countryid, cityid, branchid, deptid); } else if (countryid != 0 && cityid != 0 && branchid != 0) { dsinfo = bl.searchEmployee(countryid, cityid, branchid); } else if (countryid != 0 && cityid != 0 ) { dsinfo = bl.searchEmployee(countryid, cityid); } else { dsinfo = bl.searchEmployee(countryid); } Session["mydataset"] = dsinfo; GridView1.DataSource = (DataSet)Session["mydataset"]; GridView1.DataBind(); BtnDumpToExcel.Visible = true; BtnPrint.Visible = true; } protected void Get_Employee_Id_from_grid(object sender, EventArgs e) { Button btn= sender as Button; if (btn != null) { string Employee_Id = btn.CommandArgument; Session["Gridview_Employee_id"] = Employee_Id; Response.Redirect("ViewEmployeeDetail.aspx"); }
GridView1.DataSource = (DataSet)Session["mydataset"]; GridView1.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)