Пример #1
0
    private void GetAllTests()
    {
        var          franchisorDal = new FranchisorDAL();
        List <ETest> testobject    = franchisorDal.GetTest(string.Empty, 3);

        chklsttestassociated.Items.Clear();
        for (int icount = 0; icount < testobject.Count; icount++)
        {
            chklsttestassociated.Items.Add(new ListItem(HttpUtility.HtmlEncode(testobject[icount].Name), HttpUtility.HtmlEncode(testobject[icount].TestID.ToString())));
        }
    }
    private void FillTest()
    {
        FranchisorDAL masterDAL = new FranchisorDAL();
        // Gets All Active Tests
        var testobject = masterDAL.GetTest(string.Empty, 3);

        DataTable dtTest = new DataTable();
        dtTest.Columns.Add("TestId", typeof(Int64));
        dtTest.Columns.Add("Test");

        if (testobject != null)
        {
            for (int icount = 0; icount < testobject.Count; icount++)
            {
                dtTest.Rows.Add(new object[] { testobject[icount].TestID, testobject[icount].Name });
            }
        }
        ViewState["DataTableTest"] = dtTest;

    }