111
cjs
2025-06-06 03e67373c4c3bef21936ec1f9037f2ebcd434583
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/////////////////////////////////////////////////////////////////////////////
//    File Description    : 检测记录是否存在的异常
//    Copyright           : joyin
// -------------------------------------------------------------------------
//    Date Created        : Mar 26, 2010
//    Author                : jiangxinjun
//
/////////////////////////////////////////////////////////////////////////////
 
using System;
using System.Collections.Generic;
using System.Text;
 
namespace HH.AMS.Entitys.Common
{
    /// <summary>
    /// 检测记录是否存在的异常
    /// </summary>
    /// <remarks>如果记录的某一个栏位必须唯一,但插入的数据又包含了表中已包含的数据,那么就会抛出这个异常</remarks>
    public class CheckExistException : Exception
    {
        /// <summary>
        /// 异常信息
        /// </summary>
        public override string Message
        {
            get
            {
                return "记录出现重复";
            }
        }
 
        private string mark;
 
        /// <summary>
        /// 标记
        /// </summary>
        /// <remarks>统一都为小写字母</remarks>
        public string Mark 
        {
            get
            {
                return mark ?? "";
            }
            set 
            {
                if (value != null)
                {
                    mark = value.ToLower();
                }
                else
                {
                    mark = value;
                }
            }
        }
    }
}