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); } } }