private void loadGrid()
    {
        gvAssessmentnCareParent.DataSource = AssessmentnCareParentManager.GetAllAssessmentnCareParents();
        gvAssessmentnCareParent.DataBind();

        List <AssessmentnCareChild> assessmentCareChilds = new List <AssessmentnCareChild>();

        assessmentCareChilds = AssessmentnCareChildManager.GetAllAssessmentnCareChilds();

        foreach (GridViewRow gvr in gvAssessmentnCareParent.Rows)
        {
            HiddenField hfAssessmentnCareParentID = (HiddenField)gvr.FindControl("hfAssessmentnCareParentID");
            DataList    dlAssessmentnCareChild    = (DataList)gvr.FindControl("dlAssessmentnCareChild");

            List <AssessmentnCareChild> assessmentCareChildByParentID = new List <AssessmentnCareChild>();
            foreach (AssessmentnCareChild item in assessmentCareChilds)
            {
                if (item.AssessmentnCareParentID.ToString() == hfAssessmentnCareParentID.Value)
                {
                    assessmentCareChildByParentID.Add(item);
                }
            }

            dlAssessmentnCareChild.DataSource = assessmentCareChildByParentID;
            dlAssessmentnCareChild.DataBind();
        }
    }
    private void loadAssessmentnCareParent()
    {
        ListItem li = new ListItem("Select AssessmentnCareParent...", "0");

        ddlAssessmentnCareParent.Items.Add(li);

        List <AssessmentnCareParent> assessmentnCareParents = new List <AssessmentnCareParent>();

        assessmentnCareParents = AssessmentnCareParentManager.GetAllAssessmentnCareParents();
        foreach (AssessmentnCareParent assessmentnCareParent in assessmentnCareParents)
        {
            ListItem item = new ListItem(assessmentnCareParent.AssessmentnCareParentName.ToString(), assessmentnCareParent.AssessmentnCareParentID.ToString());
            ddlAssessmentnCareParent.Items.Add(item);
        }
    }
 private void showAssessmentnCareParentGrid()
 {
     gvAssessmentnCareParent.DataSource = AssessmentnCareParentManager.GetAllAssessmentnCareParents();
     gvAssessmentnCareParent.DataBind();
 }