public bool AddMultiLinkCell(string strXML, int iPercent) { //解開XML中所傳之參數 PccCommonForC.PccMsg myMsg; try { myMsg = new PccCommonForC.PccMsg(strXML, ""); XmlNodeList myNodes = myMsg.QueryNodes("LinkButton"); if (myNodes == null) { AddTextCell("", iPercent); return false; } } catch { AddTextCell("", iPercent); return false; } HyperLink myHLink; //建立新的Cell物件 TableCell myCell = new TableCell(); CheckDefaultSet(ref myCell); foreach (XmlNode myNode in myMsg.QueryNodes("LinkButton")) { //建立HyperLink物件 myHLink = new HyperLink(); myHLink.Style["cursor"] = "pointer"; myHLink.NavigateUrl = myMsg.Query("href", myNode) + "&QueryCondition=" + myMsg.Query("QueryCondition", myNode) + "&Method=" + myMsg.Query("Method", myNode); myHLink.ImageUrl = myMsg.Query("Image", myNode); myHLink.ToolTip = myMsg.Query("ToolTip", myNode); myHLink.Attributes.Add("onmouseover", "MouseOver_Click(this)"); myHLink.Attributes.Add("onmouseout", "MouseOut_Click(this)"); myCell.Controls.Add(myHLink); } myCell.Width = Unit.Percentage(iPercent); m_Row.Cells.Add(myCell); return true; }
public bool AddLinkCell(string strXML, int iPercent) { //解開XML中所傳之參數 PccCommonForC.PccMsg myMsg; try { myMsg = new PccCommonForC.PccMsg(strXML, ""); } catch { return false; } string strToolTip = myMsg.Query("ToolTip"); string strLinkID = myMsg.Query("LinkID"); string strImage = myMsg.Query("Image"); string strClickFun = myMsg.Query("ClickFun"); //建立HyperLink物件 HyperLink myHLink = new HyperLink(); myHLink.Style["cursor"] = "pointer"; myHLink.ImageUrl = strImage; myHLink.ToolTip = strToolTip; myHLink.ID = strLinkID; myHLink.Attributes.Add("onclick", strClickFun); //建立新的Cell物件 TableCell myCell = new TableCell(); CheckDefaultSet(ref myCell); myCell.Controls.Add(myHLink); myCell.Width = Unit.Percentage(iPercent); m_Row.Cells.Add(myCell); return true; }
public bool AddLinkHrefCell(string strXML, int iPercent) { //解開XML中所傳之參數 PccCommonForC.PccMsg myMsg; try { myMsg = new PccCommonForC.PccMsg(strXML, ""); } catch { return false; } string strToolTip = myMsg.Query("ToolTip"); string strLinkID = myMsg.Query("LinkID"); string strHref = myMsg.Query("Href"); string strText = myMsg.Query("Text"); //建立HyperLink物件 HyperLink myHLink = new HyperLink(); myHLink.Style["cursor"] = "pointer"; myHLink.NavigateUrl = strHref; myHLink.ToolTip = strToolTip; myHLink.ID = strLinkID; myHLink.Text = strText; //建立新的Cell物件 TableCell myCell = new TableCell(); CheckDefaultSet(ref myCell); myCell.Controls.Add(myHLink); myCell.Width = Unit.Percentage(iPercent); m_Row.Cells.Add(myCell); return true; }
public bool AddCheckBoxReadOnlyCell(string strXML, int iPercent) { //解開XML中所傳之參數 PccCommonForC.PccMsg myMsg; try { myMsg = new PccCommonForC.PccMsg(strXML); } catch { return false; } //建立新的Cell物件 TableCell myCell = new TableCell(); CheckDefaultSet(ref myCell); if (myMsg.Query("Checked") == "Y") myCell.Text = "<input type=checkbox name=" + myMsg.Query("Name") + " value=" + myMsg.Query("Value") + " checked disabled>"; else myCell.Text = "<input type=checkbox name=" + myMsg.Query("Name") + " value=" + myMsg.Query("Value") + " disabled>"; myCell.Width = Unit.Percentage(iPercent); m_Row.Cells.Add(myCell); return true; }