⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 looktype.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Controls.FieldControl
{
    using PowerEasy.Common;
    using PowerEasy.CommonModel;
    using PowerEasy.Model.CommonModel;
    using PowerEasy.Web.UI;
    using System;
    using System.Collections;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class LookType : BaseFieldControl
    {
        protected DropDownList DropSelectItem;
        protected HtmlTableRow Tab;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                string tableName;
                int id = DataConverter.CLng(base.Settings[0]);
                ModelInfo modelInfoById = ModelManager.GetModelInfoById(id);
                if (Field.GetFieldInfoByFieldName(id, base.Settings[1]).FieldLevel == 0)
                {
                    tableName = "PE_CommonModel";
                }
                else
                {
                    tableName = modelInfoById.TableName;
                }
                if (Field.FieldExists(id, base.Settings[1]))
                {
                    ArrayList list = ModelManager.GetLookupField(tableName, base.Settings[1], id);
                    this.DropSelectItem.DataSource = list;
                    this.DropSelectItem.DataBind();
                }
                BaseUserControl.SetSelectedIndexByValue(this.DropSelectItem, this.FieldValue);
            }
            else
            {
                this.FieldValue = this.DropSelectItem.SelectedValue;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -