protected void Page_Load(object sender, EventArgs e)
        {
            HtmlTable table1 = new HtmlTable();
              table1.Border = 1;
              table1.CellPadding = 3;
              table1.CellSpacing = 3;
              table1.BorderColor = "red";

              HtmlTableRow row;
              HtmlTableCell cell;

              for (int i = 1; i <= 5; i++)
              {
            row = new HtmlTableRow();

            row.BgColor = (i % 2 == 0 ? "lightyellow" : "lightcyan");

            for (int j = 1; j <= 4; j++)
            {
              cell = new HtmlTableCell();
              cell.InnerHtml = "Row: " + i.ToString() + "<br /> Cell: " + j.ToString();

              row.Cells.Add(cell);
            }

            table1.Rows.Add(row);
              }

              this.Controls.Add(table1);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     //tabelaZlecenia.Rows.Clear();
     DataView view = (DataView)SqlDataZleceniodawcy.Select(DataSourceSelectArguments.Empty);
     DataTable table = view.ToTable();
     DataSet ds = new DataSet();
     ds.Tables.Add(table);
     foreach (DataRow row in ds.Tables[0].Rows)
     {
         HtmlTableRow htmlrow = new HtmlTableRow();
         HtmlTableCell htmlcell = new HtmlTableCell();
         HtmlTableCell htmlcell2 = new HtmlTableCell();
         HtmlTableCell htmlcell3 = new HtmlTableCell();
         HtmlTableCell htmlcell4 = new HtmlTableCell();
         HtmlTableCell htmlcell5 = new HtmlTableCell();
         htmlcell.InnerText = row["Imie"].ToString() + " " + row["Nazwisko"].ToString();
         htmlrow.Cells.Add(htmlcell);
         htmlcell2.InnerText = row["NazwaFirmy"].ToString();
         htmlrow.Cells.Add(htmlcell2);
         htmlcell3.InnerText = row["email"].ToString();
         htmlrow.Cells.Add(htmlcell3);
         htmlcell4.InnerText = row["Telefon"].ToString();
         htmlrow.Cells.Add(htmlcell4);
         htmlcell5.InnerText = row["NIP"].ToString();
         htmlrow.Cells.Add(htmlcell5);
         tabelaZleceniodawcy.Rows.Add(htmlrow);
         tabelaZleceniodawcy.DataBind();
     }
 }
        public void LoadUDFs()
        {
            var udfList = UDF.GetUDFList(_udfLevel, _levelID);

            if (udfList.Count > 0)
            {
                var udfTable = new HtmlTable();
                udfTable.Attributes["class"] = "fieldValueTable";
                udfTable.Width = "100%";

                foreach (UDF udf in udfList)
                {
                    var tableRow = new HtmlTableRow();
                    var labelCell = new HtmlTableCell();
                    var valueCell = new HtmlTableCell();

                    labelCell.Attributes["class"] = "fieldLabel";
                    labelCell.InnerHtml = udf.Name + ":";

                    valueCell.InnerHtml = udf.Value;

                    tableRow.Cells.Add(labelCell);
                    tableRow.Cells.Add(valueCell);

                    udfTable.Rows.Add(tableRow);

                    udfInformationContainer.Controls.Add(udfTable);
                    udfTable.DataBind();
                }
            }
        }
Ejemplo n.º 4
0
        private void LoadEmotionIcos()
        {
            int averageCell = 6;
            HtmlTableRow emotionRow = null;
            List<string> emotionIcos = Emotion.GetEmotionIcos();

            for (int i = 0; i < emotionIcos.Count; i++)
            {
                if (i % averageCell == 0)
                {
                    emotionRow = new HtmlTableRow();
                    tableEmotion.Rows.Add(emotionRow);
                }

                HtmlTableCell emotionCell = new HtmlTableCell();
                emotionCell.InnerHtml = string.Format(
                    "<img alt=\"{2}\" src=\"../{0}/{1}\" emotion=\"{1}\" onmousedown=\"Emotion.setContentEmotion(this);\" style=\"cursor: pointer;\" />",
                    Emotion.EmotionIcosPath,
                    Path.GetFileName(emotionIcos[i]),
                    Path.GetFileNameWithoutExtension(emotionIcos[i])
                    );

                emotionRow.Cells.Add(emotionCell);

            }
        }
Ejemplo n.º 5
0
        private static HtmlTableCell AddControl(JobControl_Get_Result control)
        {
            HtmlTableCell cell = new HtmlTableCell();
            Control c = new Control();

            switch (control.ControlTypeName)
            {
                case "TextBox":
                    c = new TextBox();
                    c.ID = control.JobControlID + control.ControlTypeName + control.ControlName;
                    break;

                case "CheckBox":
                    c = new CheckBox();
                    c.ID = control.JobControlID + control.ControlTypeName + control.ControlName;
                    break;

                case "ImageUpload":
                    c = new FileUpload();
                    c.ID = control.JobControlID + control.ControlTypeName + control.ControlName;
                    break;
            }

            cell.Controls.Add(c);
            return cell;
        }
Ejemplo n.º 6
0
        private DateTime CreateOneDayCell(DateTime idxDate, HTML.HtmlTableRow row)
        {
            HTML.HtmlTableCell cell = new HTML.HtmlTableCell();
            cell.EnableViewState = false;
            cell.ID = idxDate.ToString("cell_MM_dd", System.Globalization.CultureInfo.InvariantCulture) + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);

            // Creating actual LinkButton which is the "clickable part" of the calendar days
            LinkButton btn = new LinkButton();

            btn.Text = idxDate.Day.ToString();
            btn.ID   = idxDate.ToString("yyyy_MM_dd", System.Globalization.CultureInfo.InvariantCulture);
            if (idxDate == Value.Date)
            {
                btn.CssClass = "selected";
            }
            else if (idxDate.Month != Value.Month)
            {
                btn.CssClass = "offMonth";
            }
            btn.Click          += new EventHandler(btn_Click);
            btn.EnableViewState = false;
            cell.Controls.Add(btn);

            if (RenderDay != null)
            {
                RenderDay(this, new RenderDayEventArgs(idxDate.Date, cell));
            }

            row.Cells.Add(cell);

            idxDate = idxDate.AddDays(1);
            return(idxDate);
        }
Ejemplo n.º 7
0
        private void Test()
        {
            string _discountName = "asdfghij";
            //row.Where(r => r.Cells.Any(c => c.InnerText.Contains(discountName)));
            List<HtmlTableRow> _discountTable = new List<HtmlTableRow>();
            for (int _row = 0; _row < 2; _row++)
            {
                HtmlTableRow _newRow = new HtmlTableRow();
                for (int _cells = 0; _cells < 5; _cells++)
                {
                    HtmlTableCell _cell = new HtmlTableCell();
                    _cell.InnerText = "Cell" + _cells.ToString();
                    _newRow.Cells.Add(_cell);
                }
                _discountTable.Add(_newRow);
            }

            List<HtmlTableRow> _resultRows = new List<HtmlTableRow>();
            foreach (HtmlTableRow _htmlTableRow in _discountTable)
            {
                if (_htmlTableRow.Cells.Cast<HtmlTableCell>().Any(_cell => _cell.InnerText.Contains(_discountName)))
                {
                    _resultRows.Add(_htmlTableRow);
                }
            }
        }
Ejemplo n.º 8
0
        protected void btnLiteralTable_Click(object sender, EventArgs e)
        {
            System.Web.UI.HtmlControls.HtmlTable tableT = new System.Web.UI.HtmlControls.HtmlTable();
            System.Web.UI.HtmlControls.HtmlTableRow rowR = new System.Web.UI.HtmlControls.HtmlTableRow();
            System.Web.UI.HtmlControls.HtmlTableCell cellA = new System.Web.UI.HtmlControls.HtmlTableCell();
            System.Web.UI.HtmlControls.HtmlTableCell cellB = new System.Web.UI.HtmlControls.HtmlTableCell();

            System.Web.UI.HtmlControls.HtmlTableCell cellC = new System.Web.UI.HtmlControls.HtmlTableCell();
            cellA.InnerText = "t2 C1Header";
            cellB.InnerText = "t2 C2Header";
            cellC.InnerText = "t2 C3Header";
            rowR.Cells.Add(cellA);
            rowR.Cells.Add(cellB);
            rowR.Cells.Add(cellC);
            tableT.Rows.Add(rowR);
            cellA = new HtmlTableCell();
            cellB = new HtmlTableCell();
            cellC = new HtmlTableCell();
            rowR = new HtmlTableRow();
            cellA.InnerText = "r1c1";
            cellB.InnerHtml = "r2c2";
            cellC.InnerText = "r3c3";
            rowR.Cells.Add(cellA);
            rowR.Cells.Add(cellB);
            rowR.Cells.Add(cellC);
            tableT.Rows.Add(rowR);

            this.Controls.Add(tableT);
        }
Ejemplo n.º 9
0
 private void BindUserGorupMaxspacephotosize()
 {
     #region 绑定用户组照片空间大小
     DataTable dt = DatabaseProvider.GetInstance().GetUserGroupMaxspacephotosize();
     int i = 1;
     HtmlTableRow tr = new HtmlTableRow();
     foreach (DataRow dr in dt.Rows)
     {
         if (i % 2 == 1)
         {
             tr = new HtmlTableRow();
         }
         HtmlTableCell td = new HtmlTableCell("td");
         td.Controls.Add(new LiteralControl(dr["grouptitle"].ToString()));
         tr.Cells.Add(td);
         td = new HtmlTableCell("td");
         Discuz.Control.TextBox tb = new Discuz.Control.TextBox();
         tb.ID = "maxspacephotosize" + dr["groupid"].ToString();
         tb.Size = 10;
         tb.MaxLength = 9;
         tb.Text = dr["maxspacephotosize"].ToString();
         tb.RequiredFieldType = "数据校验";
         td.Controls.Add(tb);
         tr.Cells.Add(td);
         tr.Cells.Add(GetTD("maxspacephotosize" + dr["groupid"].ToString()));
         groupphotosize.Rows.Add(tr);
         i++;
     }
     #endregion
 }
Ejemplo n.º 10
0
 private HtmlTableCell AddCell(HtmlTableRow row, string text)
 {
     var cell = new HtmlTableCell();
     cell.InnerHtml = text;
     row.Cells.Add(cell);
     return cell;
 }
Ejemplo n.º 11
0
    protected void DataList3_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        //一传二

        HyperLink hy         = (HyperLink)e.Item.FindControl("HyperLink1");
        Label     AssId      = (Label)e.Item.FindControl("AssIdLabel");
        Label     BelongItem = (Label)e.Item.FindControl("BelongItemLabel");

        if (hy != null)
        {
            hy.NavigateUrl = "~/item/ass-content.aspx?AssId=" + AssId.Text + "&ItemId=" + BelongItem.Text;
        }
        //项目链接
        //HyperLink IL = (HyperLink)e.Item.FindControl("ItemName");
        //IL.NavigateUrl = "~/item/item.aspx?ItemId=" + BelongItem.Text;
        //重要标红
        Label IPL = (Label)e.Item.FindControl("IsImportantLabel");

        System.Web.UI.HtmlControls.HtmlTableCell IPT = (System.Web.UI.HtmlControls.HtmlTableCell)e.Item.FindControl("isimportent");
        if (IPL.Text == "True")
        {
            IPL.Text    = "重要";
            IPT.BgColor = "red";
        }
        else
        {
            IPL.Visible = false;
        }
    }
Ejemplo n.º 12
0
        private void RefreshCheckpointList()
        {
            CheckpointsTable.Rows.Clear();

            HtmlTableRow tr = new HtmlTableRow();

            foreach (JobCheckpoint cp in checkpoints)
            {
                HtmlTableCell value = new HtmlTableCell();
                value.InnerText = cp.Name;

                switch (cp.ExecutionStatus)
                {
                    case JobExecutionState.Unknown:
                    case JobExecutionState.Scheduled:
                        value.Attributes.Add("class", "Checkpoint");
                        break;
                    default:
                        value.Attributes.Add("class", "Checkpoint Checkpoint" + cp.ExecutionStatus.ToString());
                        break;
                }

                tr.Cells.Add(value);
            }

            CheckpointsTable.Rows.Add(tr);
        }
Ejemplo n.º 13
0
        public override Control AddTo(Control container)
        {
            HtmlTableCell labelCell = new HtmlTableCell();
            Label label = AddLabel(labelCell);

            HtmlTableCell editorCell = new HtmlTableCell();
            Control editor = AddEditor(editorCell);
            if (label != null && editor != null && !string.IsNullOrEmpty(editor.ID))
                label.AssociatedControlID = editor.ID;

            HtmlTableCell extraCell = new HtmlTableCell();
            if (Required)
                AddRequiredFieldValidator(extraCell, editor);
            if (Validate)
                AddRegularExpressionValidator(extraCell, editor);

            AddHelp(extraCell);

            HtmlTableRow row = new HtmlTableRow();
            row.Cells.Add(labelCell);
            row.Cells.Add(editorCell);
            row.Cells.Add(extraCell);

            HtmlTable editorTable = new HtmlTable();
            editorTable.Attributes["class"] = "editDetail";
            editorTable.Controls.Add(row);
            container.Controls.Add(editorTable);

            return editor;
        }
Ejemplo n.º 14
0
        protected void btnLiteralTable_Click(object sender, EventArgs e)
        {
            System.Web.UI.HtmlControls.HtmlTable     tableT = new System.Web.UI.HtmlControls.HtmlTable();
            System.Web.UI.HtmlControls.HtmlTableRow  rowR   = new System.Web.UI.HtmlControls.HtmlTableRow();
            System.Web.UI.HtmlControls.HtmlTableCell cellA  = new System.Web.UI.HtmlControls.HtmlTableCell();
            System.Web.UI.HtmlControls.HtmlTableCell cellB  = new System.Web.UI.HtmlControls.HtmlTableCell();

            System.Web.UI.HtmlControls.HtmlTableCell cellC = new System.Web.UI.HtmlControls.HtmlTableCell();
            cellA.InnerText = "t2 C1Header";
            cellB.InnerText = "t2 C2Header";
            cellC.InnerText = "t2 C3Header";
            rowR.Cells.Add(cellA);
            rowR.Cells.Add(cellB);
            rowR.Cells.Add(cellC);
            tableT.Rows.Add(rowR);
            cellA           = new HtmlTableCell();
            cellB           = new HtmlTableCell();
            cellC           = new HtmlTableCell();
            rowR            = new HtmlTableRow();
            cellA.InnerText = "r1c1";
            cellB.InnerHtml = "r2c2";
            cellC.InnerText = "r3c3";
            rowR.Cells.Add(cellA);
            rowR.Cells.Add(cellB);
            rowR.Cells.Add(cellC);
            tableT.Rows.Add(rowR);

            this.Controls.Add(tableT);
        }
        private void LoadWeights()
        {
            ConnectorDataContext db = new ConnectorDataContext();

            Stopwatch w = Stopwatch.StartNew();
            List<FeatureScore> fScores = db.FeatureScores.ToList();
            w.Stop();
            ILog log = LogManager.GetLogger("QueryLogger");
            log.Info(" Elapsed time: " + w.Elapsed + ", select all feature scores");

            foreach (var item in fScores)
            {
                HtmlTableCell service = new HtmlTableCell();
                HtmlTableCell feature = new HtmlTableCell();
                HtmlTableCell weight = new HtmlTableCell();

                service.InnerText = item.ServiceInstance.name;
                feature.InnerText = item.feature;
                weight.InnerText = item.score.ToString();
                weight.Attributes.Add("class", "center");
                weight.Attributes.Add("contenteditable", "true");

                HtmlTableRow tr = new HtmlTableRow();
                tr.Cells.Add(service);
                tr.Cells.Add(feature);
                tr.Cells.Add(weight);

                WeightTable.Rows.Add(tr);
            }
        }
        protected void BuildStudentGrowthTable()
        {
            var table = new HtmlTable();
            var headerRow = new HtmlTableRow();

            table.Width = "100%";
            table.Attributes["class"] = "sgTable";

            //Add header row
            foreach(DataColumn column in _ds.Tables[1].Columns)
            {
                var headerCell = new HtmlTableCell();
                headerCell.Attributes["class"] = "sgTableHeadCell";
                headerCell.InnerHtml = column.ColumnName;
                headerRow.Cells.Add(headerCell);
            }
            table.Rows.Add(headerRow);
            
            //Add body rows
            foreach(DataRow row in _ds.Tables[1].Rows)
            {
                var tableRow = new HtmlTableRow();
                foreach(DataColumn column in _ds.Tables[1].Columns)
                {
                    var tableCell = new HtmlTableCell();
                    tableCell.Attributes["class"] = table.Rows.Count % 2 == 0 ? "" : "altTD";
                    tableCell.InnerHtml = row[column].ToString();
                    tableRow.Cells.Add(tableCell);
                }
                table.Rows.Add(tableRow);
            }

            if (_ds.Tables[1].Rows.Count > 1 || (_ds.Tables[1].Rows.Count > 0 && !_ds.Tables[1].Rows[0][0].ToString().Contains("N/A")))
            {

                //Add spacer row
                var spacerRow = new HtmlTableRow();
                var spacerCell = new HtmlTableCell();
                spacerCell.ColSpan = _ds.Tables[1].Columns.Count;
                spacerCell.InnerHtml = "&nbsp;";
                spacerCell.BgColor = "bababa";
                spacerRow.Cells.Add(spacerCell);
                table.Rows.Add(spacerRow);

                //Add aggregate concordant row
                var concordRow = new HtmlTableRow();
                var concordCell1 = new HtmlTableCell();
                var concordCell2 = new HtmlTableCell();
                concordCell1.ColSpan = _ds.Tables[1].Columns.Count - 1;
                concordCell2.InnerHtml = "Aggregate Concordant = <span class=\"normalText\">" + _aggregateConcordant + "</span>";
                concordCell2.Attributes["class"] = "sgTableHeadCell";
                concordRow.Cells.Add(concordCell1);
                concordRow.Cells.Add(concordCell2);
                table.Rows.Add(concordRow);
            }

            //Add table to panel
            studentGrowDataTable.Controls.Add(table);
        }
Ejemplo n.º 17
0
Archivo: sz.aspx.cs Proyecto: JuRogn/OA
 public static void BuildTableRow(HtmlTable table, TmpAward item)
 {
     var tr = new HtmlTableRow();
     var cell = new HtmlTableCell();
     cell.InnerText = item.TicketNO;
     tr.Cells.Add(cell);
     table.Rows.Add(tr);
 }
Ejemplo n.º 18
0
 private static HtmlTableCell AddLabel(string labelText)
 {
     HtmlTableCell cell = new HtmlTableCell();
     Label l = new Label();
     l.Text = labelText;
     cell.Controls.Add(l);
     return cell;
 }
Ejemplo n.º 19
0
 internal static HtmlTableCell GetFieldCell()
 {
     using (HtmlTableCell cell = new HtmlTableCell())
     {
         cell.Attributes.Add("class", "ui field");
         return cell;
     }
 }
        private void LoadData()
        {
            /* Get our standard from TileParms collection. */
            var oStd = (Thinkgate.Base.Classes.Standards)Tile.TileParms.GetParm("standards");

            /* populate controls from our standard. */
            StdsPage_StdsContent_DivStdTitle.InnerText = BuildStdTitle(oStd);
            StdsPage_StdsContent_DivStdText.InnerHtml = oStd.Desc;

            /* populate parent information if our standard has a parent */

            if (oStd.Parent != null)
            {
                StdsPage_StdsContent_DivStdParentTitle.InnerText = BuildStdTitle(oStd.Parent);
                StdsPage_StdsContent_DivStdParentText.InnerHtml = oStd.Parent.Desc;
            }
            else
            {
                StdsPage_StdsContent_DivStdParentTitle.InnerText = "";
                StdsPage_StdsContent_DivStdParentText.InnerText = "";
            }

            /* populate children informationif our standard has children */
            if (oStd.Children.Count >0)
            {
                sb = new StringBuilder("");

                HtmlTable oTbl = new HtmlTable();
                HtmlTableRow oRow;
                HtmlTableCell oCell;
                System.Web.UI.HtmlControls.HtmlGenericControl oDiv;

                foreach (Thinkgate.Base.Classes.Standards oChildStd in oStd.Children)
                {
                    oRow = new HtmlTableRow();
                    oCell = new HtmlTableCell();

                    oDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                    oDiv.Attributes.Add("class", "stdTitle");
                    oDiv.Style.Add("display","block");
                    oDiv.InnerText = BuildStdTitle(oChildStd);

                    oCell.Controls.Add(oDiv);

                    oDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                    oDiv.Attributes.Add("class", "stdText");
                    oDiv.Style.Add("display", "block");
                    oDiv.InnerHtml = oChildStd.Desc;

                    oCell.Controls.Add(oDiv);

                    oRow.Cells.Add(oCell);
                    oTbl.Rows.Add(oRow);
                }

                StdsPage_StdsContent_divStdChildren.Controls.Add(oTbl);
            }
        }
Ejemplo n.º 21
0
		override protected void OnInit(EventArgs e)
		{
			base.OnInit(e);

			node = new cms.businesslogic.CMSNode(int.Parse(helper.Request("id")));

			HtmlTable ht = new HtmlTable();
			ht.CellPadding = 4;

			HtmlTableRow captions = new HtmlTableRow();
			captions.Cells.Add(new HtmlTableCell());

            ArrayList actionList = BusinessLogic.Actions.Action.GetAll();
            foreach (interfaces.IAction a in actionList)
            {
				if (a.CanBePermissionAssigned) 
				{
					HtmlTableCell hc = new HtmlTableCell();
					hc.Attributes.Add("class", "guiDialogTinyMark");
					hc.Controls.Add(new LiteralControl(ui.Text("actions", a.Alias)));
					captions.Cells.Add(hc);
				}
			}
			ht.Rows.Add(captions);

			foreach (BusinessLogic.User u in BusinessLogic.User.getAll()) 
			{
				// Not disabled users and not system account
				if (!u.Disabled && u.Id > 0) 
				{
					HtmlTableRow hr = new HtmlTableRow();

					HtmlTableCell hc = new HtmlTableCell();
					hc.Attributes.Add("class", "guiDialogTinyMark");
					hc.Controls.Add(new LiteralControl(u.Name));
					hr.Cells.Add(hc);

					foreach (interfaces.IAction a in BusinessLogic.Actions.Action.GetAll()) 
					{
						CheckBox c = new CheckBox();
						c.ID = u.Id + "_" + a.Letter;
						if (a.CanBePermissionAssigned) 
						{
							if (u.GetPermissions(node.Path).IndexOf(a.Letter) > -1)
								c.Checked = true;
							HtmlTableCell cell = new HtmlTableCell();
							cell.Style.Add("text-align", "center");
							cell.Controls.Add(c);
							permissions.Add(c);
							hr.Cells.Add(cell);
						}
							
					}
					ht.Rows.Add(hr);
				}
			}
			PlaceHolder1.Controls.Add(ht);
		}
Ejemplo n.º 22
0
        private void LoadTopPanel(Panel topPanel)
        {
            topPanel.CssClass = this.TopPanelCssClass;
            using (HtmlTable table = new HtmlTable())
            {
                using (HtmlTableRow row = new HtmlTableRow())
                {
                    using (HtmlTableCell dropDownListCell = new HtmlTableCell())
                    {
                        filterDropDownList = new DropDownList();

                        filterDropDownList.ID = "FilterDropDownList";
                        filterDropDownList.CssClass = this.FilterDropDownListCssClass;
                        filterDropDownList.DataTextField = "column_name";
                        filterDropDownList.DataValueField = "column_name";
                        filterDropDownList.DataBound += this.FilterDropDownList_DataBound;

                        dropDownListCell.Controls.Add(filterDropDownList);
                        row.Cells.Add(dropDownListCell);

                    }
                    using (HtmlTableCell textBoxCell = new HtmlTableCell())
                    {
                        filterTextBox = new TextBox();
                        filterTextBox.ID = "FilterTextBox";
                        filterTextBox.CssClass = this.FilterTextBoxCssClass;
                        textBoxCell.Controls.Add(filterTextBox);
                        row.Cells.Add(textBoxCell);
                    }

                    using (HtmlTableCell buttonCell = new HtmlTableCell())
                    {
                        goButton = new Button();
                        goButton.ID = "GoButton";
                        goButton.CssClass = this.ButtonCssClass;

                        if (this.ButtonHeight != null)
                        {
                            goButton.Height = this.ButtonHeight;
                        }

                        if (this.ButtonWidth != null)
                        {
                            goButton.Width = this.ButtonWidth;
                        }

                        goButton.Click += this.GoButton_Click;
                        goButton.Text = Resources.ScrudResource.Go;
                        buttonCell.Controls.Add(goButton);
                        row.Cells.Add(buttonCell);
                    }

                    table.Rows.Add(row);
                    topPanel.Controls.Add(table);
                }
            }
        }
Ejemplo n.º 23
0
        internal static void AddCell(HtmlTableRow row, string text)
        {
            using (HtmlTableCell cell = new HtmlTableCell())
            {
                cell.InnerHtml = text;

                row.Cells.Add(cell);
            }
        }
Ejemplo n.º 24
0
        protected void btnRowTable_Click(object sender, EventArgs e)
        {
            HtmlTable table = new HtmlTable();
            HtmlTableRow row = new HtmlTableRow();
            HtmlTableRow rowB = new HtmlTableRow();
            HtmlTableRow rowC = new HtmlTableRow();
            HtmlTableCell cell = new HtmlTableCell();
            HtmlTableCell cell1 = new HtmlTableCell();
            HtmlTableCell cell2 = new HtmlTableCell();
            HtmlTableCell cell3 = new HtmlTableCell();
            HtmlTableCell cell4 = new HtmlTableCell();
            HtmlTableCell cell5 = new HtmlTableCell();
            HtmlTableCell cell6 = new HtmlTableCell();
            HtmlTableCell cell7 = new HtmlTableCell();
            HtmlTableCell cell8 = new HtmlTableCell();
            HtmlTableCell cell9 = new HtmlTableCell();
            cell.InnerText = "This is Column 1";
            cell2.InnerText = "This is Column 2";
            cell3.InnerText = " This is Column 3";
            row.Cells.Add(cell);
            row.Cells.Add(cell2);
            row.Cells.Add(cell3);
            table.Rows.Add(row);
            row = new HtmlTableRow();
            cell = new HtmlTableCell();
            cell2 = new HtmlTableCell();
            cell3 = new HtmlTableCell();
            cell.InnerText = "column 4a";
            cell2.InnerText = "column 5a";
            cell3.InnerText = "Column 6a";
            row.Cells.Add(cell);
            row.Cells.Add(cell2);
            row.Cells.Add(cell3);
            table.Rows.Add(row);

            cell = new HtmlTableCell();
            cell.InnerText = "this is the new cell";
            cell1 = new HtmlTableCell();
            cell1.InnerText = "this is the new cell1";
            cell2 = new HtmlTableCell();
            cell2.InnerText = "this is the new cell3";
            row = new HtmlTableRow();
            row.Cells.Add(cell);
            row.Cells.Add(cell1);
            row.Cells.Add(cell2);
            table.Rows.Add(row);

            //cell7.InnerText = "again with 4";
            //cell8.InnerText = "again with 5";
            //cell9.InnerText = "again with 6";
            //rowC.Cells.Add(cell7);
            //rowC.Cells.Add(cell8);
            //rowC.Cells.Add(cell9);
            //table.Rows.Add(rowC);

            this.Controls.Add(table);
        }
 private void AddTH(string title, int colspan)
 {
     HtmlTableRow tr = new HtmlTableRow();
     HtmlTableCell th = new HtmlTableCell("th");
     th.InnerHtml = title;
     th.ColSpan = colspan;
     tr.Cells.Add(th);
     tblProducts.Rows.Add(tr);
 }
 private void AddTR(string title, int colspan)
 {
     HtmlTableRow tr = new HtmlTableRow();
     HtmlTableCell td = new HtmlTableCell("td");
     td.InnerHtml = title;
     td.ColSpan = colspan;
     tr.Cells.Add(td);
     tblProducts.Rows.Add(tr);
 }
Ejemplo n.º 27
0
		public void InstantiateIn(Control container)
		{
			RepeaterItem item = (RepeaterItem)container;

			HtmlTableCell cell = new HtmlTableCell();
			container.Controls.Add(cell);

			cell.DataBinding += new EventHandler(cell_DataBinding);
		}
Ejemplo n.º 28
0
        protected void createTable()
        {
            var b = db.LostAndFound_Admin;
            var a = from t in b select t;
            int c = b.Count();
            int count = 0;
            string[] nameList = new string[c];
            string[] dateList = new string[c];
            string[] desList = new string[c];
            string[] imageList = new string[c];
            string[] roomList = new string[c];
            
            foreach (var d in a)
            {
                
                var name = d.Name;
                nameList[count] = name;
                var room = d.Room;
                roomList[count] = room;
                var lostDate = d.LostTime;
                dateList[count] = lostDate.ToString("yyyy-MM-dd");
                var des = d.Description;
                desList[count] = des;
                var image = d.ImageName;
                imageList[count] = image;
                count++;
            }

            int row = count / 3 ;
            if (count % 3 > 0) row++;
            //Response.Write(row.ToString()+"   "+count.ToString());
            int cnt = 0;

            for ( int i = 0; i < row; i ++)
            {
                HtmlTableRow htr = new HtmlTableRow();
                for (int j = 0; j < 3; j++)
                {
                    HtmlTableCell htc = new HtmlTableCell();

                    htr.Cells.Add(htc);
                    htc.Width = "266";
                    htc.Height = "300";

                    htc.InnerHtml = "<img src=\"File/" + imageList[i * 3 + j] + "\" width=\"250px\" height=\"190px\" style=\"margin-top:10px;\">" +
                           "<h5>" + "名称:"+nameList[i * 3 + j] + "</h5>" +
                           "<h5>" + "机房:"+roomList[i * 3 + j] + "</h5>" +
                           "<h5>" + "日期:"+dateList[i * 3 + j] + "</h5>" +
                           "<h5>" + "描述:"+desList[i * 3 + j] + "</h5>";
                           ;
                    cnt++;
                    if (cnt == count)
                        break;
                }
                d_table.Rows.Add(htr);
            }
        }
        protected void productNamesDDL_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {

                Product p = new Product();
                GridView gvProperties = new GridView();
                Category c = new Category();
                categoryProducts = c.GetAllCategoryProducts(categories[categoriesNamesDDL.Text].ToString());
                gvProperties = p.productPropertiesStatistics(categoryProducts[productNamesDDL.Text]);
                foreach (GridViewRow row in gvProperties.Rows)
                {
                    HtmlTableRow tr = new HtmlTableRow();
                    HtmlTableCell tc = new HtmlTableCell();
                    HtmlTableCell tc1 = new HtmlTableCell();
                    HtmlTableCell tc2 = new HtmlTableCell();
                    tc.InnerHtml = row.Cells[0].Text;
                    tc1.InnerHtml = row.Cells[1].Text;
                    tc2.InnerHtml = '%' + row.Cells[2].Text;
                    tr.Controls.Add(tc);
                    tr.Controls.Add(tc1);
                    tr.Controls.Add(tc2);
                    productPropertiesStatistics.Controls.Add(tr);
                }
                GridView productHistory = p.GetHistoryScan(categoryProducts[productNamesDDL.Text]);
                int count = 0;
                foreach (GridViewRow row in productHistory.Rows)
                {

                    for (int i = 0; i < row.Cells.Count - 2; i++)
                    {
                        count += Convert.ToInt32(row.Cells[i].Text);
                    }
                    for (int i = 0; i < row.Cells.Count - 2; i++)
                    {
                        HtmlTableRow tr = new HtmlTableRow();
                        HtmlTableCell tc = new HtmlTableCell();
                        HtmlTableCell tc1 = new HtmlTableCell();
                        HtmlTableCell tc2 = new HtmlTableCell();
                        tc.InnerHtml = DateTime.Now.AddMonths(-i).Month.ToString() + "/" + DateTime.Now.AddMonths(-i).Year.ToString();
                        tc1.InnerHtml = row.Cells[i].Text;
                        int ss = Convert.ToInt32(row.Cells[i].Text);
                        tc2.InnerHtml = '%' + ((Convert.ToDouble(row.Cells[i].Text) / count) * 100).ToString();
                        tr.Controls.Add(tc);
                        tr.Controls.Add(tc1);
                        tr.Controls.Add(tc2);
                        prodyctHistoryStatistics.Controls.Add(tr);
                    }
                }
            }
            catch (Exception)
            {

                throw;
            }
        }
Ejemplo n.º 30
0
        private static HtmlTableCell CreateDDCell(string onclick)
        {
            HtmlTableCell tc = new HtmlTableCell();
            tc.Attributes.Add("class", "cellclass");
            tc.Attributes.Add("onmouseover", "TdOver(this)");
            tc.Attributes.Add("onmouseout", "TdOut(this)");
            tc.Attributes.Add("onclick", onclick);

            return tc;
        }
Ejemplo n.º 31
0
 public void AddSeparatorInternal()
 {
     HtmlTableCell cell = new HtmlTableCell();
     cell.Attributes.Add("class", "ibn-separator");
     cell.InnerText = "|";
     if (title == "")
         trMain.Cells.Insert(trMain.Cells.Count - 1, cell);
     else
         trMain.Cells.Insert(trMain.Cells.Count, cell);
 }
Ejemplo n.º 32
0
    protected void rptEntry_OnItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        Entry entry = (Entry)e.Item.DataItem;

        if (entry != null)
        {
            string Colspan = "5";
            Label  lbNo    = (Label)e.Item.FindControl("lbNo");
            if (lbNo != null)
            {
                lbNo.Text = counter.ToString();
            }
            Label lbSerialNo = (Label)e.Item.FindControl("lbSerialNo");
            System.Web.UI.HtmlControls.HtmlTableCell ThEntryID2 = (System.Web.UI.HtmlControls.HtmlTableCell)e.Item.FindControl("ThEntryID2");
            if (lbSerialNo != null)
            {
                if (string.IsNullOrEmpty(entry.Serial))
                {
                    ThEntryID1.Visible = false;
                    ThEntryID2.Visible = false;
                    Colspan            = "4";
                }

                lbSerialNo.Text = entry.Serial;
            }

            Tab1.Attributes.Add("colspan", Colspan);
            Tab2.Attributes.Add("colspan", Colspan);
            Tab3.Attributes.Add("colspan", Colspan);
            Tab4.Attributes.Add("colspan", Colspan);
            Label lbTitle = (Label)e.Item.FindControl("lbTitle");
            if (lbTitle != null)
            {
                lbTitle.Text = entry.Campaign;
            }
            Label lbBrand = (Label)e.Item.FindControl("lbBrand");
            if (lbBrand != null)
            {
                lbBrand.Text = entry.Brand;
            }
            Label lbCategory = (Label)e.Item.FindControl("lbCategory");
            if (lbCategory != null)
            {
                lbCategory.Text = Data.GetCategoryMarket(entry.CategoryMarket) + " <br> " + entry.CategoryPSDetail;
            }
            Label lbFees = (Label)e.Item.FindControl("lbFees");
            if (lbFees != null)
            {
                Registration reg    = Registration.GetRegistration(entry.RegistrationId);
                decimal      amount = GeneralFunction.CalculateEntryPrice(entry, reg);
                lbFees.Text = amount.ToString("N");
            }
            counter++;
        }
    }
Ejemplo n.º 33
0
    /// <summary>
    /// Used to bind repeter of RFQ Sent,Quotation Recieve and Attachment
    /// </summary>

    public void BindQuotationSummary()
    {
        try
        {
            TechnicalBAL objtechBAL = new TechnicalBAL();
            DataSet      dsReqSumm  = new DataSet();
            dsReqSumm = objtechBAL.GetRequQuotationSummary(Request.QueryString["REQUISITION_CODE"].ToString(), Request.QueryString["document_code"].ToString(), Request.QueryString["Vessel_Code"].ToString(), Request.QueryString["QUOTATION_CODE"].ToString());
            if (dsReqSumm.Tables[0].Rows.Count > 0)
            {
                lblCatalog.Text   = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["Catalog"]);
                lblReqNo.Text     = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["RequistionCode"]);
                lblTotalItem.Text = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["TotalItems"]);
                lblToDate.Text    = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["ToDate"]);
                lblVessel.Text    = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["VesselName"]);
                txtComments.Text  = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["ReqComents"]);

                //--File Attachements.
                rpAttachment.DataSource = dsReqSumm.Tables[1];
                rpAttachment.DataBind();

                //----Quotation Sent


                RepeaterRfqSent.DataSource = dsReqSumm.Tables[3];
                RepeaterRfqSent.DataBind();

                //----Quotation Received


                RepeaterQtnRcv.DataSource = dsReqSumm.Tables[2];
                RepeaterQtnRcv.DataBind();


                foreach (RepeaterItem item in RepeaterQtnRcv.Items)
                {
                    if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
                    {
                        System.Web.UI.HtmlControls.HtmlTableCell tdOrderLabel = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdOrderLabel");

                        tdOrderLabel.Visible = false;
                    }
                }



                ViewState["QuotationItemsDetails"] = true;
                ViewState["QuotationItemsDetails"] = dsReqSumm.Tables[4];
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
        private void CreateDimension(short AxisOrdinal, HtmlTable hostTable , Dimension dim)
        {
            HtmlTableRow tr=new HtmlTableRow();
            HtmlTableCell td;
            System.Web.UI.WebControls.Button btn;

            // --- node contr col--
            tr=new HtmlTableRow();
            td= new HtmlTableCell();
            td.Attributes.Add("class","sel_C1");
            td.NoWrap=true;
            tr.Cells.Add(td);

            // --- node name col--
            td= new HtmlTableCell();

            btn=new System.Web.UI.WebControls.Button();
            if(dim.IsOpen)
            {
                btn.ToolTip="Close";
                btn.ID="sel_dclose:"+ dim.UniqueName;
                btn.CssClass="sel_close";
            }
            else
            {
                btn.ToolTip="Open";
                btn.ID="sel_dopen:"+ dim.UniqueName;
                btn.CssClass="sel_open";
            }
            td.Controls.Add(btn);

            Literal lit=new Literal();
            lit.Text=dim.Name;
            td.Controls.Add(lit);
            td.Attributes.Add("class","sel_C");
            td.NoWrap=true;
            tr.Cells.Add(td);

            // --- node select col--
            td= new HtmlTableCell();
            td.Attributes.Add("class","sel_C");
            td.NoWrap=true;
            tr.Cells.Add(td);

            hostTable.Rows.Add(tr);

            if(dim.IsOpen==false)
                return;

            // members level depth=0
            for(int j=0;j<dim.Hierarchies.Count;j++)
                if(dim.Hierarchies[j].Axis.Ordinal==AxisOrdinal) // only if axis matches
                    CreateHierarchy(AxisOrdinal, hostTable, dim.Hierarchies[j],  1); //treedepth is 1 because 0 is dim
        }
Ejemplo n.º 35
0
 private DateTime CreateWeekNumberCell(DateTime idxDate, HTML.HtmlTableRow row)
 {
     // Creating week number cell
     // Calculates according to ISO-8601
     HTML.HtmlTableCell week = new HTML.HtmlTableCell();
     week.EnableViewState = false;
     week.Attributes.Add("class", "weekno");
     week.InnerHtml = GetWeekNumber(idxDate).ToString();
     row.Cells.Add(week);
     return(idxDate);
 }
Ejemplo n.º 36
0
        // carrega a página
        public Boolean loadPage(HtmlTable table, Boolean showEdit, Boolean showFirst, Boolean zebra, String editText, String editFunc)
        {
            // classe mãe
            if (!base.loadPage()){
                return false;
            }
            else
            {
                CDataBase db = new CDataBase();
                HtmlTableRow row;
                HtmlTableCell cell;

                CQuery query = db.select(this._isqlload, this._fields);

                if (query == null)
                    return false;

                int initRow = table.Rows.Count;

                for (int i = 0; i < query.Count(); i++)
                {

                    row = new HtmlTableRow();

                    for (int j = (showFirst ? 0 : 1); j < query.Row(i).Count(); j++)
                    {

                        cell = new HtmlTableCell();
                        cell.InnerHtml = query.Field(i, j);

                        row.Cells.Add(cell);
                    }

                    if (showEdit)
                    {
                        cell = new HtmlTableCell();
                        cell.InnerHtml = "<a href=\"#\" onclick=\"" + mountFunction(editFunc, query.Row(i)) + "\"" +
                            " onmouseenter=\"javascript:document.getElementById('" + table.ID + "').rows[" + (int)(i + initRow) + "].style.color = 'EB151C';\"" +
                            " onmouseleave=\"javascript:document.getElementById('" + table.ID + "').rows[" + (int)(i + initRow) + "].style.color = '';\"" +
                            ">" + editText + "</a>";
                        row.Cells.Add(cell);
                    }

                    if (i % 2 == 1 && zebra)
                        row.Style.Add("background-color", "Gainsboro");

                    table.Rows.Add(row);

                }

                return true;
            }
        }
Ejemplo n.º 37
0
    protected void DataList3_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        //一传二
        HyperLink hy     = (HyperLink)e.Item.FindControl("HyperLink1");
        Label     AssId  = (Label )e.Item.FindControl("AssIdLabel");
        Label     ItemId = (Label)DataListKey.Items[0].FindControl("Label2");

        if (hy != null)
        {
            hy.NavigateUrl = "./ass-content.aspx?AssId=" + AssId.Text + "&ItemId=" + ItemId.Text;
        }
        //重要标红
        Label IPL = (Label)e.Item.FindControl("IsImportantLabel");

        System.Web.UI.HtmlControls.HtmlTableCell IPT = (System.Web.UI.HtmlControls.HtmlTableCell)e.Item.FindControl("isimportent");
        if (IPL.Text == "True")
        {
            IPL.Text    = "重要";
            IPT.BgColor = "red";
        }
        else
        {
            IPL.Visible = false;
        }
        DataAccess da   = new DataAccess();
        string     sqls = "select IsFinish from Assignment where AssId='" + AssId.Text + "'";
        DataSet    ds   = da.dataSet(sqls);

        if (ds.Tables[0].Rows[0]["IsFinish"].ToString() == "True")
        {
            IPT.BgColor = "gray";
        }

        /*    if (DataList2.Items.Count > 0)
         *  {
         *      if (DataList2.Items[0].FindControl("DataList3") != null)
         *      {
         *          DataList dl3 = (DataList)DataList2.Items[0].FindControl("DataList3");
         *          if (dl3.Items.Count > 0)
         *          {
         *              HyperLink hy = (HyperLink)dl3.Items[0].FindControl("HyperLink1");
         *              hy.NavigateUrl = "./ass-content.aspx?ItemId&ccc";
         *          }
         *      }
         *  }
         * */
    }
Ejemplo n.º 38
0
    private void addNewRow()
    {
        System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow();
        TextBox tb1 = new TextBox();

        tb1.Height = 30;
        tb1.ID     = "box" + (5 * itemList.Rows.Count + 1);//一定要保证ID的唯一性,这样每次增加才能保留原来的值
        System.Web.UI.HtmlControls.HtmlTableCell name = new System.Web.UI.HtmlControls.HtmlTableCell();
        name.Controls.Add(tb1);
        row.Cells.Add(name);

        System.Web.UI.HtmlControls.HtmlTableCell version = new System.Web.UI.HtmlControls.HtmlTableCell();
        TextBox tb2 = new TextBox();

        tb2.Height = 30;
        tb2.ID     = "box" + (5 * itemList.Rows.Count + 2);
        version.Controls.Add(tb2);
        row.Cells.Add(version);

        System.Web.UI.HtmlControls.HtmlTableCell price = new System.Web.UI.HtmlControls.HtmlTableCell();
        TextBox tb4 = new TextBox();

        tb4.Height = 30;
        tb4.ID     = "box" + (5 * itemList.Rows.Count + 3);
        price.Controls.Add(tb4);
        row.Cells.Add(price);

        System.Web.UI.HtmlControls.HtmlTableCell count = new System.Web.UI.HtmlControls.HtmlTableCell();
        TextBox tb3 = new TextBox();

        tb3.Height = 30;
        tb3.ID     = "box" + (5 * itemList.Rows.Count + 4);
        count.Controls.Add(tb3);
        row.Cells.Add(count);

        System.Web.UI.HtmlControls.HtmlTableCell allExpense = new System.Web.UI.HtmlControls.HtmlTableCell();
        TextBox tb5 = new TextBox();

        tb5.Height = 30;
        tb5.ID     = "box" + (5 * itemList.Rows.Count + 5);
        allExpense.Controls.Add(tb5);
        row.Cells.Add(allExpense);


        itemList.Rows.Add(row);
    }
Ejemplo n.º 39
0
    private void addNewRow()
    {
        System.Web.UI.HtmlControls.HtmlTableRow row = new System.Web.UI.HtmlControls.HtmlTableRow();

        DropDownList db1 = new DropDownList();

        db1.Height = 30;
        db1.Items.Add("设计费");
        db1.Items.Add("专用费");
        db1.Items.Add("材料费");
        db1.Items.Add("外协费");
        db1.Items.Add("燃料动力费");
        db1.Items.Add("固定资产使用费");
        db1.Items.Add("工资费");
        db1.Items.Add("劳务费");
        db1.Items.Add("差旅费");
        db1.Items.Add("会议费");
        db1.Items.Add("事务费");
        db1.Items.Add("专家咨询费");
        db1.Items.Add("管理费");
        db1.Items.Add("不可预见费");
        db1.ID = "box" + (3 * itemList.Rows.Count + 1);//一定要保证ID的唯一性,这样每次增加才能保留原来的值
        System.Web.UI.HtmlControls.HtmlTableCell itemType = new System.Web.UI.HtmlControls.HtmlTableCell();
        itemType.Controls.Add(db1);
        row.Cells.Add(itemType);

        System.Web.UI.HtmlControls.HtmlTableCell itemDetail = new System.Web.UI.HtmlControls.HtmlTableCell();
        TextBox tb2 = new TextBox();

        tb2.Height = 30;
        tb2.ID     = "box" + (3 * itemList.Rows.Count + 2);
        itemDetail.Controls.Add(tb2);
        row.Cells.Add(itemDetail);

        System.Web.UI.HtmlControls.HtmlTableCell budget = new System.Web.UI.HtmlControls.HtmlTableCell();
        TextBox tb3 = new TextBox();

        tb3.Height = 30;
        tb3.ID     = "box" + (3 * itemList.Rows.Count + 3);
        budget.Controls.Add(tb3);
        row.Cells.Add(budget);


        itemList.Rows.Add(row);
    }
Ejemplo n.º 40
0
    protected void rep_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        #region//this block will fill the disply order drop down

        if (e.Item.ItemType.ToString().ToLower() == "item" || e.Item.ItemType.ToString().ToLower() == "alternatingitem")
        {
            System.Web.UI.HtmlControls.HtmlTableCell td_Sorting = (System.Web.UI.HtmlControls.HtmlTableCell)e.Item.FindControl("td_Sorting");
            if (td_Sorting != null && ddl_Category.SelectedValue.ToString() == "")
            {
                td_Sorting.Visible = false;
            }
            DropDownList ddl      = (DropDownList)e.Item.FindControl("ddlDisplayOrder");
            HiddenField  hdnProId = (HiddenField)e.Item.FindControl("hfNewsId");
            HiddenField  hdnDisId = (HiddenField)e.Item.FindControl("hdnDisId");
            FillingDisplyOrder(ddl, hdnProId.Value, hdnDisId, e.Item.ItemIndex + 1);
        }
        #endregion
    }
Ejemplo n.º 41
0
        private void RenderTableBody(HtmlTextWriter writer)
        {
            //生成表体标记(开始)
            writer.RenderBeginTag(HtmlTextWriterTag.Tbody);

            if (Utility.IsEmptyCollection(this.DataSource))
            {
                if (_emptyTemplate != null)
                {
                    var tr = new System.Web.UI.HtmlControls.HtmlTableRow();
                    var td = new System.Web.UI.HtmlControls.HtmlTableCell()
                    {
                        ColSpan = this.Columns.Count,
                    };

                    tr.Controls.Add(td);
                    _emptyTemplate.InstantiateIn(td);
                    tr.RenderControl(writer);
                }
            }
            else
            {
                IEnumerable dataSource = this.DataSource as IEnumerable;

                if (dataSource == null)
                {
                    this.GenerateRow(writer, this.DataSource, 1);
                }
                else
                {
                    int index = 0;
                    foreach (var dataItem in dataSource)
                    {
                        FormExtension.PushDataItem(this.Page, dataItem, index);
                        this.GenerateRow(writer, dataItem, index++);
                        FormExtension.PopDataItem(this.Page);
                    }
                }
            }

            //生成表体标记(结束)
            writer.RenderEndTag();
        }
Ejemplo n.º 42
0
        private static DateTime CreateWeekDaysAtTop(DateTime idxDate, HTML.HtmlTable tbl)
        {
            HTML.HtmlTableRow rowDays = new HTML.HtmlTableRow();
            rowDays.EnableViewState = false;
            rowDays.Cells.Add(new HTML.HtmlTableCell());
            rowDays.Attributes.Add("class", "weekdays");
            DateTime idxWeekDay = idxDate;

            for (int idx = 0; idx < 7; idx++)
            {
                HTML.HtmlTableCell cell = new HTML.HtmlTableCell();
                cell.EnableViewState = false;
                cell.InnerHtml       = idxWeekDay.ToString("ddd", System.Threading.Thread.CurrentThread.CurrentUICulture);
                rowDays.Cells.Add(cell);
                idxWeekDay = idxWeekDay.AddDays(1);
            }
            tbl.Rows.Add(rowDays);
            return(idxDate);
        }
Ejemplo n.º 43
0
        private void CreateTodayButton(HTML.HtmlTable tbl)
        {
            HTML.HtmlTableRow bottomRow = new HTML.HtmlTableRow();
            bottomRow.EnableViewState = false;
            bottomRow.ID = "stat_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);
            HTML.HtmlTableCell bottomCell = new HTML.HtmlTableCell();
            bottomCell.EnableViewState     = false;
            bottomCell.Style["text-align"] = "center";
            bottomCell.ID      = "bottC_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);
            bottomCell.ColSpan = 8;
            LinkButton today = new LinkButton();

            today.ID              = "todayBtn";
            today.Text            = "Today";
            today.Click          += new EventHandler(today_Click);
            today.EnableViewState = false;
            bottomCell.Controls.Add(today);
            bottomRow.Cells.Add(bottomCell);
            tbl.Rows.Add(bottomRow);
        }
Ejemplo n.º 44
0
        private void CreateMonthPicker(HTML.HtmlTableCell headerCell)
        {
            SelectList month = new SelectList();

            month.EnableViewState = false;
            month.ID = "month_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);
            for (int idxMonth = 1; idxMonth < 13; idxMonth++)
            {
                ListItem idxItem = new ListItem();
                idxItem.Text  = new DateTime(Value.Year, idxMonth, 1).ToString("MMM", System.Threading.Thread.CurrentThread.CurrentUICulture);
                idxItem.Value = idxMonth.ToString();
                if (idxMonth == Value.Month)
                {
                    month.SelectedItem = idxItem;
                }
                month.Items.Add(idxItem);
            }
            month.SelectedIndexChanged += new EventHandler(month_SelectedIndexChanged);
            headerCell.Controls.Add(month);
        }
Ejemplo n.º 45
0
        private void CreateYearPicker(HTML.HtmlTableCell headerCell)
        {
            SelectList year = new SelectList();

            year.EnableViewState = false;
            year.ID = "year_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);
            for (int idxYear = Value.Year - 25; idxYear < Value.Year + 25; idxYear++)
            {
                ListItem idxItem = new ListItem();
                idxItem.Text  = idxYear.ToString();
                idxItem.Value = idxYear.ToString();
                if (idxYear == Value.Year)
                {
                    year.SelectedItem = idxItem;
                }
                year.Items.Add(idxItem);
            }
            year.SelectedIndexChanged += new EventHandler(year_SelectedIndexChanged);
            headerCell.Controls.Add(year);
        }
Ejemplo n.º 46
0
    private void fillOpinion(string kgNum)
    {
        Dictionary <string, object> data = new Dictionary <string, object>();

        data.Add("kgID", kgNum);

        System.Data.DataTable dt = DBConnection.runProcWithResults("getAllKgOpinions", data);
        foreach (System.Data.DataRow item in dt.Rows)
        {
            System.Web.UI.HtmlControls.HtmlTableRow tr = new System.Web.UI.HtmlControls.HtmlTableRow();
            tr.Attributes.Add("class", int.Parse(item["grade"].ToString()) > 5 ? "success" : "danger");
            System.Web.UI.HtmlControls.HtmlTableCell tc = new System.Web.UI.HtmlControls.HtmlTableCell();
            tc.InnerText = item["talk"].ToString();
            tr.Controls.Add(tc);
            System.Web.UI.HtmlControls.HtmlTableCell tc1 = new System.Web.UI.HtmlControls.HtmlTableCell();
            tc1.InnerText = item["grade"].ToString();
            tr.Controls.Add(tc1);
            opinionTable.Rows.Add(tr);
        }
    }
Ejemplo n.º 47
0
        private void CreateYearMonthPicker(HTML.HtmlTable tbl)
        {
            // Creating header row (with month and year picker)
            HTML.HtmlTableRow headerRow = new HTML.HtmlTableRow();
            headerRow.EnableViewState = false;
            headerRow.ID = "head_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);
            HTML.HtmlTableCell headerCell = new HTML.HtmlTableCell();
            headerCell.EnableViewState     = false;
            headerCell.Style["text-align"] = "center";
            headerCell.ID      = "headC_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);
            headerCell.ColSpan = 8;

            // Year SelectList
            CreateYearPicker(headerCell);

            // Month SelectList
            CreateMonthPicker(headerCell);

            headerRow.Cells.Add(headerCell);
            tbl.Rows.Add(headerRow);
        }
Ejemplo n.º 48
0
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Xml.Linq.XElement xeErrors = null;
        xeErrors = commonVariables.ErrorsXML;

        #region Logout
        if (string.Compare(Convert.ToString(this.RouteData.DataTokens["logout"]), "true", true) == 0)
        {
            commonVariables.ClearSessionVariables(); commonCookie.ClearCookies();
        }
        if (string.Compare(Convert.ToString(this.RouteData.DataTokens["expire"]), "true", true) == 0)
        {
            commonVariables.ClearSessionVariables(); commonCookie.ClearCookies(); txtMessage.InnerHtml = commonCulture.ElementValues.getResourceString("SessionExpired", xeErrors).Replace("\\n", "<br />");
        }
        if (string.Compare(Convert.ToString(this.RouteData.DataTokens["invalid"]), "true", true) == 0)
        {
            commonVariables.ClearSessionVariables(); commonCookie.ClearCookies(); txtMessage.InnerHtml = commonCulture.ElementValues.getResourceString("SessionExpired", xeErrors).Replace("\\n", "<br />");
        }
        #endregion

        if (!Page.IsPostBack)
        {
            customConfig.OperatorSettings opSettings = new customConfig.OperatorSettings("W88");
            string        arrStrLanguageSelection    = opSettings.Values.Get("LanguageSelection");
            List <string> lstLanguageSelection       = arrStrLanguageSelection.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries).Select(p => p.Trim()).ToList();

            foreach (string language in lstLanguageSelection)
            {
                System.Web.UI.HtmlControls.HtmlTableRow  trRow  = new System.Web.UI.HtmlControls.HtmlTableRow();
                System.Web.UI.HtmlControls.HtmlTableCell tdCell = new System.Web.UI.HtmlControls.HtmlTableCell();

                tdCell.InnerHtml = string.Format("<a href='/_Secure/Login?lang={0}'>{0}</a>", language.Trim());
                trRow.Cells.Add(tdCell);
                tblLanguage.Rows.Add(trRow);
            }
        }
    }
Ejemplo n.º 49
0
    private void fillActivityInfo(int rowNum)
    {
        if (act.Rows.Count != 0)
        {
            //fill activity card
            tbActID.Text         = act.Rows[rowNum]["ID"].ToString();
            tbActName.Text       = act.Rows[rowNum]["name"].ToString();
            tbOperLastName.Text  = act.Rows[rowNum]["surName"].ToString();
            tbOperFirstName.Text = act.Rows[rowNum]["firstName"].ToString();
            tbDayInWeek.Text     = act.Rows[rowNum]["dayInWeek"].ToString();
            tbstartTime.Text     = act.Rows[rowNum]["startTime"].ToString();
            tbEndTime.Text       = act.Rows[rowNum]["endTime"].ToString();
            tbCost.Text          = act.Rows[rowNum]["cost"].ToString();

            //fill charts card


            //fill opinions card
            Dictionary <string, object> data = new Dictionary <string, object>();
            data.Add("activityID", tbActID.Text);

            System.Data.DataTable dt = DBConnection.runProcWithResults("getAllActivityOpinions", data);
            foreach (System.Data.DataRow item in dt.Rows)
            {
                System.Web.UI.HtmlControls.HtmlTableRow tr = new System.Web.UI.HtmlControls.HtmlTableRow();
                tr.Attributes.Add("class", int.Parse(item["grade"].ToString()) > 5 ? "success" : "danger");
                System.Web.UI.HtmlControls.HtmlTableCell tc = new System.Web.UI.HtmlControls.HtmlTableCell();
                tc.InnerText = item["talk"].ToString();
                tr.Controls.Add(tc);
                System.Web.UI.HtmlControls.HtmlTableCell tc1 = new System.Web.UI.HtmlControls.HtmlTableCell();
                tc1.InnerText = item["grade"].ToString();
                tr.Controls.Add(tc1);
                opinionTable.Rows.Add(tr);
            }
        }
    }
Ejemplo n.º 50
0
        private void CreateCalendarControls()
        {
            // Finding date to start on
            DateTime idxDate = FindStartDate();

            // Creating table to wrap the whole thing inside of
            HTML.HtmlTable tbl = new HTML.HtmlTable();
            tbl.EnableViewState = false;
            tbl.ID = "tbl_" + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);

            // Creating the header row which contains the Year and Month DropDownLists
            CreateYearMonthPicker(tbl);

            // Creating Weekdays at top of calendar
            idxDate = CreateWeekDaysAtTop(idxDate, tbl);

            // Looping through creating childcontrols
            while (true)
            {
                HTML.HtmlTableRow row = new HTML.HtmlTableRow();
                row.EnableViewState = false;
                row.ID = idxDate.ToString("MM_dd", System.Globalization.CultureInfo.InvariantCulture) + Value.ToString("dd_MM_yyyy", System.Globalization.CultureInfo.InvariantCulture);

                idxDate = CreateWeekNumberCell(idxDate, row);

                // Creating week cells for actual dates...
                for (int idx = 0; idx < 7; idx++)
                {
                    idxDate = CreateOneDayCell(idxDate, row);
                }
                tbl.Rows.Add(row);
                if (idxDate.Month != Value.Month)
                {
                    break;
                }
            }

            // Creating "extra controls" to append at bottom
            if (CreateFooterControls != null)
            {
                CreateFooterControlsEventArgs evt = new CreateFooterControlsEventArgs();
                CreateFooterControls(this, evt);
                int idxNo = 0;
                foreach (ASP.Control idx in evt.Controls)
                {
                    HTML.HtmlTableRow row = new HTML.HtmlTableRow();
                    row.ID = "extraRow" + idxNo;
                    HTML.HtmlTableCell cell = new HTML.HtmlTableCell();
                    cell.ID      = "extraCell" + idxNo;
                    cell.ColSpan = 8;
                    cell.Controls.Add(idx);
                    row.Cells.Add(cell);
                    tbl.Rows.Add(row);
                    idxNo += 1;
                }
            }

            // Today button...
            CreateTodayButton(tbl);

            // Rooting the Table as the LAST thing we do...!
            _content.Controls.Add(tbl);
        }
Ejemplo n.º 51
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString.HasKeys())
        {
            string numTemplates = Request.QueryString["HD_NumberTemplates"];
            // Get the number of templates that remain to be uploaded.
            int.TryParse(numTemplates, out RemainingTemplates);

            // If this is the first time at the page, the number of remaining templates is the same as the total number of templates.
            if (string.IsNullOrEmpty(TotalTemplateCount.Value))
            {
                TotalTemplateCount.Value = RemainingTemplates.ToString();
                SuccessfulUploadItems.Clear();
                ConflictUploadItems.Clear();
                CanceledUploadItems.Clear();
            }
            TotalNumTemplates = int.Parse(TotalTemplateCount.Value);
        }

        UpdatePanelVisibility();

        if (RemainingTemplates > 0)
        {
            UploadedTemplatesGrid.Rows.Clear();


            for (int i = 0; i < GridSize; i++)
            {
                System.Web.UI.HtmlControls.HtmlTableRow  tr = new System.Web.UI.HtmlControls.HtmlTableRow();
                System.Web.UI.HtmlControls.HtmlTableCell tc;

                // Template Title
                tc       = new System.Web.UI.HtmlControls.HtmlTableCell();
                tc.Width = "30%";
                TextBox templateTitle = new TextBox();
                templateTitle.ID       = string.Format("HD_Template_Title{0}", i.ToString());
                templateTitle.Rows     = 3;
                templateTitle.TextMode = TextBoxMode.MultiLine;
                tc.Controls.Add(templateTitle);
                tr.Controls.Add(tc);

                // Template Description
                tc       = new System.Web.UI.HtmlControls.HtmlTableCell();
                tc.Width = "70%";
                TextBox templateDescription = new TextBox();
                templateDescription.ID       = string.Format("HD_Template_Description{0}", i.ToString());
                templateDescription.Rows     = 3;
                templateDescription.TextMode = TextBoxMode.MultiLine;
                tc.Controls.Add(templateDescription);
                tr.Controls.Add(tc);

                // Hidden controls
                tc = new System.Web.UI.HtmlControls.HtmlTableCell();
                tc.Style.Add("display", "none");

                // The upload item type can be a template, a file, or a URL. This field is utilized by HotDocs 11 (and later). The
                // Upload plugin for HotDocs 10 does not set this field.
                HiddenField uploadItemType = new HiddenField();
                uploadItemType.ID = "HD_Template_UploadItemType" + i;
                tc.Controls.Add(uploadItemType);

                // Main Template File Name
                HiddenField templateMain = new HiddenField();
                templateMain.ID = "HD_Template_FileName" + i;
                tc.Controls.Add(templateMain);

                HiddenField libraryPath = new HiddenField();
                libraryPath.ID = "HD_Template_Library_Path" + i;
                tc.Controls.Add(libraryPath);

                HiddenField expirationDate = new HiddenField();
                expirationDate.ID = "HD_Template_Expiration_Date" + i;
                tc.Controls.Add(expirationDate);

                HiddenField expirationWarningDays = new HiddenField();
                expirationWarningDays.ID = "HD_Template_Warning_Days" + i;
                tc.Controls.Add(expirationWarningDays);

                HiddenField expirationExtensionDays = new HiddenField();
                expirationExtensionDays.ID = "HD_Template_Extension_Days" + i;
                tc.Controls.Add(expirationExtensionDays);

                HiddenField commandLineSwitches = new HiddenField();
                commandLineSwitches.ID = "HD_Template_CommandLineSwitches" + i;
                tc.Controls.Add(commandLineSwitches);

                // Template package file upload control
                FileUpload ulCtrl = new FileUpload();
                ulCtrl.ID = string.Format("HD_Upload{0}", i.ToString());
                tc.Controls.Add(ulCtrl);

                // Template manifest file upload control
                FileUpload ulPackageManifestXML = new FileUpload();
                ulPackageManifestXML.ID = string.Format("HD_Package_Manifest{0}", i.ToString());
                tc.Controls.Add(ulPackageManifestXML);

                tr.Controls.Add(tc);

                UploadedTemplatesGrid.Rows.Add(tr);
            }

            if (GridSize > 1)
            {
                submitBtn.Text = string.Format("Upload Templates {0}-{1} of {2}", (TotalNumTemplates - RemainingTemplates) + 1, GridSize, TotalNumTemplates);
            }
            else
            {
                submitBtn.Text = string.Format("Upload Template {0} of {1}", (TotalNumTemplates - RemainingTemplates) + 1, TotalNumTemplates);
            }
        }

        if (Request.Files.Count > 0)
        {
            int templateIndex = 0;
            int fileIndex     = 0;
            while (fileIndex < Request.Files.Count)
            {
                HttpPostedFile postedFile = Request.Files[fileIndex];

                if (postedFile.ContentLength > 0 && !string.IsNullOrEmpty(postedFile.FileName))
                {
                    FileInfo finfo = new FileInfo(postedFile.FileName);
                    if (finfo.Extension.ToLower() != ".xml")
                    {
                        string ext          = Path.GetExtension(postedFile.FileName).ToLower();
                        string baseFileName = Path.GetFileNameWithoutExtension(postedFile.FileName);
                        // note: there are three possibilities here:
                        // 1) The fileName is a template package, formatted <guid>.pkg
                        // 2) The fileName is a url, formatted <guid>.url
                        // 3) The filename is a raw file, formatted with the a non-guid base file name and extension:
                        // Note: Here in this sample portal we ignore 2) and 3) because we are only concerned
                        // with uploading templates:
                        if (!IsGuid(baseFileName) || ext == ".url")
                        {
                            return;
                        }
                        string packageID   = baseFileName;
                        string packagePath = PackageCache.GetLocalPackagePath(packageID);
                        if (!string.IsNullOrEmpty(packageID))
                        {
                            FileStream fs = File.OpenWrite(packagePath);
                            postedFile.InputStream.CopyTo(fs);
                            fs.Close();

                            UploadItem infoItem = new UploadItem
                            {
                                Title                = Request.Form["HD_Template_Title" + templateIndex],
                                Description          = Request.Form["HD_Template_Description" + templateIndex],
                                MainTemplateFileName = Request.Form["HD_Template_FileName" + templateIndex],

                                /// LibraryPath is an optional field that is intended to give this portal an indication
                                /// of where the current template was stored in the user's HotDocs library on the desktop.
                                /// This Sample Portal application does not save this value, and it is included
                                /// here as sample code.
                                LibraryPath = Request.Form["HD_Library_Path" + templateIndex],

                                /// CommandLineSwitches is an optional field that contains any command line parameters
                                /// that were used for the current template with the desktop HotDocs software. This
                                /// Sample Portal application does not save this value, and it is included here
                                /// as sample code because these command line parameters may be of use.
                                CommandLineSwitches = Request.Form["HD_Template_CommandLineSwitches" + templateIndex],

                                /// ItemType can be an HD11+ template, a file, or a URL. HotDocs 11 (and later)
                                /// sets this field, and HotDocs 10 does not set this field.  The current
                                /// Asp.Net web app could distinguish between HotDocs 11 templates and HotDocs 10
                                /// templates by examining this field to be non-empty for HotDocs 11 and empty
                                /// for HotDocs 10. This Sample Portal application does not save this value,
                                /// and it is included here as sample code.
                                ItemType = Request.Form["HD_Template_UploadItemType" + templateIndex],

                                /// ExpirationDate is an optional field that gives publishers the option of specifying
                                /// a date when the current template will expire. This Sample Portal application
                                /// does not save this value, and it is included here as sample code.
                                ExpirationDate = Request.Form["HD_Template_Expiration_Date" + templateIndex],

                                /// ExpirationWarningDays is an optional field used in conjunction with ExpirationDate
                                /// that allows the user to be warned that the current template will expire the given
                                /// number of days before the expireation date. This Sample Portal application
                                /// does not save this value, and it is included here as sample code.
                                ExpirationWarningDays = Request.Form["HD_Template_Warning_Days" + templateIndex],

                                /// ExpirationExtensionDays is an optional field used in conjunction with ExpirationDate
                                /// that allows the user to continue using the current template after the given
                                /// expiration date has passed. This Sample Portal application does not save this
                                /// value, and it is included here as sample code.
                                ExpirationExtensionDays = Request.Form["HD_Template_Extension_Days" + templateIndex],
                                PackageID    = packageID,
                                FullFilePath = packagePath
                            };

                            using (SamplePortal.Data.Templates templates = new SamplePortal.Data.Templates())
                            {
                                if (templates.TemplateExists(infoItem.MainTemplateFileName, infoItem.Title))
                                {
                                    ConflictUploadItems.Add(infoItem);
                                }
                                else
                                {
                                    templates.InsertNewTemplate(infoItem);
                                    SuccessfulUploadItems.Add(infoItem);
                                }
                            }
                        }
                        templateIndex++;
                    }
                    else
                    {
                        string     filename = Path.Combine(Settings.TemplatePath, finfo.Name);
                        FileStream fs       = File.OpenWrite(filename);
                        postedFile.InputStream.CopyTo(fs);
                        fs.Close();
                    }
                    fileIndex++;
                }
                else
                {
                    panelHDError.Visible = true;
                    break;
                }
            }
            UpdatePanelVisibility();
        }
    }
Ejemplo n.º 52
0
    /// <summary>
    /// Export To PDF All Quotation Summary
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>

    protected void btnExporttoPDF_Click(object sender, EventArgs e)
    {
        try
        {
            lblRFQSent.Visible = true;
            lblRD.Visible      = true;

            lblQRF.Visible = true;

            lblQD.Visible = true;

            lblID.Visible = true;
            lblAF.Visible = true;


            System.Web.UI.HtmlControls.HtmlTableCell thViewQuotationSent = (System.Web.UI.HtmlControls.HtmlTableCell)RepeaterRfqSent.Controls[0].Controls[0].FindControl("thViewQuotationSent");
            thViewQuotationSent.Visible = false;


            System.Web.UI.HtmlControls.HtmlTableCell thViewQuotation = (System.Web.UI.HtmlControls.HtmlTableCell)RepeaterQtnRcv.Controls[0].Controls[0].FindControl("thViewQuotation");
            thViewQuotation.Visible = false;

            foreach (RepeaterItem item in RepeaterQtnRcv.Items)
            {
                if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
                {
                    System.Web.UI.HtmlControls.HtmlTableCell tdViewQuotation = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdViewQuotation");
                    ImageButton BtnViewQtnRFQ = (ImageButton)item.FindControl("imgBtnViewQtnRFQ");
                    BtnViewQtnRFQ.Visible = tdViewQuotation.Visible = false;
                }
            }

            foreach (RepeaterItem item in RepeaterRfqSent.Items)
            {
                if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
                {
                    System.Web.UI.HtmlControls.HtmlTableCell tdViewQuotationSent = (System.Web.UI.HtmlControls.HtmlTableCell)item.FindControl("tdViewQuotationSent");
                    ImageButton imgViewQuotationSent = (ImageButton)item.FindControl("imgViewQuotationSent");
                    imgViewQuotationSent.Visible = tdViewQuotationSent.Visible = false;
                }
            }


            btnExporttoPDF.Visible = false;



            EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(17.0f, 17.69f);
            PdfDocument doc = new PdfDocument();



            EO.Pdf.Runtime.AddLicense("p+R2mbbA3bNoqbTC4KFZ7ekDHuio5cGz4aFZpsKetZ9Zl6TNHuig5eUFIPGe" +
                                      "tcznH+du5PflEuCG49jjIfewwO/o9dB2tMDAHuig5eUFIPGetZGb566l4Of2" +
                                      "GfKetZGbdePt9BDtrNzCnrWfWZekzRfonNzyBBDInbW6yuCwb6y9xtyxdabw" +
                                      "+g7kp+rp2g+9RoGkscufdePt9BDtrNzpz+eupeDn9hnyntzCnrWfWZekzQzr" +
                                      "peb7z7iJWZekscufWZfA8g/jWev9ARC8W7zTv/vjn5mkBxDxrODz/+ihb6W0" +
                                      "s8uud4SOscufWbOz8hfrqO7CnrWfWZekzRrxndz22hnlqJfo8h8=");
            EO.Pdf.HtmlToPdf.Options.HeaderHtmlFormat  = "<div style='text-align:top; font-family:Tahoma; font-size:10px;'></div>";
            EO.Pdf.HtmlToPdf.Options.VisibleElementIds = "divMain";
            HtmlToPdf.Options.AutoFitX = HtmlToPdfAutoFitMode.ScaleToFit;

            ASPXToPDF1.RenderAsPDF("QuotationSummary.pdf");
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
Ejemplo n.º 53
0
 internal RenderDayEventArgs(DateTime date, HTML.HtmlTableCell cell)
 {
     _date = date;
     _cell = cell;
 }
Ejemplo n.º 54
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.menu_home.Attributes["linkurl"]    = this.ResolveUrl("~/");
            this.menu_addlink.Attributes["linkurl"] = this.ResolveUrl("~/") + "Portal/AddFavorite.aspx?linkurl=" + this.Request.Path;
            this.menu_profile.Attributes["linkurl"] = this.ResolveUrl("~/") + "Security/MyProfile.aspx";
            try
            {
                string hp = Server.MapPath(this.ResolveUrl("~/") + "portal/default.aspx");
                this.menu_home.Attributes["linkurl"] = this.ResolveUrl("~/") + "portal/default.aspx";
                this.menu_news.Attributes["linkurl"] = this.ResolveUrl("~/") + "portal/mynews.aspx";
            }
            catch
            {
            }
            SmoothEnterprise.Web.User user = new SmoothEnterprise.Web.User();
            if (user.IsLogin)
            {
                this.menu_loginout.InnerHtml = "&nbsp;&nbsp;&nbsp;" + this.GetLocalResourceObject("LABEL_logout");

                this.menu_loginout.Attributes["linkurl"] = this.ResolveUrl("~/") + "security/logout.aspx?target=" + this.ResolveUrl("~/");
                this.menu_home.Attributes["submenu"]     = this.menu_mylinks.ClientID;

                SmoothEnterprise.Database.DataSet ds = new SmoothEnterprise.Database.DataSet();
                ds.Open("SELECT * FROM dgfavorite WHERE uid='" + user.ID + "' ORDER BY seq");
                while (!ds.EOF)
                {
                    System.Web.UI.HtmlControls.HtmlTableRow  menurow  = new System.Web.UI.HtmlControls.HtmlTableRow();
                    System.Web.UI.HtmlControls.HtmlTableCell menucell = new System.Web.UI.HtmlControls.HtmlTableCell();
                    menurow.Cells.Add(menucell);
                    menucell = new System.Web.UI.HtmlControls.HtmlTableCell();
                    menucell.Attributes["Class"]   = "MenuItem";
                    menucell.Attributes["Height"]  = "20";
                    menucell.Attributes["LinkUrl"] = ds["linkurl"].ToString();
                    //menucell.Attributes["NOWRAP"] = "NOWRAP";
                    menucell.InnerText = ds["description"].ToString();
                    menurow.Cells.Add(menucell);
                    menu_definedlinks.Rows.Add(menurow);
                    ds.MoveNext();
                }
            }
            else
            {
                this.menu_loginout.InnerHtml             = "&nbsp;&nbsp;&nbsp;" + this.GetLocalResourceObject("LABEL_login");
                this.menu_loginout.Attributes["linkurl"] = this.ResolveUrl("~/") + "security/login.aspx?target=/";
            }
            try
            {
                string hp          = Server.MapPath(this.ResolveUrl("~/") + "manager/sendquestion.aspx");
                string questionurl = this.ResolveUrl("~/") + "manager/sendquestion.aspx?url=" + Request.Url.LocalPath;
                if (Request.Url.Query != "")
                {
                    questionurl = questionurl + "&query=" + Request.Url.Query.Substring(1);
                }
                if ((Request.Url.LocalPath.ToLower() == this.ResolveUrl("~/security/login.aspx").ToLower()) || (Request.Url.LocalPath.ToLower() == this.ResolveUrl("~/manager/sendquestion.aspx")))
                {
                    questionurl = this.ResolveUrl("~/manager/sendquestion.aspx");
                }
                this.menu_sendquestion.Attributes["linkurl"] = questionurl;
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            try
            {
                SmoothEnterprise.Utility.Registry Key = new SmoothEnterprise.Utility.Registry();
                ver_info.InnerHtml = "EIP for Microsoft .NET Framework 2.0 ,瀏覽器最適版本IE7,建議最佳解析度為1024*768或以上";// "RELEASE 2.1.00 --  Design by MAT MIS Department";
                //ver_info.InnerHtml = "2.1.00  Design by MAT MIS Department";
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 55
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BusinessObjects.Person person = new BusinessObjects.Person(1);

            if (person.Addresses.Count > 0)
            {
                System.Web.UI.HtmlControls.HtmlTable    addressTable   = new System.Web.UI.HtmlControls.HtmlTable();
                System.Web.UI.HtmlControls.HtmlTableRow addressIDRow   = new System.Web.UI.HtmlControls.HtmlTableRow();
                System.Web.UI.HtmlControls.HtmlTableRow addressDataRow = new System.Web.UI.HtmlControls.HtmlTableRow();

                System.Web.UI.HtmlControls.HtmlTableCell addressIDLabelCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str1LabelCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str2LabelCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell citLabelCell       = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell stLabelCell        = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell zLabelCell         = new System.Web.UI.HtmlControls.HtmlTableCell();

                System.Web.UI.HtmlControls.HtmlTableCell addressIDLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str1LiteralCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str2LiteralCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell citLiteralCell       = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell stLiteralCell        = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell zLiteralCell         = new System.Web.UI.HtmlControls.HtmlTableCell();

                addressTable.Border = 1;


                Label   lblAddID = new Label();
                Literal litAddID = new Literal();
                Label   lblStr1  = new Label();
                Literal litStr1  = new Literal();
                Label   lblStr2  = new Label();
                Literal litStr2  = new Literal();
                Label   lblCit   = new Label();
                Literal litCit   = new Literal();
                Label   lblSt    = new Label();
                Literal litSt    = new Literal();
                Label   lblZ     = new Label();
                Literal litZ     = new Literal();

                lblAddID.Text = "Address ID: ";
                lblStr1.Text  = "Street 1: ";
                lblStr2.Text  = "Street 2: ";
                lblCit.Text   = "City: ";
                lblSt.Text    = "State: ";
                lblZ.Text     = "Zip: ";
                int i = 0;
                litAddID.Text = person.Addresses[i].AddressID.ToString();
                litStr1.Text  = person.Addresses[i].Street1.ToString();
                litStr2.Text  = person.Addresses[i].Street2.ToString();
                litCit.Text   = person.Addresses[i].City.ToString();
                litSt.Text    = person.Addresses[i].State.ToString();
                litZ.Text     = person.Addresses[i].Zip.ToString();


                addressIDLabelCell.Controls.Add(lblAddID);
                addressIDLiteralCell.Controls.Add(litAddID);
                str1LabelCell.Controls.Add(lblStr1);
                str1LiteralCell.Controls.Add(litStr1);
                str2LabelCell.Controls.Add(lblStr2);
                str2LiteralCell.Controls.Add(litStr2);
                citLabelCell.Controls.Add(lblCit);
                citLiteralCell.Controls.Add(litCit);
                stLabelCell.Controls.Add(lblSt);
                stLiteralCell.Controls.Add(litSt);
                zLabelCell.Controls.Add(lblZ);
                zLiteralCell.Controls.Add(litZ);

                addressTable.Rows.Add(addressIDRow);
                addressIDRow.Cells.Add(addressIDLabelCell);
                addressIDRow.Cells.Add(str1LabelCell);
                addressIDRow.Cells.Add(str2LabelCell);
                addressIDRow.Cells.Add(citLabelCell);
                addressIDRow.Cells.Add(stLabelCell);
                addressIDRow.Cells.Add(zLabelCell);

                //foreach (BusinessObjects.PersonAddress personAddresses in person.Addresses)
                //{

                //    addressIDRow = new HtmlTableRow();

                //   addressIDLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                // str1LiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                //     str2LiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                //     citLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                //    stLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                //    zLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();

                //    litAddID.Text = person.Addresses[i].AddressID.ToString();
                //    litStr1.Text = person.Addresses[i].Street1.ToString();
                //    litStr2.Text = person.Addresses[i].Street2.ToString();
                //    litCit.Text = person.Addresses[i].City.ToString();
                //    litSt.Text = person.Addresses[i].State.ToString();
                //    litZ.Text = person.Addresses[i].Zip.ToString();

                //    addressIDLiteralCell.Controls.Add(litAddID);
                //    str1LiteralCell.Controls.Add(litStr1);
                //    str2LiteralCell.Controls.Add(litStr2);
                //    citLiteralCell.Controls.Add(litCit);
                //    stLiteralCell.Controls.Add(litSt);
                //    zLiteralCell.Controls.Add(litZ);

                //    addressTable.Rows.Add(addressIDRow);
                //    addressIDRow.Cells.Add(addressIDLiteralCell);
                //    addressIDRow.Cells.Add(str1LiteralCell);
                //    addressIDRow.Cells.Add(str2LiteralCell);
                //    addressIDRow.Cells.Add(citLiteralCell);
                //    addressIDRow.Cells.Add(stLiteralCell);
                //    addressIDRow.Cells.Add(zLiteralCell);

                //    i += 1;

                //}

                Page.Form.Controls.Add(addressTable);
            }
        }
Ejemplo n.º 56
0
        public void LoadHtmlTable()
        {
            System.Web.UI.HtmlControls.HtmlTable tblPivot = new System.Web.UI.HtmlControls.HtmlTable();
            tblPivot.CellPadding = 0;
            tblPivot.CellSpacing = 0;
            tblPivot.Width       = "100%";
            tblPivot.Height      = "100%";
            tblPivot.Attributes.Add("class", "tbl1_T");
            pnlPivot.Controls.Add(tblPivot);

            if (_report == null || _report.Cellset.IsValid == false)
            {
                return;
            }

            int Ax0MemCount = _report.Cellset.Axis0TupleMemCount;
            int Ax1MemCount = _report.Cellset.Axis1TupleMemCount;
            int Ax0PosCount = _report.Cellset.Axis0PosCount;
            int Ax1PosCount = _report.Cellset.Axis1PosCount;

            int ax0OrderPos = _report.GetOrderPosition(_report.Axes[0]);
            int ax1OrderPos = _report.GetOrderPosition(_report.Axes[1]);

            Hierarchy ax1Hier = null;
            Hierarchy ax0Hier = null;

            //table
            System.Web.UI.HtmlControls.HtmlTableRow  tr = null;
            System.Web.UI.HtmlControls.HtmlTableCell td = null;

            if (Ax0PosCount == 0 && Ax1PosCount == 0)
            {
                tr = new HtmlTableRow();
                tblPivot.Rows.Add(tr);
                td = new HtmlTableCell();
                tr.Cells.Add(td);
                td.Attributes.Add("class", "tbl1_err");
                td.Attributes.Add("nowrap", "true");
                td.InnerText = "Query successfully executed, cellset contains no data";
                return;
            }


            for (int i = 0; i < Ax0MemCount; i++)
            {
                tr = new System.Web.UI.HtmlControls.HtmlTableRow();
                tblPivot.Rows.Add(tr);

                for (int j = 0; j < Ax1MemCount; j++)
                {
                    td = new System.Web.UI.HtmlControls.HtmlTableCell();
                    td.Attributes.Add("class", "tbl1_HC");
                    td.NoWrap = true;
                    tr.Cells.Add(td);

                    //hier controls in last row
                    if (i == Ax0MemCount - 1)
                    {
                        this.CreateHierControls(_report.Axes[1].Hierarchies[j], td);
                    }
                }

                ax0Hier = _report.Axes[0].Hierarchies[i];
                for (int j = 0; j < Ax0PosCount; j++)
                {
                    CellsetMember mem          = _report.Cellset.GetCellsetMember(0, i, j);
                    bool          inOrderTuple = false;

                    //if same as prev, continue
                    if (j != 0 && _report.Cellset.GetCellsetMember(0, i, j - 1).UniqueName == mem.UniqueName)
                    {
                        continue;
                    }

                    td        = new System.Web.UI.HtmlControls.HtmlTableCell();
                    td.NoWrap = true;

                    // handle order position highlight
                    if (j == ax0OrderPos)                  // in order tuple
                    {
                        inOrderTuple = true;
                    }


                    // handle colspan
                    int spanCount = 1;
                    for (int n = j + 1; n < Ax0PosCount; n++)
                    {
                        CellsetMember nextMem = _report.Cellset.GetCellsetMember(0, i, n);
                        if (nextMem.UniqueName == mem.UniqueName)
                        {
                            spanCount++;

                            // handle order position highlight
                            if (n == ax0OrderPos)
                            {
                                inOrderTuple = true;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }

                    // handle order position highlight
                    if (inOrderTuple)                    // in order tuple
                    {
                        td.Attributes.Add("class", "tbl1_H3");
                    }
                    else
                    {
                        td.Attributes.Add("class", "tbl1_H2");
                    }

                    // if we span
                    if (spanCount > 1)
                    {
                        td.ColSpan = spanCount;
                    }


                    if (mem.ChildCount == 0)
                    {                     // leaf-level
                        System.Web.UI.HtmlControls.HtmlImage img = new System.Web.UI.HtmlControls.HtmlImage();
                        img.Src = "../images/leaf.gif";
                        td.Controls.Add(img);
                    }

                    System.Web.UI.HtmlControls.HtmlInputCheckBox chb = new System.Web.UI.HtmlControls.HtmlInputCheckBox();
                    chb.ID = "m:" + _contr.IdentifierFromCellsetPosition(0, j, i);
                    chb.EnableViewState = false;
                    td.EnableViewState  = false;
                    td.Controls.Add(chb);

                    System.Web.UI.LiteralControl literal = new System.Web.UI.LiteralControl(mem.Name);
                    td.Controls.Add(literal);

                    tr.Cells.Add(td);
                }


                // hier controls in last col
                td = new System.Web.UI.HtmlControls.HtmlTableCell();
                td.Attributes.Add("class", "tbl1_HC");
                td.NoWrap = true;
                CreateHierControls(ax0Hier, td);
                tr.Cells.Add(td);
            }



            for (int i = 0; i < Ax1PosCount; i++)
            {
                tr = new System.Web.UI.HtmlControls.HtmlTableRow();
                tblPivot.Rows.Add(tr);

                for (int j = 0; j < Ax1MemCount; j++)
                {
                    ax1Hier = _report.Axes[1].Hierarchies[j];
                    CellsetMember mem          = _report.Cellset.GetCellsetMember(1, j, i);
                    bool          inOrderTuple = false;

                    //if same as prev, continue
                    if (i != 0 && _report.Cellset.GetCellsetMember(1, j, i - 1).UniqueName == mem.UniqueName)
                    {
                        continue;
                    }

                    td        = new System.Web.UI.HtmlControls.HtmlTableCell();
                    td.NoWrap = true;

                    // handle order position highlight
                    if (i == ax1OrderPos)                  // in order tuple
                    {
                        inOrderTuple = true;
                    }


                    // handle rowspan
                    int spanCount = 1;
                    for (int n = i + 1; n < Ax1PosCount; n++)
                    {
                        CellsetMember nextMem = _report.Cellset.GetCellsetMember(1, j, n);
                        if (nextMem.UniqueName == mem.UniqueName)
                        {
                            spanCount++;

                            // handle order position highlight
                            if (n == ax1OrderPos)
                            {
                                inOrderTuple = true;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }

                    // handle order position highlight
                    if (inOrderTuple)                    // in order tuple
                    {
                        td.Attributes.Add("class", "tbl1_H1");
                    }
                    else
                    {
                        td.Attributes.Add("class", "tbl1_H");
                    }

                    // if we span
                    if (spanCount > 1)
                    {
                        td.RowSpan = spanCount;
                    }



                    if (mem.ChildCount == 0)
                    {                     // leaf-level
                        System.Web.UI.HtmlControls.HtmlImage img = new System.Web.UI.HtmlControls.HtmlImage();
                        img.Src = "../images/leaf.gif";
                        td.Controls.Add(img);
                    }

                    System.Web.UI.HtmlControls.HtmlInputCheckBox chb = new System.Web.UI.HtmlControls.HtmlInputCheckBox();
                    chb.ID = "m:" + _contr.IdentifierFromCellsetPosition(1, i, j);
                    chb.EnableViewState = false;
                    td.EnableViewState  = false;
                    td.Controls.Add(chb);

                    System.Web.UI.LiteralControl literal = new System.Web.UI.LiteralControl(mem.Name);
                    td.Controls.Add(literal);


                    tr.Cells.Add(td);
                }

                for (int j = 0; j < Ax0PosCount; j++)
                {
                    td = new System.Web.UI.HtmlControls.HtmlTableCell();
                    td.Attributes.Add("class", "tbl1_C");
                    td.NoWrap = true;
                    Cell olapCell = _report.Cellset.GetCell(j, i);
                    td.InnerText = olapCell.FormattedValue;
                    tr.Cells.Add(td);
                }
            }
        }
Ejemplo n.º 57
0
        public void Add_Movie_Cart(Movie movie, int array_seq)
        {
            System.Web.UI.HtmlControls.HtmlTableRow  r  = new System.Web.UI.HtmlControls.HtmlTableRow();
            System.Web.UI.HtmlControls.HtmlTableCell c1 = new System.Web.UI.HtmlControls.HtmlTableCell();

            HtmlGenericControl figure = new HtmlGenericControl("figure");

            figure.Attributes.Add("class", "media");

            HtmlGenericControl div_img_wrap = new HtmlGenericControl("div");

            div_img_wrap.Attributes.Add("class", "img-wrap");

            Image cell_image = new Image();

            cell_image.ImageUrl = movie.MovieUrl;
            cell_image.CssClass = "img-thumbnail img-sm";
            cell_image.Width    = 90;
            cell_image.Height   = 120;
            div_img_wrap.Controls.Add(cell_image);

            HtmlGenericControl div_media_body = new HtmlGenericControl("div");

            div_media_body.Attributes.Add("class", "media-body");

            Label cell_label_title = new Label();

            cell_label_title.Text     = movie.Title;
            cell_label_title.CssClass = "title text-truncate";
            div_media_body.Controls.Add(cell_label_title);

            figure.Controls.Add(div_img_wrap);
            figure.Controls.Add(div_media_body);

            c1.Controls.Add(figure);

            r.Cells.Add(c1);

            System.Web.UI.HtmlControls.HtmlTableCell c2 = new System.Web.UI.HtmlControls.HtmlTableCell();

            HtmlGenericControl div_price_wrap_1 = new HtmlGenericControl("div");

            div_price_wrap_1.Attributes.Add("class", "price-wrap");

            Label cell_label_writer = new Label();

            cell_label_writer.Text     = movie.Writer;
            cell_label_writer.CssClass = "title text-truncate";
            div_price_wrap_1.Controls.Add(cell_label_writer);

            c2.Controls.Add(div_price_wrap_1);

            r.Cells.Add(c2);

            System.Web.UI.HtmlControls.HtmlTableCell c3 = new System.Web.UI.HtmlControls.HtmlTableCell();

            HtmlGenericControl div_price_wrap_2 = new HtmlGenericControl("div");

            div_price_wrap_2.Attributes.Add("class", "price-wrap");

            Label cell_label_director = new Label();

            cell_label_director.Text     = movie.Director;
            cell_label_director.CssClass = "title text-truncate";
            div_price_wrap_2.Controls.Add(cell_label_director);

            c3.Controls.Add(div_price_wrap_2);

            r.Cells.Add(c3);

            System.Web.UI.HtmlControls.HtmlTableCell c4 = new System.Web.UI.HtmlControls.HtmlTableCell();

            HtmlGenericControl div_price_wrap_3 = new HtmlGenericControl("div");

            div_price_wrap_3.Attributes.Add("class", "price-wrap");

            Label cell_label_year = new Label();

            cell_label_year.Text     = movie.Year.ToString();
            cell_label_year.CssClass = "title text-truncate";
            div_price_wrap_3.Controls.Add(cell_label_year);

            c4.Controls.Add(div_price_wrap_3);

            r.Cells.Add(c4);

            System.Web.UI.HtmlControls.HtmlTableCell c5 = new System.Web.UI.HtmlControls.HtmlTableCell();

            HtmlGenericControl div_price_wrap_4 = new HtmlGenericControl("div");

            div_price_wrap_4.Attributes.Add("class", "price-wrap text-right");

            Button cell_delete_button = new Button();

            cell_delete_button.Text     = "Remove";
            cell_delete_button.CssClass = "btn btn-outline-danger";
            cell_delete_button.ID       = "Button" + array_seq.ToString();
            cell_delete_button.Click   += btn_delete_Click;
            div_price_wrap_4.Controls.Add(cell_delete_button);

            c5.Controls.Add(div_price_wrap_4);

            r.Cells.Add(c5);

            Panel_element.Controls.Add(r);


            //HtmlGenericControl div_go_default = new HtmlGenericControl("div");
            //Button btn_go_default = new Button();
            //btn_go_default.Text = "Return To Main Page";
            //btn_go_default.ID = "btn_go_default";
            //btn_go_default.CssClass = "btn btn-outline-info btn-lg btn-block";
            //btn_go_default.Click += btn_go_default_Click;


            //div_go_default.Controls.Add(btn_go_default);

            //Panel_Cart.Controls.Add(div_go_default);
        }
Ejemplo n.º 58
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BusinessObjects.Person person = new BusinessObjects.Person(1);

            litPersonID.Text  = person.ID.ToString();
            litTitle.Text     = person.Title;
            litFirstName.Text = person.FirstName;
            litLastName.Text  = person.LastName;

            if (person.Addresses.Count > 0)
            {
                System.Web.UI.HtmlControls.HtmlTable    addressTable    = new System.Web.UI.HtmlControls.HtmlTable();
                System.Web.UI.HtmlControls.HtmlTableRow addressIDRow    = new System.Web.UI.HtmlControls.HtmlTableRow();
                System.Web.UI.HtmlControls.HtmlTableRow addressDataRow  = new System.Web.UI.HtmlControls.HtmlTableRow();
                System.Web.UI.HtmlControls.HtmlTableRow addressDataRow2 = new System.Web.UI.HtmlControls.HtmlTableRow();


                System.Web.UI.HtmlControls.HtmlTableCell addressIDLabelCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str1LabelCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str2LabelCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell citLabelCell       = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell stLabelCell        = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell zLabelCell         = new System.Web.UI.HtmlControls.HtmlTableCell();

                System.Web.UI.HtmlControls.HtmlTableCell addressIDLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str1LiteralCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell str2LiteralCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell citLiteralCell       = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell stLiteralCell        = new System.Web.UI.HtmlControls.HtmlTableCell();
                System.Web.UI.HtmlControls.HtmlTableCell zLiteralCell         = new System.Web.UI.HtmlControls.HtmlTableCell();


                Label   lblAddID = new Label();
                Literal litAddID = new Literal();
                Label   lblStr1  = new Label();
                Literal litStr1  = new Literal();
                Label   lblStr2  = new Label();
                Literal litStr2  = new Literal();
                Label   lblCit   = new Label();
                Literal litCit   = new Literal();
                Label   lblSt    = new Label();
                Literal litSt    = new Literal();
                Label   lblZ     = new Label();
                Literal litZ     = new Literal();

                lblAddID.Text = "Address ID: ";
                lblStr1.Text  = "Street 1: ";
                lblStr2.Text  = "Street 2: ";
                lblCit.Text   = "City: ";
                lblSt.Text    = "State: ";
                lblZ.Text     = "Zip: ";
                int i = 0;
                litAddID.Text = person.Addresses[i].AddressID.ToString();
                litStr1.Text  = person.Addresses[i].Street1.ToString();
                litStr2.Text  = person.Addresses[i].Street2.ToString();
                litCit.Text   = person.Addresses[i].City.ToString();
                litSt.Text    = person.Addresses[i].State.ToString();
                litZ.Text     = person.Addresses[i].Zip.ToString();


                addressIDLabelCell.Controls.Add(lblAddID);  //the addressIDLabelCell
                addressIDLiteralCell.Controls.Add(litAddID);
                str1LabelCell.Controls.Add(lblStr1);
                // str1LiteralCell.Controls.Add(litStr1);
                str2LabelCell.Controls.Add(lblStr2);
                //   str2LiteralCell.Controls.Add(litStr2);
                citLabelCell.Controls.Add(lblCit);
                // citLiteralCell.Controls.Add(litCit);
                stLabelCell.Controls.Add(lblSt);
                //  stLiteralCell.Controls.Add(litSt);
                zLabelCell.Controls.Add(lblZ);
                //  zLiteralCell.Controls.Add(litZ);

                //This is what displays the labels on the first row. AddressID, Street, Street, City, State, Zip
                addressTable.Rows.Add(addressIDRow);
                addressIDRow.Cells.Add(addressIDLabelCell);
                addressIDRow.Cells.Add(str1LabelCell);
                addressIDRow.Cells.Add(str2LabelCell);
                addressIDRow.Cells.Add(citLabelCell);
                addressIDRow.Cells.Add(stLabelCell);
                addressIDRow.Cells.Add(zLabelCell);


                foreach (BusinessObjects.PersonAddress personAddresses in person.Addresses)
                {
                    //69 to 99 on webform 3
                    addressDataRow       = new HtmlTableRow();
                    addressIDLiteralCell = new System.Web.UI.HtmlControls.HtmlTableCell();
                    str1LiteralCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                    str2LiteralCell      = new System.Web.UI.HtmlControls.HtmlTableCell();
                    citLiteralCell       = new System.Web.UI.HtmlControls.HtmlTableCell();
                    stLiteralCell        = new System.Web.UI.HtmlControls.HtmlTableCell();
                    zLiteralCell         = new System.Web.UI.HtmlControls.HtmlTableCell();

                    litAddID.Text = person.Addresses[i].AddressID.ToString();
                    litStr1.Text  = person.Addresses[i].Street1.ToString();
                    litStr2.Text  = person.Addresses[i].Street2.ToString();
                    litCit.Text   = person.Addresses[i].City.ToString();
                    litSt.Text    = person.Addresses[i].State.ToString();
                    litZ.Text     = person.Addresses[i].Zip.ToString();

                    addressIDLiteralCell.Controls.Add(litAddID);
                    //str1LabelCell.Controls.Add(lblStr1);
                    str1LiteralCell.Controls.Add(litStr1);
                    //str2LabelCell.Controls.Add(lblStr2);
                    str2LiteralCell.Controls.Add(litStr2);
                    //citLabelCell.Controls.Add(lblCit);
                    citLiteralCell.Controls.Add(litCit);
                    // stLabelCell.Controls.Add(lblSt);
                    stLiteralCell.Controls.Add(litSt);
                    // zLabelCell.Controls.Add(lblZ);
                    zLiteralCell.Controls.Add(litZ);

                    addressDataRow.Cells.Add(addressIDLiteralCell);
                    addressDataRow.Cells.Add(str1LiteralCell);

                    addressDataRow.Cells.Add(str2LiteralCell);
                    addressDataRow.Cells.Add(citLiteralCell);
                    addressDataRow.Cells.Add(stLiteralCell);
                    addressDataRow.Cells.Add(zLiteralCell);

                    addressTable.Rows.Add(addressDataRow);


                    Page.Form.Controls.Add(addressTable);
                    this.Controls.Add(addressTable);
                }
            }
        }