Context中常用字段

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

Context中常用字段

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kingdee.BOS;
using Kingdee.BOS.Core.Bill.PlugIn;
using System.ComponentModel;

namespace Kingdee.Bos.ProjectName.ConText
{
    [Description("context上下文属性")]
    
    [Kingdee.BOS.Util.HotUpdate]
    
    
    public class ContextTest:AbstractBillPlugIn
    {
        public override void BarItemClick(BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
        {
            base.BarItemClick(e);
            
            
            //当点击按钮
            if (e.BarItemKey == "YDIE_tbTest")
            {
                //赋值 
                //Convert.ToString 换成成字符串
                
      this.View.Model.SetValue("F_YDIE_Text", Convert.ToString(this.Context.CurrentOrganizationInfo.ID));
      this.View.Model.SetValue("F_YDIE_Text1", Convert.ToString(this.Context.CurrentOrganizationInfo.Name));
                this.View.Model.SetValue("F_YDIE_Text2", Convert.ToString(this.Context.CurrentUserTimeZone));
                this.View.Model.SetValue("F_YDIE_Text3", Convert.ToString(this.Context.DatabaseType));
                this.View.Model.SetValue("F_YDIE_Text4", Convert.ToString(this.Context.IsMultiOrg));
                this.View.Model.SetValue("F_YDIE_Text11", Convert.ToString(this.Context.UserId));
                this.View.Model.SetValue("F_YDIE_Text31", Convert.ToString(this.Context.UserName));
                this.View.Model.SetValue("F_YDIE_Text41", Convert.ToString(this.Context.DBId));
                this.View.Model.SetValue("F_YDIE_Text21", Convert.ToString(this.Context.UserEmail));
                this.View.Model.SetValue("F_YDIE_Text5", Convert.ToString(this.Context.UserPhone));
                
                //刷新
                this.View.UpdateView();
            }
        }
    }
}

CurrentOrganizationInfo.ID    当前登录组织id

CurrentOrganizationInfo.Name    当前登录组织的名称

CurrentUserTimeZone    当前用户时区

DatabaseType    数据库类型

IsMultiOrg是否是多组织数据中心

UserId    当前用户Id

UserName    当前用户名称

DBId    数据库ID

UserEmail    登录用户邮箱

UserPhone    登录用户移动电话

        

Context中常用字段

using System;using System.Collections.Generic;using System.Linq;using System.Text;using Kingdee.BOS;using Kingdee.BOS.Core.Bill.Pl...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息