please help me... There is already an open DataReader associated with this Command which must be closed first : **i have written code to filter data from database(filteration is done by 2 dropdownlist and between 2 dates) i am getting "There is already an open DataReader associated with this Command which must be closed first." error please help.. **
[this is my front end][1]
   

    public partial class data : System.Web.UI.Page
    {
        SqlConnection con;
      
       
        string constring = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;
       
        protected void Page_Load(object sender, EventArgs e)
        {
    
       
        }
    
        protected void btnshow_Click(object sender, EventArgs e)
        {
           
            
            if ((ddldept.SelectedValue == "all") && (ddldesig.SelectedValue!="all") )
            {
                con = new SqlConnection(constring);
                con.Open();
                string desig = ddldesig.SelectedValue;
                DateTime mydate;
                mydate = Convert.ToDateTime(tbfrom.Text);
                string from = Convert.ToString(mydate);
                mydate = Convert.ToDateTime(tbto.Text);
                string to = Convert.ToString(mydate);
                SqlCommand cmddeptall = new SqlCommand("select * from registration where Department IN('Computer Science Engineering','Mechanical Engineering','Electrical And Electronics','Electronics And Communication','Civil Engineering','Science And Humanity') AND PostAppliedFor='"+desig+"' AND (RegisteredDate BETWEEN '"+from+"' AND '"+to+"')",con);
                cmddeptall.ExecuteReader();
                SqlDataAdapter da = new SqlDataAdapter(cmddeptall);
                DataSet ds = new DataSet();
                da.Fill(ds, "registration");
                GridView1.DataSource = ds.Tables["registration"];
                GridView1.DataBind();
                con.Close();
            }
            
            else if ((ddldept.SelectedValue == "all") && (ddldesig.SelectedValue == "all"))
            {
                SqlConnection con;
    
    
                string constring = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;
       
                con = new SqlConnection(constring);
                try
                {
                    con.Open();
    
                    DateTime mydate;
                    mydate = Convert.ToDateTime(tbfrom.Text);
                    string from = Convert.ToString(mydate);
                    mydate = Convert.ToDateTime(tbto.Text);
                    string to = Convert.ToString(mydate);
                    string query = "select * from registration where Department IN('Computer Science Engineering','Mechanical Engineering','Electrical And Electronics','Electronics And Communication','Civil Engineering','Science And Humanity') AND PostAppliedFor IN('Principal','Professor','Associate Professor','Assistant Professor','Placement Officer','SoftSkills Trainer','Administrative Officer','Office Superintendent','Lab Technician') AND (RegisteredDate BETWEEN  '" + from + "' AND '" + to + "')";
                    SqlCommand cmd = new SqlCommand(query, con);
                    cmd.ExecuteReader();
                    SqlDataAdapter da = new SqlDataAdapter(cmd);
                    DataSet ds = new DataSet();
                    da.Fill(ds, "registration");
                    GridView1.DataSource = ds;
                    GridView1.DataBind();
    
    
                    con.Close();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    con.Close();
                }     
               
            }
            else if ((ddldept.SelectedValue != "all") && (ddldesig.SelectedValue != "all"))
            {
                con = new SqlConnection(constring);
                con.Open();
                string desig = ddldesig.SelectedValue;
                string dept = ddldept.SelectedValue;
                DateTime mydate;
                mydate = Convert.ToDateTime(tbfrom.Text);
                string from = Convert.ToString(mydate);
                mydate = Convert.ToDateTime(tbto.Text);
                string to = Convert.ToString(mydate);
                SqlCommand cmddeptall = new SqlCommand("select * from registration where Department='"+dept+"' AND PostAppliedFor='"+desig+"' AND (RegisteredDate BETWEEN '" + from + "' AND '" + to + "')", con);
                cmddeptall.ExecuteReader();
                SqlDataAdapter da = new SqlDataAdapter(cmddeptall);
                DataSet ds = new DataSet();
                da.Fill(ds, "registration");
                GridView1.DataSource = ds.Tables["registration"];
                GridView1.DataBind();
                con.Close();
            }
            con.Close
        }

  [1]: http://i.stack.imgur.com/Mvsvf.png

