属性器,转换从数据库中读取的状态

时间:2014-04-29 16:45:46   收藏:0   阅读:344

 [DataMapping("Status", DbType.Int16)]
        public System.Int16 Status { get; set; }

        public string StatusValue
        {
            get
            {
                if (Status == 0)
                {
                    return "审核拒绝";
                }
                else if (Status == 2)
                {
                    return "已审通过";

                }
                else if (Status == 1)
                {
                    return "待审"; ;
                }
                else
                {
                    return string.Empty;
                }
            }
        }

属性器,转换从数据库中读取的状态,码迷,mamicode.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!