SheetHyperlink.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Web;
- using System.Web.UI;
- using System.ComponentModel;
- using System.Drawing;
- using System.Drawing.Design;
- [assembly:TagPrefix("OThinker.H3.WorkSheet","SheetControls")]
- namespace OThinker.H3.WorkSheet
- {
- /// <summary>
- /// SheetHyperlink 的摘要说明。
- /// </summary>
- ///
- [ToolboxBitmap(typeof(SheetHyperlink),"OThinker.H3.WorkSheet.SheetHyperlink.bmp")]
- [ToolboxData("<{0}:SheetHyperlink runat=server></{0}:SheetHyperlink>")]
- public class SheetHyperlink :
- System.Web.UI.WebControls.HyperLink,
- ISheetControl
- {
- public SheetHyperlink()
- {
- }
- #region 类SheetHyperLink成员
- private string _TextDataField = null;
- [Browsable(true),Category("WorkSheet"),DefaultValue("")]
- [Editor(typeof(DataSelector), typeof(UITypeEditor))]
- public string TextDataField
- {
- get
- {
- return this._TextDataField;
- }
- set
- {
- this._TextDataField = value;
- }
- }
- private string _NavigateUrlDataField = null;
- [Browsable(true),Category("WorkSheet")]
- [Editor(typeof(DataSelector), typeof(UITypeEditor))]
- public string NavigateUrlDataField
- {
- get
- {
- return this._NavigateUrlDataField;
- }
- set
- {
- this._NavigateUrlDataField = value;
- }
- }
- #endregion
- #region ISheetControl 成员
- public virtual void LoadDataField(OThinker.H3.WorkSheet.SheetPage SheetPage)
- {
- if(this.NavigateUrlDataField == null || this.NavigateUrlDataField == "")
- {
- }
- else if(SheetPage.Enviroment.InstanceData[this.NavigateUrlDataField] == null)
- {
- }
- else if(SheetPage.Enviroment.InstanceData[this.NavigateUrlDataField].Visible == false)
- {
- this.Visible = false;
- }
- else
- {
- this.Enabled = SheetPage.Enviroment.InstanceData[this.NavigateUrlDataField].Editable;
- if(SheetPage.Enviroment.InstanceData[this.NavigateUrlDataField].Value != null)
- {
- this.NavigateUrl = SheetPage.Enviroment.InstanceData[this.NavigateUrlDataField].Value.ToString();
- }
- }
- if( this.TextDataField == null || this.TextDataField == "" )
- {
- }
- else if(SheetPage.Enviroment.InstanceData[this.TextDataField] == null)
- {
- }
- else if(SheetPage.Enviroment.InstanceData[this.TextDataField].Visible == false)
- {
- this.Visible = false;
- }
- else
- {
- if(SheetPage.Enviroment.InstanceData[this.TextDataField].Value != null)
- {
- this.Text = SheetPage.Enviroment.InstanceData[this.TextDataField].Value.ToString();
- }
- }
- }
- public virtual bool ValidateDataField(
- OThinker.H3.WorkSheet.SheetPage SheetPage,
- System.Collections.Generic.List<string> Errors)
- {
- return true;
- }
- public virtual void SaveDataField(OThinker.H3.WorkSheet.SheetPage ParentPage)
- {
- }
- #endregion
- }
- }