Esempio n. 1
0
        //读取其他联系人信息
        private void loadOtherBank()
        {
            string    id = Request.QueryString["id"].ToString();
            DataTable dt = FactLinkmanManager.getList(Convert.ToInt32(id));

            if (dt.Rows.Count > 0)
            {
                HtmlTableRow  row  = null;
                HtmlTableCell cell = null;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    row = new HtmlTableRow();

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["linkName"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["duty"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["telephone"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["fax"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["mobile"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["email"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["qq"].ToString();
                    row.Controls.Add(cell);

                    cell           = new HtmlTableCell();
                    cell.InnerHtml = dt.Rows[i]["skype"].ToString();
                    row.Controls.Add(cell);

                    // this.tablelanguage.Controls.Add(row);
                    this.tablelink.Controls.Add(row);
                }
            }
        }
Esempio n. 2
0
        //加载联系人信息
        private void loadlink()
        {
            string id = Request.QueryString["id"].ToString();

            DataTable tbl = FactLinkmanManager.getList(Convert.ToInt32(id));

            if (tbl.Rows.Count >= 1)
            {
                HtmlTableRow  row  = null;
                HtmlTableCell cell = null;
                for (int i = 0; i < tbl.Rows.Count; i++)
                {
                    if (i == 0)
                    {
                        row            = this.tablelink.Controls[1] as HtmlTableRow;
                        cell           = row.Controls[0] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["linkName"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[1] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["duty"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[2] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["telephone"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[3] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["fax"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[4] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["mobile"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[5] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["email"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[6] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["qq"] + "' class='clsblurtxt clsedit' />";
                        cell           = row.Controls[7] as HtmlTableCell;
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["skype"] + "' class='clsblurtxt clsedit' />";
                    }
                    else
                    {
                        row            = new HtmlTableRow();
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["linkName"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["duty"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["telephone"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["fax"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["mobile"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["email"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["qq"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell           = new HtmlTableCell();
                        cell.InnerHtml = "<input type='text' value='" + tbl.Rows[i]["skype"] + "' class='clsblurtxt clsedit' />";
                        row.Controls.Add(cell);
                        cell = new HtmlTableCell();

                        cell.InnerHtml = "<div title='删除' class='clsimgdel'>&nbsp;</div>";
                        row.Controls.Add(cell);
                        this.tablelink.Controls.Add(row);
                    }
                }
            }
        }