protected void BindData()
        {
            List <Modules> moduleNames = handler.GetModuleNames();

            DropDownListModules.DataSource     = moduleNames;
            DropDownListModules.DataTextField  = "ModuleName";
            DropDownListModules.DataValueField = "ModuleNo";
            DropDownListModules.DataBind();
        }
Beispiel #2
0
        protected void DropDownListProject_SelectedIndexChanged(object sender, EventArgs e)
        {
            SqlCommand     cd4;
            SqlDataAdapter da4;
            DataTable      dt4;

            cd4             = new SqlCommand("getModuleFromProject", con);
            cd4.CommandType = CommandType.StoredProcedure;
            cd4.Parameters.AddWithValue("@ProjectID", DropDownListProject.SelectedItem.Value);

            da4 = new SqlDataAdapter(cd4);
            dt4 = new DataTable();
            da4.Fill(dt4);



            DropDownListModules.DataSource     = dt4;
            DropDownListModules.DataTextField  = "ModuleName";
            DropDownListModules.DataValueField = "ModuleID";
            DropDownListModules.DataBind();


            SqlCommand     cd;
            SqlDataAdapter da;
            DataTable      dt;

            cd             = new SqlCommand("getTask", con);
            cd.CommandType = CommandType.StoredProcedure;
            cd.Parameters.AddWithValue("@ProjectID", DropDownListProject.SelectedItem.Value);
            cd.Parameters.AddWithValue("@ModuleID", DropDownListModules.SelectedItem.Value);
            da = new SqlDataAdapter(cd);
            dt = new DataTable();
            da.Fill(dt);
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }