コード例 #1
0
    public void ShowGridView()
    {
        DataTable ObjBranchTable = MyJobPortalModel.Branch.GetBranchRecords("CompanyId=" + Request.QueryString["Id"]);

        GridViewBranches.DataSource = ObjBranchTable;
        GridViewBranches.DataBind();
        LblNumberOfBranches.Text = GridViewBranches.Rows.Count.ToString();
    }
コード例 #2
0
    public void ShowGridView()
    {
        DataTable ObjTable = JobPost_Branches.GetJobPost_BranchesRecords("JobPostId=" + Request.QueryString["Id"]);
        //throw new Exception(ObjTable.Rows.Count.ToString());
        //throw new Exception(ObjTable.Columns.Count.ToString());
        DataTable ActualTable = Branch.GetBranchRecords("");

        ActualTable.Rows.Clear();
        foreach (DataRow ObjRow in ObjTable.Rows)
        {
            DataTable ObjBranchTable = Branch.GetBranchRecords("Id=" + ObjRow["BranchId"]);
            ActualTable.ImportRow(ObjBranchTable.Rows[0]);
        }
        //throw new Exception(ActualTable.Columns.Count.ToString());
        GridViewBranches.DataSource = ActualTable;
        GridViewBranches.DataBind();
    }