Beispiel #1
1
        private void DrawKenGrid(Grid kenGrid)
        {
            container.Controls.Clear();

            Table tbl = new Table();
            container.Controls.Add(tbl);

            for (int i = 0; i < kenGrid.Dimension; i++)
            {
                TableRow row = new TableRow();
                tbl.Rows.Add(row);

                for (int j = 0; j < kenGrid.Dimension; j++)
                {
                    CellViewModel cellView = new CellViewModel(kenGrid.CellMatrix[i, j]);

                    TableCell cell = new TableCell();
                    DefineBorder(cell, cellView);
                    row.Cells.Add(cell);

                    KenCell kenCell = (KenCell)LoadControl("KenCell.ascx");
                    kenCell.ID = "kencell-" + i.ToString() + "-" + j.ToString();
                    kenCell.Cell = cellView;

                    cell.Controls.Add(kenCell);
                }
            }
        }
Beispiel #2
0
        //public
        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void Render(HtmlTextWriter output)
        {
            NdiMenuItem item0 =
            new NdiMenuItem(0, "Állás keresések listája", "Elérhetõ állás keresések szûréssel", "JobFinds.aspx", "_images/searchKexWordS.gif",
                        "_images/searchKexWordL.gif");

              NdiMenuItem item1 =
            new NdiMenuItem(1, "Új állás keresés rögzítése", "Új állás keresés rögzítése", "JobFindCreate.aspx", "_images/searchFreeTextS.gif",
                        "_images/searchFreeTextL.gif");
              NdiMenuItem item2 =
            new NdiMenuItem(2, "Milyen keresésekre válaszoltam", "Milyen  keresésekre válaszoltam", "JobFindMyAnswers.aspx", "_images/searchQuestionFormS.gif",
                        "_images/searchQuestionFormL.gif");

              NdiMenuItem item3 =
            new NdiMenuItem(3, "Saját állás kereséseim", "Saját állás kereséseim", "JobFindsFromMe.aspx", "_images/searchQuestionFormS.gif",
                        "_images/searchQuestionFormL.gif");

              Table table = new Table();
              table.CellPadding = 0;
              table.CellSpacing = 0;
              table.CssClass = "almenu";
              TableRow row1 = new TableRow();
              TableRow row2 = new TableRow();
              TableCell cell0 = CreateCell(item0);

              TableCell cell1 = CreateCell(item1);
              TableCell cell2 = CreateCell(item2);
              TableCell cell3 = CreateCell(item3);

              table.Rows.Add(row2);
              table.Rows.Add(row1);
              if (item0.Index == m_selectedindex)
            row1.Cells.Add(cell0);
              else
            row2.Cells.Add(cell0);

              if (item1.Index == m_selectedindex)
            row1.Cells.Add(cell1);
              else
            row2.Cells.Add(cell1);

              if (item2.Index == m_selectedindex)
            row1.Cells.Add(cell2);
              else
            row2.Cells.Add(cell2);

              if (item3.Index == m_selectedindex)
            row1.Cells.Add(cell3);
              else
            row2.Cells.Add(cell3);

              if (row1.Cells != null && row1.Cells.Count > 0 && row2.Cells != null && row2.Cells.Count > 0)
              {
            row1.Cells[0].ColumnSpan = row2.Cells.Count;

              }
              table.Width = Unit.Percentage(100);

              table.RenderControl(output);
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            //Put user code to initialize the page here
            base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

            System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());

            //add new cell
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());

            tbl.Rows[0].Cells[0].Text = "111";
            tbl.Rows[0].Cells[1].Text = "222";
            tbl.Rows[0].Cells[2].Text = "333";
            tbl.Rows[0].Cells[3].Text = "444";


            try
            {
                base.GHTSubTestBegin("Remove");
                base.GHTActiveSubTest.Controls.Add(tbl);
                tbl.Rows[0].Cells.Remove(tbl.Rows[0].Cells[1]);
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();

            base.GHTTestEnd();
        }
        protected override void CreateChildControls()
        {
            Table table = new Table();
            table.Attributes.Add("border", "0");
            table.Attributes.Add("cellspacing", "0");
            table.Attributes.Add("cellpadding", "0");
            table.Style[HtmlTextWriterStyle.Margin] = "1px";
            table.Style[HtmlTextWriterStyle.Padding] = "0px";
            TableRow row = new TableRow();
            TableCell cell = new TableCell();
            table.Rows.Add(row);
            row.Cells.Add(cell);
            if (this.MethodButton != null)
            {
                cell.Controls.Add(this.MethodButton);
            }
            row = new TableRow();
            cell = new TableCell();
            table.Rows.Add(row);
            row.Cells.Add(cell);
            ColorDiv = new DesignModeBoxButton();
            ColorDiv.CssClass = "";
            ColorDiv.Style[HtmlTextWriterStyle.Margin] = "0px";
            ColorDiv.Style[HtmlTextWriterStyle.Padding] = "0px";
            ColorDiv.Width = new Unit(21, UnitType.Pixel);
            ColorDiv.Height = new Unit(5, UnitType.Pixel);
            ColorDiv.Style["background-color"] = DefaultColor;
            ColorDiv.Style["font-size"] = "1px";
            cell.Controls.Add(ColorDiv);

            Content.Add(table);

            base.CreateChildControls();
        }
 public ExportFromTable(Table table)
 {
     table.Rows.OfType<TableRow>()
         .Where(r => r.Visible)
         .Select(ExportRow)
         .ForEach(ExportTable.AddRow);
 }
        protected void btnGO_Click(object sender, EventArgs e)
        {
        	//url encoded
        	//base64
        	//sha1
        	//encryption with password
			
			string secret = txtString.Text;
			string key = String.IsNullOrEmpty(txtPassword.Text) ? hardCodedKey : txtPassword.Text;
			
        	Table t = new Table();
        	t.Width = new Unit("100%");
			
            t.Rows.Add(MakeRow("Custom Crypto", CustomCryptoEncrypt(secret)));
			t.Rows.Add(MakeRow("URL Encoded:", Server.UrlEncode(secret)));
			t.Rows.Add(MakeRow("Base64 Encoded:", Base64(secret)));
			t.Rows.Add(MakeRow("SHA1 Hashed:", SHA(secret, WG_Hash.Sha1)));
			t.Rows.Add(MakeRow("SHA256 Hashed:", SHA(secret, WG_Hash.Sha256)));
			t.Rows.Add(MakeRow("Rijndael Encrypted: ", Encypt(secret, key), Color.LightGreen));
        
        	ContentPlaceHolder cph = (ContentPlaceHolder)this.Master.FindControl("BodyContentPlaceholder");
			cph.Controls.Add(new LiteralControl("<p/>"));
	        cph.Controls.Add(t);
	    
        
        }
		private void Page_Load(object sender, System.EventArgs e) 
		{
			//Put user code to initialize the page here
			base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

			System.Web.UI.WebControls.Table tbl1 = new System.Web.UI.WebControls.Table();
			tbl1.Rows.Add(new System.Web.UI.WebControls.TableRow());

			System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());

			try 
			{
				base.GHTSubTestBegin("Add cells");
				base.GHTActiveSubTest.Controls.Add(tbl);
				base.GHTActiveSubTest.Controls.Add(tbl1);

				// add new cell
				tbl1.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
				tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
				System.Web.UI.WebControls.TableCell tblCell = new System.Web.UI.WebControls.TableCell();
				tbl.Rows[0].Cells.Add(tblCell);
			
				// add cell from one table to another
				tbl.Rows[0].Cells.Add(tbl1.Rows[0].Cells[0]);
			}
			catch (Exception ex) 
			{
				base.GHTSubTestUnexpectedExceptionCaught(ex);
			}
			base.GHTSubTestEnd();

			base.GHTTestEnd();

		}
 /// <summary>
 /// Must create and return the control 
 /// that will show the administration interface
 /// If none is available returns null
 /// </summary>
 public Control GetAdministrationInterface(Style controlStyle)
 {
     this._adminTable = new Table();
     this._adminTable.ControlStyle.CopyFrom(controlStyle);
     this._adminTable.Width = Unit.Percentage(100);
     TableCell cell = new TableCell();
     TableRow row = new TableRow();
     cell.ColumnSpan = 2;
     cell.Text = ResourceManager.GetString("NSurveySecurityAddinDescription", this.LanguageCode);
     row.Cells.Add(cell);
     this._adminTable.Rows.Add(row);
     cell = new TableCell();
     row = new TableRow();
     CheckBox child = new CheckBox();
     child.Checked = new Surveys().NSurveyAllowsMultipleSubmissions(this.SurveyId);
     Label label = new Label();
     label.ControlStyle.Font.Bold = true;
     label.Text = ResourceManager.GetString("MultipleSubmissionsLabel", this.LanguageCode);
     cell.Width = Unit.Percentage(50);
     cell.Controls.Add(label);
     row.Cells.Add(cell);
     cell = new TableCell();
     child.CheckedChanged += new EventHandler(this.OnCheckBoxChange);
     child.AutoPostBack = true;
     cell.Controls.Add(child);
     Unit.Percentage(50);
     row.Cells.Add(cell);
     this._adminTable.Rows.Add(row);
     return this._adminTable;
 }
        private void Page_Load(object sender, System.EventArgs e)
        {
            Table tb = new Table();
            tb.Width = new Unit( 100, UnitType.Percentage );
            TableRow row;
            TableCell cell;

            HyperLink lnk;

            if( Context.User.Identity.IsAuthenticated )
            {
                //create a new blank table row
                row = new TableRow();

                //set up the news link
                lnk = new HyperLink();
                lnk.Text = "News";
                lnk.NavigateUrl = "News.aspx";

                //create the cell and add the link
                cell = new TableCell();
                cell.Controls.Add(lnk);

                //add the new cell to the row
                row.Cells.Add(cell);
            }
            else
            {
                //code for unauthenticated users here
            }

            //finally, add the table to the placeholder
            phNav.Controls.Add(tb);
        }
        private void populateTable(Table table)
        {
            Dictionary<Product, int> items = Cart.Instance().Items;

            foreach (Product product in items.Keys)
            {
                TableRow row = new TableRow();
                TableCell productCell = new TableCell();
                TableCell descriptionCell = new TableCell();
                TableCell quantityCell = new TableCell();
                TableCell priceCell = new TableCell();
                TableCell totalCell = new TableCell();

                int quantity = items[product];

                productCell.Text = product.Name;
                descriptionCell.Text = product.Description;
                quantityCell.HorizontalAlign = HorizontalAlign.Center;
                quantityCell.Text = quantity.ToString();

                priceCell.Text = String.Format("R$ {0:0.00}", product.Price);
                totalCell.Text = String.Format("R$ {0:0.00}", quantity * product.Price);

                row.Cells.Add(productCell);
                row.Cells.Add(descriptionCell);
                row.Cells.Add(quantityCell);
                row.Cells.Add(priceCell);
                row.Cells.Add(totalCell);

                table.Rows.Add(row);
            }
        }
        /// <summary>
        /// Must create and return the control 
        /// that will show the logon interface.
        /// If none is available returns null
        /// </summary>
        public Control GetLoginInterface(Style controlStyle)
        {
            this._uIdTable = new Table();
            TableCell cell = new TableCell();
            TableRow row = new TableRow();
            Button child = new Button();
            child.Click += new EventHandler(this.OnUIdSubmit);

            this._uIdTextBox = new TextBox();
            this._uIdTextBox.CssClass = "lddl";
            //this._uIdTable.ControlStyle.Font.CopyFrom(controlStyle.Font);
            this._uIdTable.ControlStyle.CssClass = "tablelddl ";
            this._uIdTable.Width = Unit.Percentage(100.0);
            child.Text = ResourceManager.GetString("SubmitUId");
            child.CssClass = "btn btn-primary btn-xs bw";

            cell.Controls.Add(new LiteralControl(ResourceManager.GetString("EnterUIdMessage", this.LanguageCode)));
            row.Cells.Add(cell);
            this._uIdTable.Rows.Add(row);
            cell = new TableCell();
            row = new TableRow();
            cell.Controls.Add(this._uIdTextBox);
            cell.Controls.Add(child);
            row.Cells.Add(cell);
            this._uIdTable.Rows.Add(row);
            return this._uIdTable;
        }
		private void Page_Load(object sender, System.EventArgs e) 
		{
			//Put user code to initialize the page here
			base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

			System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
			tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
			tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
			tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
			tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();


			try 
			{
				base.GHTSubTestBegin("Remove");
				base.GHTActiveSubTest.Controls.Add(tbl);
				tbl.Rows.Remove(tbl.Rows[1]);
			}
			catch (Exception ex) 
			{
				base.GHTSubTestUnexpectedExceptionCaught(ex);
			}
			base.GHTSubTestEnd();

			base.GHTTestEnd();
		}
		private void Page_Load(object sender, System.EventArgs e) 
		{
			//Put user code to initialize the page here
			base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

			System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());

			//add new cell
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());

			tbl.Rows[0].Cells[0].Text = "111";
			tbl.Rows[0].Cells[1].Text = "222";
			tbl.Rows[0].Cells[2].Text = "333";
			tbl.Rows[0].Cells[3].Text = "444";


			try 
			{
				base.GHTSubTestBegin("RemoveAt");
				base.GHTActiveSubTest.Controls.Add(tbl);
				tbl.Rows[0].Cells.RemoveAt(1);
			}
			catch (Exception ex) 
			{
				base.GHTSubTestUnexpectedExceptionCaught(ex);
			}
			base.GHTSubTestEnd();

			base.GHTTestEnd();
		}
        public static void BuildStudentProspectTable(Table table, string userId)
        {
            GroupService service = new GroupService();
            DataTable dtProspects = service.GetProspectiveStudentsData(userId);
            DataTable dtGroups = service.GetSupervisorOfData(userId);

            for (int i = 0; i < dtProspects.Rows.Count; i++)
            {
                DropDownList ddlGroupList = new DropDownList();
                ddlGroupList.DataSource = dtGroups;
                ddlGroupList.DataTextField = "GroupName";
                ddlGroupList.DataValueField = "GroupId";
                ddlGroupList.DataBind();
                ddlGroupList.Items.Insert(0, "Add a group");

                string name = dtProspects.Rows[i].ItemArray[0].ToString();
                string id = dtProspects.Rows[i].ItemArray[1].ToString();

                LinkButton b = new LinkButton();
                b.Text = name;
                b.CommandArgument = id;
                b.CommandName = name;

                TableRow row = new TableRow();
                TableCell cellProspects = new TableCell();
                TableCell cellGroups = new TableCell();

                cellProspects.Controls.Add(b);
                cellGroups.Controls.Add(ddlGroupList);
                row.Cells.Add(cellProspects);
                row.Cells.Add(cellGroups);
                table.Rows.Add(row);
            }
        }
Beispiel #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var temp = new Movie();
            var movies = temp.getAll();

            Table table = new Table();
            foreach (int moid in movies.Keys) {
                TableRow row = new TableRow();

                TableCell imageCell = new TableCell();
                Image image = new Image();
                image.ImageUrl = movies[moid].read("imgurl").ToString();

                HtmlAnchor anchor = new HtmlAnchor();
                anchor.HRef = "/show_movie.aspx?moid=" + movies[moid].id;
                anchor.Controls.Add(image);

                imageCell.Controls.Add(anchor);
                row.Controls.Add(imageCell);

                TableCell cell = new TableCell();
                cell.VerticalAlign = VerticalAlign.Top;

                cell.Text = "<h2>" + movies[moid].read("title").ToString() + "</h2>";
                row.Controls.Add(cell);
                cell.Text += (movies[moid].read("description").ToString().Length > 1024) ? movies[moid].read("description").ToString().Substring(0, 1024) + "..." : movies[moid].read("description").ToString();
                row.Controls.Add(cell);

                table.Controls.Add(row);
            }
            PlaceHolder1.Controls.Add(table);
        }
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            var tbl = new Table();
            var row = new TableRow();
            var cell = new TableCell
                {
                    ColumnSpan = 2,
                    VerticalAlign = VerticalAlign.Middle,
                    HorizontalAlign = HorizontalAlign.Center
                };

            var lblTitle = new Label {Text = "This WebPart will send a parameter to a consumer:"};
            cell.Controls.Add(lblTitle);
            row.Controls.Add(cell);
            tbl.Controls.Add(row);

            row = new TableRow();
            cell = new TableCell {VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Center};
            _textBox = new TextBox {Text = "", Width = Unit.Pixel(120)};
            cell.Controls.Add(_textBox);
            row.Controls.Add(cell);
            cell = new TableCell {VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Center};
            _button = new Button {Text = "Send..."};
            _button.Click += btn_Click;
            cell.Controls.Add(_button);
            row.Controls.Add(cell);
            tbl.Controls.Add(row);

            Controls.Add(tbl);
        }
        protected override void CreateChildControls()
        {
            Table table = new Table();
            for (int i = 0; i < _colors.Length; i++)
            {
                TableRow row = new TableRow();
                table.Rows.Add(row);
                for (int j = 0; j < _colors[i].Length; j++)
                {
                    TableCell cell = new TableCell();
                    cell.Style[HtmlTextWriterStyle.Width] = "10px";
                    cell.Style[HtmlTextWriterStyle.Height] = "10px";
                    cell.Style[HtmlTextWriterStyle.Cursor] = "pointer";
                    cell.Style["background-color"] = "#" + _colors[i][j];
                    cell.Attributes.Add("onclick", "setColor(\"#" + _colors[i][j] + "\")");
                    row.Cells.Add(cell);

                    HtmlGenericControl innerDiv = new HtmlGenericControl("div");
                    innerDiv.Style[HtmlTextWriterStyle.Height] = "100%";
                    innerDiv.Style[HtmlTextWriterStyle.Width] = "100%";
                    innerDiv.Style["font-size"] = "1px";
                    cell.Controls.Add(innerDiv);
                }
            }
            table.Attributes.Add("border", "0");
            table.Attributes.Add("cellspacing", "1");
            table.Attributes.Add("cellpadding", "0");
            table.Style["background-color"] = "#000000";

            Content.Add(table);

            base.CreateChildControls();
        }
        private Panel renderSimilarProduct(Item item)
        {
            Panel similarProductsItemContainer = new Panel();
            similarProductsItemContainer.CssClass = "SimilarProductsItemContainer";
            Table table = new Table();
            TableRow tableRow = new TableRow();

            TableCell tableCell = new TableCell();
            Panel itemImageBg = new Panel();
            itemImageBg.CssClass = "itemImageBg";
            Image image = new Image();
            image.ImageUrl = item.ImageUrl;

            itemImageBg.Controls.Add(image);
            tableCell.Controls.Add(itemImageBg);
            tableRow.Controls.Add(tableCell);

            tableCell = new TableCell();
            Panel itemImageTitle = new Panel();
            itemImageTitle.CssClass = "itemImageTitle";
            Label label = new Label();
            label.Text = item.Title;
            itemImageTitle.Controls.Add(label);
            tableCell.Controls.Add(itemImageTitle);
            tableRow.Controls.Add(tableCell);

            table.Controls.Add(tableRow);
            similarProductsItemContainer.Controls.Add(table);

            return similarProductsItemContainer;
        }
Beispiel #19
0
        /// <summary>
        /// Create table showing databases and languages
        /// </summary>
        /// <param name="tbl">Table control</param>
        /// <param name="databases">Collection of database names</param>
        private void CreateDatabaseTable(System.Web.UI.WebControls.Table tbl, IEnumerable <string> databases)
        {
            TableRow  newRow;
            TableCell newCell;

            AddDatabaseTableHeader(tbl);

            foreach (string db in databases)
            {
                newRow = new TableRow();
                tbl.Rows.Add(newRow);
                newCell          = new TableCell();
                newCell.CssClass = "apiDatabaseCell";
                newCell.Text     = db;
                newRow.Cells.Add(newCell);

                foreach (LanguageSettings lang in PXWeb.Settings.Current.General.Language.SiteLanguages)
                {
                    newCell = new TableCell();
                    CheckBox chk = new CheckBox();
                    chk.ID = lang.Name + SEPARATOR + db;
                    newCell.Controls.Add(chk);
                    newRow.Cells.Add(newCell);
                }
            }
        }
Beispiel #20
0
        /// <summary>
        /// Fixes a table so that the last cell in a row has a span that matches the longest row.
        /// </summary>
        /// <param name="table">The table to fix.</param>
        public static void FixColumnSpans(Table table)
        {
            if (table == null)
            throw new ArgumentNullException("table");

              int maxRowWidth = 0;

              // loop through the table's row and get the width of the longest row
              foreach (TableRow row in table.Rows)
              {
            int currentRowWidth = CalculateRowColumnSpan(row);

            if (currentRowWidth > maxRowWidth)
              maxRowWidth = currentRowWidth;
              }

              // loop through the rows and set the final cell to have a colspan that means
              // it's length matches the longest row
              foreach (TableRow row in table.Rows)
              {
            int currentRowWidth = CalculateRowColumnSpan(row);

            if (currentRowWidth < maxRowWidth)
              row.Cells[row.Cells.Count - 1].ColumnSpan = maxRowWidth - currentRowWidth + 1;
              }
        }
 public static Table GetCentPercentTable()
 {
     Table t = new Table();
     t.Width = new Unit(100.00, UnitType.Percentage);
     t.Attributes.Add("style","table-layout:fixed;");
     return t;
 }
        protected override void CreateChildControls()
        {
            PopupBGIButton ok = new PopupBGIButton();
            ok.Text = GetButton("OK");
            ok.Name = "OK";
            ok.CssClass += " " + "ajax__htmleditor_popup_confirmbutton ";

            PopupBGIButton cancel = new PopupBGIButton();
            cancel.Text = GetButton("Cancel");
            cancel.Name = "Cancel";
            cancel.CssClass += " " + "ajax__htmleditor_popup_confirmbutton";

            Table table = new Table();
            table.Attributes.Add("border", "0");
            table.Attributes.Add("cellspacing", "0");
            table.Attributes.Add("cellpadding", "0");
            table.Style["width"] = "100%";

            TableRow row = new TableRow();
            table.Rows.Add(row);
            TableCell cell = new TableCell();
            row.Cells.Add(cell);
            cell.HorizontalAlign = HorizontalAlign.Right;
            cell.Controls.Add(ok);
            cell.Controls.Add(cancel);
            Content.Add(table);

            RegisteredHandlers.Add(new RegisteredField("OK", ok));
            RegisteredHandlers.Add(new RegisteredField("Cancel", cancel));
            base.CreateChildControls();
        }
Beispiel #23
0
        /// <summary>
        /// Loads an empty (new) row from the database into the specified Table.
        /// <param name="table">The Table object to populate with empty data.</param>
        /// </summary>
        public static void GetEmptyData(Table table)
        {
            Row r = new Row(table);

            for (int i = 0; i < table.Columns.Count; i++)
            {
                RowCell c = new RowCell(table.Columns[i].ColumnId, r) {Row = r};
                if (table.Columns[i].ColumnType == ColumnType.ColumnTemplate)
                    c.Value = ((ColumnTemplate)table.Columns[i]).CreateCellControls;
                else if (c.Value == null && table.Columns[i].DefaultValue != null)
                    c.Value = table.Columns[i].DefaultValue;
                r.Cells.Add(c);
            }

            if (table.m_Grid.MasterWebGrid == null)
            {
                table.Rows.Add(r);
                return;
            }
            List<Column> masterWebGridPrimarykeys = table.m_Grid.MasterWebGrid.MasterTable.Columns.Primarykeys;

            int index = 0;

            while (index < masterWebGridPrimarykeys.Count)
            {
                string columnname = masterWebGridPrimarykeys[index].ColumnId;
                if (r.Columns.GetIndex(columnname) > -1)
                    r[columnname].Value = table.m_Grid.MasterWebGrid.MasterTable.Rows[0][columnname].Value;
                index++;
            }
            table.Rows.Add(r);
        }
        private void CreateMenu()
        {
            Table table = new Table();
              TableRow row = new TableRow();
              TableCell cell0 = new TableCell();

              TableCell cell2 = new TableCell();
              TableCell cell3 = new TableCell();
              TableCell cell4 = new TableCell();
              TableCell cell5 = new TableCell();
              TableCell cell6 = new TableCell();
              table.Rows.Add(row);
              row.Cells.Add(cell0);
              // A keyword menu configból jön
              if (Helpers.GetMenuVisibility("SearchKeywordMenu.Visibility"))
              {
            TableCell cell1 = new TableCell();
            row.Cells.Add(cell1);

              }
              row.Cells.Add(cell2);
              row.Cells.Add(cell3);
              row.Cells.Add(cell4);
              row.Cells.Add(cell5);
              row.Cells.Add(cell6);
        }
Beispiel #25
0
        public void Refresh() {
            
            Controls.Clear();
            if (Page != null) {
                int i = 0;
//                ClientScriptProxy.Current.Page =(Page) ((WebWindowTemplateHttpHandler) HttpContext.Current.Handler).ActualHandler;
                string noImageUrl = ClientScriptProxy.Current.GetWebResourceUrl(GetType(), "Xpand.ExpressApp.Thumbnail.Web.Resources.noimage.jpg");
                if (DataSource != null) {
                    var rootTable = new Table();
                    Controls.Add(rootTable);
                    var tableRow = new TableRow();
                    var tableCell = new TableCell();
                    tableRow.Cells.Add(tableCell);
                    rootTable.Rows.Add(tableRow);
                    foreach (IPictureItem item in DataSource) {
                        Table table = CreateTable(tableCell.Controls);
                        var img = new System.Web.UI.WebControls.Image { ID = ID + "_" + (i++) };
                        var requestTextPictureItemEventArgs = new RequestTextPictureItemEventArgs(item);
                        OnRequestText(requestTextPictureItemEventArgs);
                        SetImageProperties(item, img, noImageUrl,requestTextPictureItemEventArgs.Text);
                        CreateImageRow(img, table);
                        CreateTextRow(item, requestTextPictureItemEventArgs.Text, table);
                    }
                }
            }
        }
Beispiel #26
0
        /// <summary>
        /// BuildMenu builds the top-level menu.  It is called from the OnDataBinding method as well
        /// as from <see cref="CreateChildControls"/>.  It has code to check if the top-level menu should be
        /// laid out horizontally or vertically.
        /// </summary>
        protected virtual void BuildMenu()
        {
            // iterate through the Items
            Table menu = new Table();
            menu.Attributes.Add("id", this.ClientID);

            menu.Width = new Unit("100%");
            //menu.Height = new Unit("100%");
            menu.CellPadding = 0;
            menu.CellSpacing = 0;
           
            // Iterate through the top-level menu's menuitems, and add a <td> tag for each menuItem
            for (int ix = 0; ix < this.items.Count; ix++)
            {
                MainMenuItem mainMenu = this.items[ix];

                TableRow tr = new TableRow();

                BuildMainItems(tr, mainMenu, ix);
                
                menu.Controls.Add(tr);

                if (mainMenu.SubItems.Count > 0)
                {
                    TableRow tr2 = new TableRow();
                    BuildSubItems(tr2, mainMenu,ix);
                    menu.Controls.Add(tr2);
                }
            }

            Controls.Add(menu);
        }
        protected void btnGO_Click(object sender, EventArgs e)
        {
        	//url encoded
        	//base64
        	//sha1
        	//encryption with password
			
			string s = txtString.Text;
			//string p = txtPassword.Text;
			
        	Table t = new Table();
        	t.Width = new Unit("100%");
			
			t.Rows.Add(MakeRow("URL Encoded:", Server.UrlEncode(s)));
			t.Rows.Add(MakeRow("Base64 Encoded:", Base64(s)));
			t.Rows.Add(MakeRow("SHA1 Hashed:", SHA(s, WG_Hash.Sha1)));
			t.Rows.Add(MakeRow("SHA256 Hashed:", SHA(s, WG_Hash.Sha256)));
			
        
        	ContentPlaceHolder cph = (ContentPlaceHolder)this.Master.FindControl("BodyContentPlaceholder");
			cph.Controls.Add(new LiteralControl("<p/>"));
	        cph.Controls.Add(t);
	    
        
        }
Beispiel #28
0
        public void InstantiateIn(Control control)
        {
            control.Controls.Clear();
            Table table = new Table();
            table.BorderWidth = Unit.Pixel(0);
            table.CellSpacing = 1;
            table.CellPadding = 0;
            TableRow row = new TableRow();
            row.VerticalAlign = VerticalAlign.Top;
            table.Rows.Add(row);
            TableCell cell = new TableCell();
            cell.HorizontalAlign = HorizontalAlign.Right;
            cell.VerticalAlign = VerticalAlign.Middle;
            cell.Controls.Add(First);
            cell.Controls.Add(Previous);
            row.Cells.Add(cell);
            cell = new TableCell();
            cell.HorizontalAlign = HorizontalAlign.Center;
            cell.Controls.Add(Pager);
            row.Cells.Add(cell);
            cell = new TableCell();
            cell.VerticalAlign = VerticalAlign.Middle;
            cell.Controls.Add(Next);
            cell.Controls.Add(Last);
            row.Cells.Add(cell);

            control.Controls.Add(table);
        }
		private void Page_Load(object sender, System.EventArgs e) 
		{
			//Put user code to initialize the page here
			base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

			System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
			tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());

			//add new cell
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
			tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());

			tbl.Rows[0].Cells[0].Text = "111";
			tbl.Rows[0].Cells[1].Text = "222";
			tbl.Rows[0].Cells[2].Text = "333";
			tbl.Rows[0].Cells[3].Text = "444";

     

			try 
			{
				base.GHTSubTestBegin("Item");
				for (int i = 0; i < tbl.Rows[0].Cells.Count; i++)
					base.GHTSubTestAddResult(" CellText " + i.ToString() + "= " + tbl.Rows[0].Cells[i].Text);
			}
			catch (Exception ex) 
			{
				base.GHTSubTestUnexpectedExceptionCaught(ex);
			}
			base.GHTSubTestEnd();
			base.GHTTestEnd();
		}
Beispiel #30
0
        void AddNewRow(Entities.ProductionEntity production, Table table)
        {
            var row = new TableRow();
            row.ID = "rId_" + production.ProductionCode;
            row.Cells.Add(new TableCell { Text = production.ProductionCode.ToString() });
            row.Cells.Add(new TableCell { Text = production.NameProduction.ToString() });
            row.Cells.Add(new TableCell { Text = production.DesignationProduction.ToString() });

            //
            // Раскоментить или удалить, уточнить
            //
            //if (production.CountProduction==null)
            //    row.Cells.Add(new TableCell { Text = "0" });
            //else
            //    row.Cells.Add(new TableCell { Text = production.CountProduction.ToString() });

            //if (production.UnitName == null)
            //    row.Cells.Add(new TableCell { Text = "-" });
            //else
            //    row.Cells.Add(new TableCell { Text = production.UnitName.ToString() });

            row.Cells.Add(new TableCell { Text = production.TypeName.ToString() });
            row.Cells.Add(new TableCell { Text = production.SortName.ToString() });
            row.Cells.Add(new TableCell { Text = production.SignName.ToString() });
            row.Cells.Add(new TableCell { Text = "<a href=\"/DeleteView/DeleteProduction.aspx?IdProduction=" + production.ProductionCode.ToString() + "\">удалить</a>" });
            row.Cells.Add(new TableCell { Text = "<a href=\"/EditingForms/ProductionEdit.aspx?IdProduction=" + production.ProductionCode.ToString() + "\">изменить</a>" });
            row.CssClass = "activeRow";
            table.Rows.Add(row);
        }
        /// <summary>
        /// Initialize table from the DataSet object.
        /// </summary>
        /// <param name="table">Table object to initialize.</param>
        /// <param name="dataSet">Series data.</param>
        /// <param name="tableName">Series name to be used.</param>
        /// <param name="firstColumnWidth">First column width.</param>
        /// <param name="otherColumnWidth">Others columns width.</param>
        public void InitializeTable(Table table, DataSet dataSet, string tableName, int firstColumnWidth, int otherColumnWidth)
        {
            foreach(DataColumn column in dataSet.Tables[tableName].Columns)
            {
                // Create new table row for each column
                TableRow row = new TableRow();

                // Add title cell
                TableCell cell = new TableCell();
                cell.Controls.Add(new LiteralControl(dataSet.Tables[tableName].TableName +
                    " - " + column.ColumnName));
                cell.Width = new Unit(firstColumnWidth, UnitType.Pixel);
                row.Cells.Add(cell);

                // Add data cells
                int pointIndex = 0;
                foreach(DataRow dataRow in dataSet.Tables[tableName].Rows)
                {
                    TableCell dataCell = new TableCell();
                    dataCell.Controls.Add(new LiteralControl(dataRow[column].ToString()));
                    dataCell.Width = new Unit(otherColumnWidth, UnitType.Pixel);
                    dataCell.HorizontalAlign = HorizontalAlign.Center;
                    row.Cells.Add(dataCell);
                    ++pointIndex;
                }

                // Add row into the table
                table.Rows.Add(row);
            }
        }
Beispiel #32
0
        private void BuildTable()
        {
            Table table = new Table();

              table.AddHeaderRow(2, "Notary's sign check cookie");

              if (this.cookie != null)
              {
            table.AddRow("You are:", this.cookie.Certificate.FullName);
            table.AddRow(string.Empty, "Sign check cookie set.");
              }
              else
              {
            table.AddRow("You are:", "Unknown");
              }

              table.AddSpaceRow(2, 32);

              if (!this.valid)
              {
            table.AddRow(string.Empty, this.message);

            if (!string.IsNullOrEmpty(this.error))
            {
              table.AddRow(string.Empty, this.error);
            }
              }

              mainPanel.Controls.Add(table);
        }
Beispiel #33
0
    protected void btn_exportarExcel_Click(object sender, EventArgs e)
    {
        DataView view = new DataView();

        view.Table = (DataTable)ViewState["lista"];
        GridView gv = new GridView();

        gv.DataSource = view;
        gv.DataBind();

        string fileName = "rutas_generadas.xls";

        PrepareControlForExport(gv);
        HttpContext.Current.Response.Clear();
        HttpContext.Current.Response.AddHeader("Content-type", "application / xls");

        HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", fileName));
        HttpContext.Current.Response.Charset = "";
        HttpContext.Current.Response.Cache.SetCacheability(System.Web.HttpCacheability.Public);
        HttpContext.Current.Response.ContentType = "application/ms-excel";
        try
        {
            using (StringWriter sw = new StringWriter())
            {
                using (HtmlTextWriter htw = new HtmlTextWriter(sw))
                {
                    System.Web.UI.WebControls.Table table = new System.Web.UI.WebControls.Table();
                    table.GridLines = gv.GridLines;

                    if (gv.HeaderRow != null)
                    {
                        PrepareControlForExport(gv.HeaderRow);
                        table.Rows.Add(gv.HeaderRow);
                    }

                    foreach (GridViewRow row in gv.Rows)
                    {
                        PrepareControlForExport(row);
                        table.Rows.Add(row);
                    }

                    if (gv.FooterRow != null)
                    {
                        PrepareControlForExport(gv.FooterRow);
                        table.Rows.Add(gv.FooterRow);
                    }

                    gv.GridLines = GridLines.Both;
                    table.RenderControl(htw);
                    HttpContext.Current.Response.Write(sw.ToString());
                    HttpContext.Current.Response.End();
                }
            }
        }
        catch (HttpException ex)
        {
            throw ex;
        }
    }
Beispiel #34
0
        public void InstantiateIn(System.Web.UI.Control containerControl)
        {
            System.Web.UI.WebControls.Table headerTable = new System.Web.UI.WebControls.Table();

            headerTable.Width = Unit.Pixel(700);

            TableRow headerTableRow = new TableRow();

            headerTable.Rows.Add(headerTableRow);

            TableCell headerTableCell;


            headerTableCell = new TableCell();

            headerTableCell.Width = Unit.Pixel(300);

            headerTableCell.Text = "Name";

            headerTableRow.Cells.Add(headerTableCell);


            headerTableCell = new TableCell();

            headerTableCell.Width = Unit.Pixel(90);

            headerTableCell.Attributes.Add("align", "center");

            headerTableCell.Text = "Federal Id";

            headerTableRow.Cells.Add(headerTableCell);


            headerTableCell = new TableCell();

            headerTableCell.Width = Unit.Pixel(90);

            headerTableCell.Attributes.Add("align", "center");

            headerTableCell.Text = "NPI";

            headerTableRow.Cells.Add(headerTableCell);


            headerTableCell = new TableCell();

            headerTableCell.Width = Unit.Pixel(220);

            headerTableCell.Text = "Primary Specialty";

            headerTableCell.Attributes.Add("style", "white-space: nowrap");

            headerTableRow.Cells.Add(headerTableCell);


            containerControl.Controls.Add(headerTable);

            return;
        }
Beispiel #35
0
 public static System.Web.UI.WebControls.Table GetTable(Column c)
 {
     System.Web.UI.WebControls.Table tab = new System.Web.UI.WebControls.Table();
     tab.ID       = c.ColumnName + "_tab";
     tab.CssClass = "TableCss";
     tab.Rows.Add(Builder.GetRow(c));
     return(tab);
 }
Beispiel #36
0
        protected void DrawOggFasc(System.Web.UI.WebControls.Table tbl, DocsPAWA.DocsPaWR.Trasmissione trasm)
        {
            TableRow  tr = new TableRow();
            TableCell tc = new TableCell();

            tr.BackColor       = Color.FromArgb(75, 75, 75);
            tc.CssClass        = "titolo_bianco";
            tc.ColumnSpan      = 6;
            tc.Text            = "Oggetto";
            tc.HorizontalAlign = HorizontalAlign.Left;
            tc.Width           = Unit.Percentage(100);
            tc.Height          = Unit.Pixel(20);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);

            tr            = new TableRow();
            tc            = new TableCell();
            tc.ColumnSpan = 6;
            tc.CssClass   = "testo_grigio";
            tc.BackColor  = Color.FromArgb(242, 242, 242);

            string errorMessage;

            int result = DocumentManager.verificaACL("F", trasm.infoFascicolo.idFascicolo, UserManager.getInfoUtente(), out errorMessage);

            if (result == 0 || result == 1)
            {
                tc.Text = "Non si possiedono i diritti per la visualizzazione delle informazioni sul fascicolo trasmesso";
            }
            else
            {
                tc.Text = trasm.infoFascicolo.descrizione;
            }

            tc.Width  = Unit.Percentage(100);
            tc.Height = Unit.Pixel(40);

            tr.Cells.Add(tc);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);
            //riga rossa
            tr            = new TableRow();
            tc            = new TableCell();
            tc.ColumnSpan = 6;
            tr.CssClass   = "bg_grigioS";
            tc.Width      = Unit.Percentage(100);
            tc.Height     = Unit.Pixel(10);

            tr.Cells.Add(tc);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);
        }
Beispiel #37
0
        /// <summary>
        /// Enables and disables the checkboxes in the tables for the databases if they support the languages.
        /// </summary>
        /// <param name="tbl">Table web control</param>
        /// <param name="lang">Language</param>
        /// <param name="db">Database</param>
        private void CheckIfDatabaseHasLanguage(System.Web.UI.WebControls.Table tbl, LanguageSettings lang, DatabaseInfo db)
        {
            CheckBox chk = (CheckBox)tbl.FindControl(lang.Name + SEPARATOR + db.Id);

            if (!db.HasLanguage(lang.Name))
            {
                chk.Enabled = false;
            }
        }
Beispiel #38
0
        public IHtmlString RenderBody()
        {
            var table        = new System.Web.UI.WebControls.Table();
            var stringWriter = new StringWriter();

            table.Rows.AddRange(GenerateTBody().ToArray());
            table.RenderControl(new HtmlTextWriter(stringWriter));
            return(new HtmlString(stringWriter.ToString()));
        }
Beispiel #39
0
 public static void HideColumn(this Table table, int index)
 {
     foreach (TableRow row in table.Rows)
     {
         if (row.Cells.Count - 1 >= index && row.Cells[index].ColumnSpan == 0)
         {
             row.Cells[index].Visible = false;
         }
     }
 }
        public void InstantiateIn(System.Web.UI.Control containerControl)
        {
            System.Web.UI.WebControls.Table itemTable = new System.Web.UI.WebControls.Table();

            itemTable.Width = Unit.Pixel(800);

            itemTable.DataBinding += new EventHandler(ItemTable_OnDataBinding);

            TableRow itemTableRow = new TableRow();

            itemTable.Rows.Add(itemTableRow);

            TableCell itemTableCell;


            itemTableCell = new TableCell();

            itemTableCell.Width = Unit.Pixel(300);

            itemTableCell.Attributes.Add("style", "max-width: 300px; white-space: normal; overflow: hidden");

            itemTableRow.Cells.Add(itemTableCell);


            itemTableCell = new TableCell();

            itemTableCell.Width = Unit.Pixel(100);

            itemTableCell.Attributes.Add("align", "center");

            itemTableRow.Cells.Add(itemTableCell);


            itemTableCell = new TableCell();

            itemTableCell.Width = Unit.Pixel(100);

            itemTableCell.Attributes.Add("align", "center");

            itemTableRow.Cells.Add(itemTableCell);


            itemTableCell = new TableCell();

            itemTableCell.Width = Unit.Pixel(300);

            itemTableCell.Attributes.Add("style", "max-width: 300px; white-space: normal; overflow: hidden");

            itemTableRow.Cells.Add(itemTableCell);


            containerControl.Controls.Add(itemTable);

            return;
        }
    /// <summary>
    /// This Method Exports The Given Grid View to Excel File Without Formatting
    /// </summary>
    /// <returns>Excel File</returns>
    public static void ExporttoExcel_Withoutformatting(GridView gv)
    {
        try
        {
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename=cgnicin.xls"));
            HttpContext.Current.Response.ContentType = "application/ms-excel";
            gv.AllowPaging = false;
            gv.DataBind();
            using (StringWriter sw = new StringWriter())
            {
                using (HtmlTextWriter htw = new HtmlTextWriter(sw))
                {
                    //  Create a form to contain the grid
                    System.Web.UI.WebControls.Table table = new System.Web.UI.WebControls.Table();
                    table.GridLines    = GridLines.Both;
                    table.CaptionAlign = TableCaptionAlign.Right;
                    table.Caption      = "Generated By http://cg.nic.in on " + System.DateTime.Now.ToString("dd MMMM yyyy") + " at " + System.DateTime.Now.ToString("h:mm:ss tt");
                    //  add the header row to the table
                    if (gv.HeaderRow != null)
                    {
                        PrepareControlForExport(gv.HeaderRow);
                        table.Rows.Add(gv.HeaderRow);
                    }

                    foreach (GridViewRow row in gv.Rows)
                    {
                        PrepareControlForExport(row);
                        table.Rows.Add(row);
                    }

                    //  add the footer row to the table
                    if (gv.FooterRow != null)
                    {
                        PrepareControlForExport(gv.FooterRow);
                        table.Rows.Add(gv.FooterRow);
                    }

                    //  render the table into the htmlwriter
                    table.RenderControl(htw);

                    //  render the htmlwriter into the response
                    HttpContext.Current.Response.Write(sw.ToString());
                    HttpContext.Current.Response.End();
                }
            }
        }
        catch (ThreadAbortException)
        {
        }
        catch (Exception e)
        {
            Gen_Error_Rpt.Write_Error("Class:Utilitie | Method: ExporttoExcel_Withoutformatting | Error:", e);
        }
    }
Beispiel #42
0
        /// <summary>
        /// Gets the design time HTML code.
        /// </summary>
        /// <returns>A string containing the HTML to render.</returns>
        public override string GetDesignTimeHtml()
        {
            PagedControl pagerBuilder = (PagedControl)base.Component;

            StringBuilder stringBuilder = new StringBuilder();

            StringWriter   stringWriter = new StringWriter();
            HtmlTextWriter writer       = new HtmlTextWriter(stringWriter);

            // Initialize the structure.
            System.Web.UI.WebControls.Table     pagerPanel               = new System.Web.UI.WebControls.Table();
            System.Web.UI.WebControls.TableRow  pagerPanelRow            = new System.Web.UI.WebControls.TableRow();
            System.Web.UI.WebControls.TableCell pagerPanelInfoCell       = new System.Web.UI.WebControls.TableCell();
            System.Web.UI.WebControls.TableCell pagerPanelNavigationCell = new System.Web.UI.WebControls.TableCell();

            pagerPanelRow.Cells.Add(pagerPanelInfoCell);
            pagerPanelRow.Cells.Add(pagerPanelNavigationCell);

            pagerPanel.Rows.Add(pagerPanelRow);

            // Initialize structure appearance
            pagerPanel.ApplyStyle(pagerBuilder.PagerStyle);
            pagerPanel.Width           = pagerBuilder.Width;
            pagerPanel.Height          = pagerBuilder.Height;
            pagerPanel.HorizontalAlign = pagerBuilder.HorizontalAlign;

            pagerPanel.CellPadding = pagerBuilder.CellPadding;
            pagerPanel.CellSpacing = pagerBuilder.CellSpacing;

            pagerPanelRow.CssClass = pagerBuilder.PanelCssClass;

            //pagerBuilder.InfoPanelStyle.MergeWith(pagerBuilder.PagerStyle);
            //pagerPanelInfoCell.ApplyStyle(pagerBuilder.InfoPanelStyle);
            pagerPanelInfoCell.ApplyStyle(pagerBuilder.PagerStyle);
            pagerPanelInfoCell.HorizontalAlign = pagerBuilder.InfoPanelHorizontalAlign;
            pagerPanelInfoCell.VerticalAlign   = pagerBuilder.InfoPanelVerticalAlign;
            pagerPanelInfoCell.Visible         = !pagerBuilder.InfoPanelDisabled;

            //pagerBuilder.NavPanelStyle.MergeWith(pagerBuilder.PagerStyle);
            //pagerPanelNavigationCell.ApplyStyle(pagerBuilder.NavPanelStyle);
            pagerPanelNavigationCell.ApplyStyle(pagerBuilder.PagerStyle);
            pagerPanelNavigationCell.HorizontalAlign = pagerBuilder.NavPanelHorizontalAlign;
            pagerPanelNavigationCell.VerticalAlign   = pagerBuilder.NavPanelVerticalAlign;

            // Initialize the info panel
            pagerBuilder.BuildInfo(pagerPanelInfoCell, true);

            // Initialize the navigation panel
            pagerBuilder.BuildNavigation(pagerPanelNavigationCell);

            // Add the whole structure to the control collection
            pagerPanel.RenderControl(writer);

            return(stringWriter.ToString());
        }
Beispiel #43
0
 /// <summary>
 /// If the database is exposed via the API its checkbox in the table will be checked
 /// </summary>
 /// <param name="tbl">Table web control</param>
 /// <param name="lang">Language</param>
 /// <param name="db">Database</param>
 private void CheckIfExposedDatabase(System.Web.UI.WebControls.Table tbl, LanguageSettings lang, DatabaseInfo db)
 {
     if (PCAxis.Query.ExposedDatabases.DatabaseConfigurations[lang.Name].ContainsKey(db.Id))
     {
         CheckBox chk = (CheckBox)tbl.FindControl(lang.Name + SEPARATOR + db.Id);
         if (chk != null)
         {
             chk.Checked = true;
         }
     }
 }
        private static System.Web.UI.WebControls.Table BuildTable(int intRows, int intCols, string tableCellClass)
        {
            System.Web.UI.WebControls.Table table = new System.Web.UI.WebControls.Table();

            for (int r = 0; r < intRows; r++)
            {
                table.Rows.Add(CreateTableRow(intCols, tableCellClass));
            }

            return(table);
        }
Beispiel #45
0
        // All the .NET API related methods.
        #region DOTNET API
        /// <summary>
        /// Create the child controls.
        /// </summary>
        protected override void CreateChildControls()
        {
            //PrintStatus();

            // Initialize the structure.
            System.Web.UI.WebControls.Table     pagerPanel               = new System.Web.UI.WebControls.Table();
            System.Web.UI.WebControls.TableRow  pagerPanelRow            = new System.Web.UI.WebControls.TableRow();
            System.Web.UI.WebControls.TableCell pagerPanelInfoCell       = new System.Web.UI.WebControls.TableCell();
            System.Web.UI.WebControls.TableCell pagerPanelNavigationCell = new System.Web.UI.WebControls.TableCell();

            pagerPanelRow.Cells.Add(pagerPanelInfoCell);
            pagerPanelRow.Cells.Add(pagerPanelNavigationCell);

            pagerPanel.Rows.Add(pagerPanelRow);

            // Initialize structure appearance
            pagerPanel.ApplyStyle(this.PagerStyle);
            pagerPanel.Width           = this.Width;
            pagerPanel.Height          = this.Height;
            pagerPanel.HorizontalAlign = this.HorizontalAlign;

            pagerPanel.CellPadding = CellPadding;
            pagerPanel.CellSpacing = CellSpacing;
            pagerPanel.BorderWidth = BorderWidth;
            pagerPanel.CssClass    = CssClass;

            pagerPanelRow.CssClass = PanelCssClass;

            //this.InfoPanelStyle.MergeWith(this.PagerStyle);
            //pagerPanelInfoCell.ApplyStyle(this.InfoPanelStyle);
            pagerPanelInfoCell.ApplyStyle(this.PagerStyle);
            pagerPanelInfoCell.HorizontalAlign = InfoPanelHorizontalAlign;
            pagerPanelInfoCell.VerticalAlign   = InfoPanelVerticalAlign;
            pagerPanelInfoCell.Visible         = !this.InfoPanelDisabled;

            //this.NavPanelStyle.MergeWith(this.PagerStyle);
            //pagerPanelNavigationCell.ApplyStyle(this.NavPanelStyle);
            pagerPanelNavigationCell.ApplyStyle(this.PagerStyle);
            pagerPanelNavigationCell.HorizontalAlign = NavPanelHorizontalAlign;
            pagerPanelNavigationCell.VerticalAlign   = NavPanelVerticalAlign;
            pagerPanelNavigationCell.Visible         = !this.NavPanelDisabled;

            // Initialize the info panel
            BuildInfo(pagerPanelInfoCell, false);

            // Initialize the navigation panel
            BuildNavigation(pagerPanelNavigationCell);

            // Add the whole structure to the control collection
            this.Controls.Add(pagerPanel);

            //PrintStatus();
        }
Beispiel #46
0
        protected void DrawHeaderTrasmSing(System.Web.UI.WebControls.Table tbl)
        {
            // Put user code to initialize the page here
            TableRow  tr = new TableRow();
            TableCell tc = new TableCell();

            tc.CssClass  = "titolo_bianco";
            tc.BackColor = Color.FromArgb(149, 149, 149);
            tc.Text      = "Destinatario";
            tc.Width     = Unit.Percentage(20);

            tr.Cells.Add(tc);

            tc            = new TableCell();
            tc.CssClass   = "titolo_bianco";
            tc.BackColor  = Color.FromArgb(149, 149, 149);
            tc.Text       = "Ragione";
            tc.Width      = Unit.Percentage(20);
            tc.ColumnSpan = 2;
            tr.Cells.Add(tc);

            //Tipo c'è solo per determinate ragioni
            tc           = new TableCell();
            tc.CssClass  = "titolo_bianco";
            tc.BackColor = Color.FromArgb(149, 149, 149);
            tc.Text      = "Tipo";
            tc.Height    = Unit.Pixel(15);
            tc.Width     = Unit.Percentage(10);

            tr.Cells.Add(tc);

            tc           = new TableCell();
            tc.CssClass  = "titolo_bianco";
            tc.BackColor = Color.FromArgb(149, 149, 149);
            tc.Text      = "Note Individuali";
            tc.Height    = Unit.Pixel(15);

            tc.Width = Unit.Percentage(30);

            tr.Cells.Add(tc);

            tc           = new TableCell();
            tc.CssClass  = "titolo_bianco";
            tc.BackColor = Color.FromArgb(149, 149, 149);
            tc.Text      = "Data scad.";

            tc.Height = Unit.Pixel(15);
            tc.Width  = Unit.Percentage(10);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);
        }
Beispiel #47
0
        int _SEQ            = 1;       //设置一个标示,给行增加样式

        public Table(System.Web.UI.WebControls.Table tb, int fCurScreenWidth, int iFontWidth)
        {
            mtb = tb;

            if (string.IsNullOrWhiteSpace(tb.CssClass))
            {
                tb.CssClass = "jm-table";
            }

            _FontWidth = iFontWidth;

            _CurScreenWidth = fCurScreenWidth;
        }
 public LoginMock(ILogin login, IConfiguration configuration) : base(login, configuration)
 {
     pnlCPW            = new Panel();
     pnlLogin          = new Panel();
     txtUserName       = new System.Web.UI.WebControls.TextBox();
     tdChangePwd       = new System.Web.UI.WebControls.Table();
     tdError           = new System.Web.UI.WebControls.Table();
     CurrentPassword   = new System.Web.UI.WebControls.TextBox();
     NewPassword       = new System.Web.UI.WebControls.TextBox();
     lblChangePwdError = new System.Web.UI.WebControls.Label();
     lblHeaderText     = new System.Web.UI.WebControls.Label();
     lblMessage        = new System.Web.UI.WebControls.Label();
 }
Beispiel #49
0
        private void ExportGridView(string Filetype)
        {
            {
                HtmlForm frm = new HtmlForm();
                System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
                frm.Controls.Clear();
                frm.Attributes["runat"] = "server";
                if (Filetype.ToLower() == "excel")
                {
                    string temp       = "Equity_Transactions.xls";
                    string attachment = "attachment; filename=" + temp;
                    Response.ClearContent();
                    Response.AddHeader("content-disposition", attachment);
                    Response.ContentType = "application/ms-excel";
                    StringWriter   sw  = new StringWriter();
                    HtmlTextWriter htw = new HtmlTextWriter(sw);


                    Response.Output.Write("<table border=\"0\"><tbody ><caption align=\"left\"><FONT FACE=\"ARIAL\"  SIZE=\"4\">");
                    Response.Output.Write("Equity Transactions for " + convertedFromDate.ToString("MMM-dd-yyyy") + " to " + convertedToDate.ToString("MMM-dd-yyyy") + "</FONT></caption>");
                    Response.Output.Write("<tr><td>");
                    Response.Output.Write("Report Generated on  : ");
                    Response.Output.Write(DateTime.Now.ToString("MMM-dd-yyyy hh:ss tt"));
                    Response.Output.Write("</td></tr>");
                    Response.Output.Write("</tbody></table>");

                    PrepareGridViewForExport(gvMFTransactions);

                    if (gvMFTransactions.HeaderRow != null)
                    {
                        PrepareControlForExport(gvMFTransactions.HeaderRow);
                    }
                    foreach (GridViewRow row in gvMFTransactions.Rows)
                    {
                        PrepareControlForExport(row);
                    }
                    if (gvMFTransactions.FooterRow != null)
                    {
                        PrepareControlForExport(gvMFTransactions.FooterRow);
                    }


                    gvMFTransactions.Parent.Controls.Add(frm);
                    frm.Controls.Add(gvMFTransactions);
                    frm.RenderControl(htw);
                    Response.Write(sw.ToString());
                    Response.End();
                }
            }
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            //Put user code to initialize the page here
            base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

            System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());

            // add new rows/cells
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[1].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[1].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells[0].Text = "111";
            tbl.Rows[0].Cells[1].Text = "222";
            tbl.Rows[1].Cells[0].Text = "333";
            tbl.Rows[1].Cells[1].Text = "444";

            System.Web.UI.WebControls.TableRow [] arrRows = new System.Web.UI.WebControls.TableRow[4];

            try
            {
                base.GHTSubTestBegin("Copy to");
                base.GHTActiveSubTest.Controls.Add(tbl);
                tbl.Rows.CopyTo(arrRows, 1);
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();

            System.Web.UI.WebControls.Table tbl1 = new System.Web.UI.WebControls.Table();
            try
            {
                base.GHTSubTestBegin("Copy to - check array");
                base.GHTActiveSubTest.Controls.Add(tbl1);
                tbl1.Rows.Add((System.Web.UI.WebControls.TableRow)arrRows[1]);
                tbl1.Rows.Add((System.Web.UI.WebControls.TableRow)arrRows[2]);
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();


            base.GHTTestEnd();
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            //Put user code to initialize the page here
            base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

            System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());

            //add new cell
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());
            tbl.Rows[0].Cells.Add(new System.Web.UI.WebControls.TableCell());

            tbl.Rows[0].Cells[0].Text = "111";
            tbl.Rows[0].Cells[1].Text = "222";
            tbl.Rows[0].Cells[2].Text = "333";
            tbl.Rows[0].Cells[3].Text = "444";

            System.Collections.IEnumerator Ienm = tbl.Rows[0].Cells.GetEnumerator();

            System.Web.UI.WebControls.TableCell tblCell = new System.Web.UI.WebControls.TableCell();
            try
            {
                base.GHTSubTestBegin("IEnumerator - get");
                base.GHTSubTestAddResult("IEnumerator=null? " + ((Ienm == null) ? "True" : "False"));
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();

            try
            {
                base.GHTSubTestBegin("Using IEnumerator");
                while (Ienm.MoveNext())
                {
                    base.GHTSubTestAddResult(" CellText = " + ((System.Web.UI.WebControls.TableCell)(Ienm.Current)).Text);
                }
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();
            base.GHTTestEnd();
        }
Beispiel #52
0
        public static OSDataGridTable FromTable(OSDataGrid parent, System.Web.UI.WebControls.Table table, ArrayList rowIds, ArrayList itemIndexes)
        {
            OSDataGridTable osTable = new OSDataGridTable(parent.ClientID);

            // copy everything from table
            // Properties
            osTable.BackImageUrl    = table.BackImageUrl;
            osTable.Caption         = table.Caption;
            osTable.CaptionAlign    = table.CaptionAlign;
            osTable.CellPadding     = table.CellPadding;
            osTable.CellSpacing     = table.CellSpacing;
            osTable.GridLines       = table.GridLines;
            osTable.HorizontalAlign = table.HorizontalAlign;

            // Rows
            TableRow[] tableRows = new TableRow[table.Rows.Count];
            table.Rows.CopyTo(tableRows, 0);

            int i = 0;

            foreach (OSDataGridItem row in tableRows)
            {
                try {
                    // restore the original id of this row, if set
                    if (rowIds != null)
                    {
                        row.ID = OSDataGridItem.FormatId((int)rowIds[i], parent.EnableLegacyRendering);
                    }
                    else
                    {
                        row.ID = OSDataGridItem.FormatId(i + 1, parent.EnableLegacyRendering);
                    }

                    // set the item index, if set
                    if (itemIndexes != null)
                    {
                        row.SetItemIndex((int)itemIndexes[i]);
                    }
                } catch (ArgumentOutOfRangeException) {
                    throw new HEMessageException(MR.GetMessage(MessageId.AjaxListModified, "Table Records", parent.ClientID));
                }

                osTable.Rows.Add(row);
                i++;
            }

            return(osTable);
        }
Beispiel #53
0
        protected void DrawNoteGen(System.Web.UI.WebControls.Table tbl, DocsPAWA.DocsPaWR.Trasmissione trasm)
        {
            TableRow  tr = new TableRow();
            TableCell tc = new TableCell();

            tr.BackColor       = Color.FromArgb(75, 75, 75);
            tc.CssClass        = "titolo_bianco";
            tc.ColumnSpan      = 6;
            tc.Text            = "Note Generali";
            tc.HorizontalAlign = HorizontalAlign.Left;
            tc.Width           = Unit.Percentage(100);
            tc.Height          = Unit.Pixel(20);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);

            tr            = new TableRow();
            tc            = new TableCell();
            tc.ColumnSpan = 6;
            tc.CssClass   = "testo_grigio";
            tc.BackColor  = Color.FromArgb(242, 242, 242);
            tc.Text       = trasm.noteGenerali;

            tc.Width  = Unit.Percentage(100);
            tc.Height = Unit.Pixel(40);

            tr.Cells.Add(tc);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);
            //riga rossa
            tr            = new TableRow();
            tc            = new TableCell();
            tc.ColumnSpan = 6;
            tr.CssClass   = "bg_grigioS";
            tc.Width      = Unit.Percentage(100);
            tc.Height     = Unit.Pixel(10);

            tr.Cells.Add(tc);

            tr.Cells.Add(tc);

            tbl.Rows.Add(tr);
        }
Beispiel #54
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Context.User.IsInRole("Order"))
            {
                Response.Redirect("/Account/Lockout");
            }

            Table T = new System.Web.UI.WebControls.Table();

            L = r.GetData();
            foreach (Product p in L)
            {
                TableRow  TR = new TableRow();
                TableCell TC = new TableCell();
                T.BorderWidth  = 2;
                TR.BorderWidth = 2;
                TC.BorderWidth = 2;
                Image im = new Image();
                im.ImageUrl = "~//" + p.URL.ToString();
                im.Width    = 250;
                im.Height   = 250;
                Label l = new Label();
                l.Text = "Product Name:";
                HyperLink HL = new HyperLink();
                HL.Text = p.Name.ToString();
                Label l1 = new Label();
                l1.Text = "Price Of Product:";
                HyperLink HL2 = new HyperLink();
                HL2.Text       = p.Price.ToString();
                HL.ID          = "Hyperlink_file";
                HL.NavigateUrl = "ProductItem.aspx?id=" + p.Id;
                TC.Width       = 600;
                TC.Height      = 300;
                TC.Controls.Add(im);
                TC.Controls.Add(l);
                TC.Controls.Add(HL);
                //TC.Controls.Add( );
                TC.Controls.Add(new LiteralControl("<br/>"));
                TC.Controls.Add(l1);
                TC.Controls.Add(HL2);
                TR.Cells.Add(TC);
                T.Rows.Add(TR);
            }
            PlaceHolder1.Controls.Add(T);
        }
        protected void ItemTable_OnDataBinding(Object sender, EventArgs eventArgs)
        {
            System.Web.UI.WebControls.Table itemTable = (System.Web.UI.WebControls.Table)sender;

            Telerik.Web.UI.RadComboBoxItem currentItem = (Telerik.Web.UI.RadComboBoxItem)itemTable.BindingContainer;

            System.Data.DataRowView currentRow = (System.Data.DataRowView)currentItem.DataItem;

            itemTable.Rows[0].Cells[0].Text = ((String)currentRow["ProviderName"]);

            itemTable.Rows[0].Cells[1].Text = ((String)currentRow["FederalTaxId"]);

            itemTable.Rows[0].Cells[2].Text = ((String)currentRow["NationalProviderId"]);

            itemTable.Rows[0].Cells[3].Text = ((String)currentRow["PrimarySpecialtyName"]);

            return;
        }
Beispiel #56
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            //Put user code to initialize the page here
            base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

            System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows[tbl.Rows.Count - 1].ID = tbl.Rows.Count.ToString();


            System.Collections.IEnumerator Ienm = tbl.Rows.GetEnumerator();

            try
            {
                base.GHTSubTestBegin("IEnumerator - get");
                base.GHTSubTestAddResult("IEnumerator=null? " + ((Ienm == null) ? "True" : "False"));
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();

            try
            {
                base.GHTSubTestBegin("Using IEnumerator");
                while (Ienm.MoveNext())
                {
                    base.GHTSubTestAddResult(" RowId = " + ((System.Web.UI.WebControls.TableRow)Ienm.Current).ID);
                }
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();
            base.GHTTestEnd();
        }
Beispiel #57
0
        /// <summary>
        /// Create header for database table
        /// </summary>
        /// <param name="tbl">Table control</param>
        private void AddDatabaseTableHeader(System.Web.UI.WebControls.Table tbl)
        {
            TableRow  newRow;
            TableCell newCell;

            newRow = new TableRow();
            tbl.Rows.Add(newRow);

            newCell          = new TableCell();
            newCell.CssClass = "apiDatabaseCell";
            newRow.Cells.Add(newCell);

            foreach (LanguageSettings lang in PXWeb.Settings.Current.General.Language.SiteLanguages)
            {
                newCell      = new TableCell();
                newCell.Text = lang.Name;
                newRow.Cells.Add(newCell);
            }
        }
Beispiel #58
0
        /// <summary>
        /// Generates the table.
        /// </summary>
        /// <param name="cssClass">The CSS class.</param>
        /// <returns>HtmlString.</returns>
        /// <exception cref="System.Exception"></exception>
        public HtmlString GenerateTable(string cssClass = "")
        {
            var classname = !string.IsNullOrWhiteSpace(cssClass) ? string.Format("table {0}", cssClass) : "table";
            var table     = new System.Web.UI.WebControls.Table
            {
                CssClass = classname
            };

            #region Generate THEAD

            table.Rows.Add(GenerateTHead());

            #endregion

            #region Generate TBODY

            var rows = GenerateTBody();
            foreach (var row in rows)
            {
                table.Rows.Add(row);
            }

            #endregion

            #region Generate TFOOT

            //table.Rows.Add(GenerateTFoot());

            #endregion

            try
            {
                var strWriter = new StringWriter();
                table.RenderControl(new HtmlTextWriter(strWriter));
                var html = new HtmlString(strWriter.ToString());
                return(html);
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("Problems generating table. Exception: {0}{2}, Message: {1}{2}", ex, ex.Message, Environment.NewLine));
            }
        }
Beispiel #59
0
//-------------------------------------------------------------------------------------------
        void WeavverDataGrid_PreRender(object sender, EventArgs e)
        {
            //TemplateColumn tc =
            //tc.
            System.Web.UI.WebControls.Table tbl = (System.Web.UI.WebControls.Table)Controls[0];
            for (int y = 0; y < tbl.Controls.Count; y++)
            {
                DataGridItem row = (DataGridItem)tbl.Controls[y];
                //Page.Response.Write(tbl.Controls[y].GetType().ToString());
                //}



                //for (int r = 0; r < Items.Count; r++)
                //{
                //     DataGridItem row = Items[r];
                if (row.ItemType == ListItemType.Item || row.ItemType == ListItemType.AlternatingItem)
                {
                    for (int i = 0; i < row.Cells.Count; i++)
                    {
                        TableCell cell = (TableCell)row.Cells[i];
                        if (!cell.Width.IsEmpty)
                        {
                            string div = "height:15px;";
                            div += "white-space:nowrap;";
                            div += "text-overflow:ellipsis;";
                            div += "overflow:hidden;";
                            div += "word-break:break-all;";
                            div += "word-wrap:break-word;";
                            div += "width:" + cell.Width.ToString() + ";";

                            //for (int x = 0; x < e.Item.Cells[x].Controls.Count; x++)
                            //{
                            //     Page.Response.Write(e.Item.Cells[i].Controls[i].GetType().ToString());
                            //}
                            cell.Controls.AddAt(0, new LiteralControl("<div style='" + div + "'>" + cell.Text));
                            cell.Controls.Add(new LiteralControl("</div>"));
                        }
                    }
                }
            }
        }
Beispiel #60
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            //Put user code to initialize the page here
            base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));

            System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            tbl.Rows.Add(new System.Web.UI.WebControls.TableRow());
            try
            {
                base.GHTSubTestBegin("Check SyncRoot, should be true");
                GHTSubTestAddResult(ReferenceEquals(tbl.Rows.SyncRoot, tbl.Rows).ToString());
            }
            catch (Exception ex)
            {
                base.GHTSubTestUnexpectedExceptionCaught(ex);
            }
            base.GHTSubTestEnd();
            base.GHTTestEnd();
        }