示例#1
0
        /// <summary>
        /// 税务编号
        /// </summary>
        /// <param name="_No">编号</param>
        public SysEnum(string EnumKey, int val)
        {
            this.EnumKey = EnumKey;
            this.Lang    = BP.Web.WebUser.SysLang;
            this.IntKey  = val;
            this.MyPK    = this.EnumKey + "_" + this.Lang + "_" + this.IntKey;
            int i = this.RetrieveFromDBSources();

            if (i == 0)
            {
                i = this.Retrieve(SysEnumAttr.EnumKey, EnumKey, SysEnumAttr.Lang, BP.Web.WebUser.SysLang,
                                  SysEnumAttr.IntKey, this.IntKey);
                SysEnums ses = new SysEnums();
                ses.Full(EnumKey);
                if (i == 0)
                {
                    throw new Exception("@ EnumKey=" + EnumKey + " Val=" + val + " Lang=" + Web.WebUser.SysLang + " ...Error");
                }
            }
        }
示例#2
0
        public SysEnum(string enumKey, string Lang, int val)
        {
            this.EnumKey = enumKey;
            this.Lang    = Lang;
            this.IntKey  = val;
            this.MyPK    = this.EnumKey + "_" + this.Lang + "_" + this.IntKey;
            int i = this.RetrieveFromDBSources();

            if (i == 0)
            {
                i = this.Retrieve(SysEnumAttr.EnumKey, enumKey, SysEnumAttr.Lang, Lang,
                                  SysEnumAttr.IntKey, this.IntKey);

                SysEnums ses = new SysEnums();
                ses.Full(enumKey);

                if (i == 0)
                {
                    throw new Exception("@ EnumKey=" + enumKey + " Val=" + val + " Lang=" + Lang + " Error");
                }
            }
        }