//读取其他联系人信息 private void loadOtherBank() { string id = Request.QueryString["id"].ToString(); DataTable dt = ComLinkmanManager.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]["post"].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]["msn"].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); } } }
private void addcomlink() { string id = Request.QueryString["id"].ToString(); ComLinkmanManager.deleteComLinkmanByComId(Convert.ToInt32(id)); string strList = this.hidlink.Value; if (strList != "") { string[] row = null; string[] cell = null; EtNet_Models.ComLinkman comlink = null; if (strList.IndexOf(',') >= 0) { row = strList.Split(','); } else { row = new string[1] { strList }; } for (int i = 0; i < row.Length; i++) { comlink = new EtNet_Models.ComLinkman(); cell = row[i].Split('|'); comlink.LinkName = cell[0]; comlink.Post = cell[1]; comlink.Telephone = cell[2]; comlink.Fax = cell[3]; comlink.Mobile = cell[4]; comlink.Email = cell[5]; comlink.Msn = cell[6]; comlink.Skype = cell[7]; comlink.CompanyId = Convert.ToInt32(id); ComLinkmanManager.addComLinkman(comlink); } } }
/// <summary> /// 添加次要联系人 /// </summary> private void addcomlink() { string strList = this.hidlink.Value; //得到次要联系人信息 if (strList != "") { string[] row = null; string[] cell = null; EtNet_Models.ComLinkman comLink = null; if (strList.IndexOf(',') >= 0) { row = strList.Split(','); } //判断是否有多行数据 else { row = new string[1] { strList }; } for (int i = 0; i < row.Length; i++) { comLink = new ComLinkman(); cell = row[i].Split('|'); comLink.LinkName = cell[0]; //联系人 comLink.Post = cell[1]; //职务 comLink.Telephone = cell[2]; //联系电话 comLink.Fax = cell[3]; //联系传真 comLink.Mobile = cell[4]; //手机 comLink.Email = cell[5]; //电子邮件 comLink.Msn = cell[6]; //QQ comLink.Skype = cell[7]; //Skype comLink.CompanyId = CompanyManager.getLastOneID().Id; //得到公司信息中最后面的一个id数据,也就是刚刚添加的公司信息的id ComLinkmanManager.addComLinkman(comLink); //添加次要联系人 } } }
//添加次要联系人 private void addcomlink() { string strList = this.hidlink.Value; if (strList != "") { string[] row = null; string[] cell = null; EtNet_Models.ComLinkman comLink = null; if (strList.IndexOf(',') >= 0) { row = strList.Split(','); } else { row = new string[1] { strList }; } for (int i = 0; i < row.Length; i++) { comLink = new ComLinkman(); cell = row[i].Split('|'); comLink.LinkName = cell[0]; comLink.Post = cell[1]; comLink.Telephone = cell[2]; comLink.Fax = cell[3]; comLink.Mobile = cell[4]; comLink.Email = cell[5]; comLink.Msn = cell[6]; comLink.Skype = cell[7]; comLink.CompanyId = CompanyManager.getLastOneID().Id; ComLinkmanManager.addComLinkman(comLink); } } }
//加载联系人信息 private void loadlink() { string id = Request.QueryString["id"].ToString(); DataTable tbl = ComLinkmanManager.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]["post"] + "' 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]["msn"] + "' 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]["post"] + "' 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]["msn"] + "' 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'> </div>"; row.Controls.Add(cell); this.tablelink.Controls.Add(row); } } } }