/// <summary> /// 引发<see cref="BuildingSplitter"/>事件 /// </summary> /// <param name="e"></param> protected virtual void OnBuildingSplitter(RenderControlEventArgs e) { if (this.BuildingSplitter != null) { this.BuildingSplitter(this, e); } }
/// <summary> /// 引发<see cref="BuildingAnchor"/>事件 /// </summary> /// <param name="e"></param> protected virtual void OnBuildingAnchor(RenderControlEventArgs e) { if (BuildingAnchor != null) { this.BuildingAnchor(this, e); } }
protected virtual Control BuildOrganzationAnchor(IOrganization org) { HtmlAnchor anchor = new HtmlAnchor(); if (this.LinkCssClass.IsNotEmpty()) { anchor.Attributes["class"] = this.LinkCssClass; } anchor.InnerText = org.DisplayName.IsNotEmpty() ? org.DisplayName : org.Name; anchor.HRef = this.BuildUrl(org); anchor.Target = this.Target; string dataTag = this.LinkDataTag; string clickScript = this.OnClientLinkClick; if (string.IsNullOrEmpty(dataTag) == false) { anchor.Attributes.Add(dataTag, org.ID); } if (string.IsNullOrEmpty(clickScript) == false) { anchor.Attributes.Add("onclick", clickScript); } RenderControlEventArgs e = new RenderControlEventArgs(anchor, org); this.OnBuildingAnchor(e); return(anchor); }
protected virtual Control BuildSplitterControl() { HtmlGenericControl splitter = new HtmlGenericControl("span"); if (this.SplitterCssClass.IsNotEmpty()) { splitter.Attributes["class"] = this.SplitterCssClass; } splitter.InnerText = this.SplitterChars; RenderControlEventArgs e = new RenderControlEventArgs(splitter, null); this.OnBuildingSplitter(e); return(splitter); }
/// <summary> /// 引发<see cref="BuildingSplitter"/>事件 /// </summary> /// <param name="e"></param> protected virtual void OnBuildingSplitter(RenderControlEventArgs e) { if (this.BuildingSplitter != null) this.BuildingSplitter(this, e); }
protected virtual Control BuildOrganzationAnchor(IOrganization org) { HtmlAnchor anchor = new HtmlAnchor(); if (this.LinkCssClass.IsNotEmpty()) anchor.Attributes["class"] = this.LinkCssClass; anchor.InnerText = org.DisplayName.IsNotEmpty() ? org.DisplayName : org.Name; anchor.HRef = this.BuildUrl(org); anchor.Target = this.Target; string dataTag = this.LinkDataTag; string clickScript = this.OnClientLinkClick; if (string.IsNullOrEmpty(dataTag) == false) { anchor.Attributes.Add(dataTag, org.ID); } if (string.IsNullOrEmpty(clickScript) == false) { anchor.Attributes.Add("onclick", clickScript); } RenderControlEventArgs e = new RenderControlEventArgs(anchor, org); this.OnBuildingAnchor(e); return anchor; }
protected virtual Control BuildSplitterControl() { HtmlGenericControl splitter = new HtmlGenericControl("span"); if (this.SplitterCssClass.IsNotEmpty()) splitter.Attributes["class"] = this.SplitterCssClass; splitter.InnerText = this.SplitterChars; RenderControlEventArgs e = new RenderControlEventArgs(splitter, null); this.OnBuildingSplitter(e); return splitter; }