private void Page_Load(object sender, EventArgs e)
      {
          HtmlForm form1 = (HtmlForm)this.FindControl("Form1");

          this.GHTTestBegin(form1);
          base.GHTActiveSubTest = this.GHTSubTest1;
          try
          {
              this.DataGrid1.DataSource = GHDataSources.DSDataTable();
              ButtonColumn column2 = new ButtonColumn();
              ButtonColumn column3 = new ButtonColumn();
              ButtonColumn column1 = new ButtonColumn();
              column2.DataTextField = "ID";
              column3.DataTextField = "Name";
              column1.DataTextField = "Company";
              this.DataGrid1.Columns.Add(column2);
              this.DataGrid1.Columns.Add(column3);
              this.DataGrid1.Columns.Add(column1);
              this.DataGrid1.DataBind();
          }
          catch (Exception exception2)
          {
              Exception exception1 = exception2;
              this.GHTSubTestUnexpectedExceptionCaught(exception1);
          }
          this.GHTTestEnd();
      }
Beispiel #2
0
        private void DataGridTest(string TestName, DataGridColumn c)
        {
            DataGrid grid1 = new DataGrid();

            this.GHTSubTestBegin(TestName);
            try
            {
                grid1.Columns.Add(c);
                grid1.DataSource = GHDataSources.DSDataTable();
                grid1.ShowFooter = true;
                grid1.DataBind();
                base.GHTActiveSubTest.Controls.Add(grid1);
            }
            catch (Exception exception2)
            {
                Exception exception1 = exception2;
                this.GHTSubTestUnexpectedExceptionCaught(exception1);
                grid1 = null;
            }
            this.GHTSubTestEnd();
        }
Beispiel #3
0
        private void Page_Load(object sender, EventArgs e)
        {
            HtmlForm form1 = (HtmlForm)this.FindControl("Form1");

            this.GHTTestBegin(form1);
            base.GHTActiveSubTest = this.GHTSubTest1;
            try
            {
                this.DataGrid1.DataSource = GHDataSources.DSDataTable();
                ButtonColumn column2 = new ButtonColumn();
                ButtonColumn column3 = new ButtonColumn();
                ButtonColumn column1 = new ButtonColumn();
                column2.DataTextField        = "ID";
                column3.DataTextField        = "Name";
                column1.DataTextField        = "Company";
                column2.DataTextFormatString = "";
                column3.DataTextFormatString = "(format str)";
                column1.DataTextFormatString = "{0:c5}";
                this.DataGrid1.Columns.Add(column2);
                this.DataGrid1.Columns.Add(column3);
                this.DataGrid1.Columns.Add(column1);
                this.DataGrid1.DataBind();
                this.GHTSubTestAddResult(column2.DataTextFormatString);
                this.GHTSubTestAddResult(column3.DataTextFormatString);
                this.GHTSubTestAddResult(column1.DataTextFormatString);
            }
            catch (Exception exception5)
            {
                // ProjectData.SetProjectError(exception5);
                Exception exception1 = exception5;
                this.GHTSubTestUnexpectedExceptionCaught(exception1);
                // ProjectData.ClearProjectError();
            }
            base.GHTActiveSubTest = this.Ghtsubtest2;
            try
            {
                this.DataGrid2.DataSource = GHDataSources.DSDataTable();
                ButtonColumn column4 = new ButtonColumn();
                ButtonColumn column5 = new ButtonColumn();
                ButtonColumn column6 = new ButtonColumn();
                column4.DataTextField        = "ID";
                column5.DataTextField        = "ID";
                column6.DataTextField        = "ID";
                column4.DataTextFormatString = "";
                column5.DataTextFormatString = "(format str)";
                column6.DataTextFormatString = "{0:c5}";
                this.DataGrid2.Columns.Add(column4);
                this.DataGrid2.Columns.Add(column5);
                this.DataGrid2.Columns.Add(column6);
                this.DataGrid2.DataBind();
                this.GHTSubTestAddResult(column4.DataTextFormatString);
                this.GHTSubTestAddResult(column5.DataTextFormatString);
                this.GHTSubTestAddResult(column6.DataTextFormatString);
            }
            catch (Exception exception6)
            {
                // ProjectData.SetProjectError(exception6);
                Exception exception2 = exception6;
                this.GHTSubTestUnexpectedExceptionCaught(exception2);
                // ProjectData.ClearProjectError();
            }
            base.GHTActiveSubTest = this.Ghtsubtest3;
            try
            {
                this.DataGrid3.DataSource = GHDataSources.DSDataTable();
                this.DataGrid3.DataBind();
                this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid3.Columns[0]).DataTextFormatString);
                this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid3.Columns[1]).DataTextFormatString);
                this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid3.Columns[2]).DataTextFormatString);
            }
            catch (Exception exception7)
            {
                // ProjectData.SetProjectError(exception7);
                Exception exception3 = exception7;
                this.GHTSubTestUnexpectedExceptionCaught(exception3);
                // ProjectData.ClearProjectError();
            }
            base.GHTActiveSubTest = this.Ghtsubtest4;
            try
            {
                this.DataGrid4.DataSource = GHDataSources.DSDataTable();
                this.DataGrid4.DataBind();
                this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid4.Columns[0]).DataTextFormatString);
                this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid4.Columns[1]).DataTextFormatString);
                this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid4.Columns[2]).DataTextFormatString);
            }
            catch (Exception exception8)
            {
                // ProjectData.SetProjectError(exception8);
                Exception exception4 = exception8;
                this.GHTSubTestUnexpectedExceptionCaught(exception4);
                // ProjectData.ClearProjectError();
            }
            this.GHTTestEnd();
        }
      private void Page_Load(object sender, EventArgs e)
      {
          HtmlForm form1 = (HtmlForm)this.FindControl("Form1");

          this.GHTTestBegin(form1);
          base.GHTActiveSubTest = this.GHTSubTest1;
          try
          {
              this.DataGrid1.DataSource = GHDataSources.DSDataTable();
              ButtonColumn column2 = new ButtonColumn();
              ButtonColumn column3 = new ButtonColumn();
              ButtonColumn column1 = new ButtonColumn();
              column2.DataTextField = "ID";
              column3.DataTextField = "Name";
              column1.DataTextField = "Company";
              this.DataGrid1.Columns.Add(column2);
              this.DataGrid1.Columns.Add(column3);
              this.DataGrid1.Columns.Add(column1);
              this.DataGrid1.DataBind();
              this.GHTSubTestAddResult(column2.DataTextField);
              this.GHTSubTestAddResult(column3.DataTextField);
              this.GHTSubTestAddResult(column1.DataTextField);
          }
          catch (Exception exception9)
          {
              // ProjectData.SetProjectError(exception9);
              Exception exception1 = exception9;
              this.GHTSubTestUnexpectedExceptionCaught(exception1);
              // ProjectData.ClearProjectError();
          }
          base.GHTActiveSubTest = this.Ghtsubtest2;
          try
          {
              this.DataGrid2.DataSource = GHDataSources.DSDataTable();
              ButtonColumn column4 = new ButtonColumn();
              ButtonColumn column5 = new ButtonColumn();
              ButtonColumn column6 = new ButtonColumn();
              column4.DataTextField = "";
              column5.DataTextField = "Name";
              column6.DataTextField = "Name";
              this.DataGrid2.Columns.Add(column4);
              this.DataGrid2.Columns.Add(column5);
              this.DataGrid2.Columns.Add(column6);
              this.DataGrid2.DataBind();
              this.GHTSubTestAddResult(column4.DataTextField);
              this.GHTSubTestAddResult(column5.DataTextField);
              this.GHTSubTestAddResult(column6.DataTextField);
          }
          catch (Exception exception10)
          {
              // ProjectData.SetProjectError(exception10);
              Exception exception2 = exception10;
              this.GHTSubTestUnexpectedExceptionCaught(exception2);
              // ProjectData.ClearProjectError();
          }
          base.GHTActiveSubTest = this.Ghtsubtest3;
          try
          {
              this.DataGrid3.DataSource = GHDataSources.DSDataTable();
              ButtonColumn column7 = new ButtonColumn();
              column7.DataTextField = "NotExist";
              this.DataGrid3.Columns.Add(column7);
              this.DataGrid3.DataBind();
              this.GHTSubTestAddResult(column7.DataTextField);
              this.GHTSubTestExpectedExceptionNotCaught("HttpException");
          }
          catch (HttpException exception11)
          {
              // ProjectData.SetProjectError(exception11);
              HttpException exception3 = exception11;
              this.GHTSubTestExpectedExceptionCaught(exception3);
              // ProjectData.ClearProjectError();
          }
          catch (Exception exception12)
          {
              // ProjectData.SetProjectError(exception12);
              Exception exception4 = exception12;
              this.GHTSubTestUnexpectedExceptionCaught(exception4);
              // ProjectData.ClearProjectError();
          }
          base.GHTActiveSubTest = this.Ghtsubtest4;
          try
          {
              this.DataGrid4.DataSource = GHDataSources.DSDataTable();
              this.DataGrid4.DataBind();
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid4.Columns[0]).DataTextField);
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid4.Columns[1]).DataTextField);
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid4.Columns[2]).DataTextField);
          }
          catch (Exception exception13)
          {
              // ProjectData.SetProjectError(exception13);
              Exception exception5 = exception13;
              this.GHTSubTestUnexpectedExceptionCaught(exception5);
              // ProjectData.ClearProjectError();
          }
          base.GHTActiveSubTest = this.Ghtsubtest5;
          try
          {
              this.DataGrid5.DataSource = GHDataSources.DSDataTable();
              this.DataGrid5.DataBind();
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid5.Columns[0]).DataTextField);
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid5.Columns[1]).DataTextField);
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid5.Columns[2]).DataTextField);
          }
          catch (Exception exception14)
          {
              // ProjectData.SetProjectError(exception14);
              Exception exception6 = exception14;
              this.GHTSubTestUnexpectedExceptionCaught(exception6);
              // ProjectData.ClearProjectError();
          }
          base.GHTActiveSubTest = this.Ghtsubtest6;
          try
          {
              this.DataGrid6.DataSource = GHDataSources.DSDataTable();
              this.DataGrid6.DataBind();
              this.GHTSubTestAddResult(((ButtonColumn)this.DataGrid6.Columns[0]).DataTextField);
              this.GHTSubTestExpectedExceptionNotCaught("HttpException");
          }
          catch (HttpException exception15)
          {
              // ProjectData.SetProjectError(exception15);
              HttpException exception7 = exception15;
              this.GHTSubTestExpectedExceptionCaught(exception7);
              // ProjectData.ClearProjectError();
          }
          catch (Exception exception16)
          {
              // ProjectData.SetProjectError(exception16);
              Exception exception8 = exception16;
              this.GHTSubTestUnexpectedExceptionCaught(exception8);
              // ProjectData.ClearProjectError();
          }
          this.GHTTestEnd();
      }