public static int Delete(KeyRegextype model,object trans)
		{
			if(model != null && trans !=null )
				return baseOperate.Delete(model,trans);	
			else
				throw new ApplicationException("在dbo.key_regexType中删除一条记录时,传递的参数model,trans有错误!");
		}
		public static int Delete(KeyRegextype model)
		{
			if(model != null)
				return baseOperate.Delete(model);	
			else
				throw new ApplicationException("在dbo.key_regexType中删除一条记录时,传递的参数model为Null!");;
		}
		public static int Insert(KeyRegextype model)
		{
			if(model != null)
				return baseOperate.Insert(model);
			else
				throw new ApplicationException("在dbo.key_regexType中增加一条记录时,传递的参数model为Null!");
		}
        protected void btnInsertRegexType_Click(object sender, EventArgs e)
        {
            KeyRegextype krt = new KeyRegextype();

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "all";
            krt.Keycode = "";
            krt.Keyinfo = "所有";
            krt.Sort = 0;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "intege1";
            krt.Keycode = "^$|^[1-9]\\d*$";
            krt.Keyinfo = "正整数";
            krt.Sort = 1;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "intege2";
            krt.Keycode = "^$|^-[1-9]\\d*$";
            krt.Keyinfo = "负整数";
            krt.Sort = 2;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "num";
            krt.Keycode = "^[0-9]*$";
            krt.Keyinfo = "数字";
            krt.Sort = 3;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "num1";
            krt.Keycode = "^$|^[1-9]\\d*|0$";
            krt.Keyinfo = "正数";
            krt.Sort = 4;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "num2";
            krt.Keycode = "^$|^-[1-9]\\d*|0$";
            krt.Keyinfo = "负数";
            krt.Sort = 5;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "decmal";
            krt.Keycode = "^$|^([+-]?)\\d*\\.\\d+$";
            krt.Keyinfo = "浮点数";
            krt.Sort = 6;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "decmal1";
            krt.Keycode = "^$|^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$";
            krt.Keyinfo = "正浮点数";
            krt.Sort = 7;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "decmal2";
            krt.Keycode = "^$|^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$";
            krt.Keyinfo = "负浮点数";
            krt.Sort = 8;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "decmal3";
            krt.Keycode = "^$|^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$";
            krt.Keyinfo = "非负浮点数";
            krt.Sort = 9;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "decmal4";
            krt.Keycode = "^$|^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$";
            krt.Keyinfo = "非正浮点数";
            krt.Sort = 10;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "email";
            krt.Keycode = "^$|^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$";
            krt.Keyinfo = "邮箱地址";
            krt.Sort = 11;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "color";
            krt.Keycode = "^$|^[a-fA-F0-9]{6}$";
            krt.Keyinfo = "颜色";
            krt.Sort = 12;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "color";
            krt.Keycode = "^$|^[a-fA-F0-9]{6}$";
            krt.Keyinfo = "颜色";
            krt.Sort = 13;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "url";
            krt.Keycode = "^$|^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$";
            krt.Keyinfo = "URL地址";
            krt.Sort = 14;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "chinese";
            krt.Keycode = "^$|^[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$";
            krt.Keyinfo = "中文";
            krt.Sort = 15;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "ascii";
            krt.Keycode = "^$|^[\\x00-\\xFF]+$";
            krt.Keyinfo = "仅ACSII字符";
            krt.Sort = 16;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "zipcode";
            krt.Keycode = "^$|^\\d{6}$";
            krt.Keyinfo = "邮编";
            krt.Sort = 17;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "mobile";
            krt.Keycode = "^$|^(13|15)[0-9]{9}$";
            krt.Keyinfo = "手机";
            krt.Sort = 18;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "ip4";
            krt.Keycode = "^$|^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5]).(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5]).(d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5]).(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$";
            krt.Keyinfo = "IP地址";
            krt.Sort = 19;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "notempty";
            krt.Keycode = "^$|^\\S+$";
            krt.Keyinfo = "非空";
            krt.Sort = 20;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "picture";
            krt.Keycode = "^$|(.*)\\.(jpg|bmp|gif|ico|jpeg|png)$";
            krt.Keyinfo = "图片";
            krt.Sort = 21;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "rar";
            krt.Keycode = "^$|(.*)\\.(rar|zip|7zip|tgz)$";
            krt.Keyinfo = "压缩文件";
            krt.Sort = 22;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "date";
            krt.Keycode = "^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2})$";
            krt.Keyinfo = "日期";
            krt.Sort = 23;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "qq";
            krt.Keycode = "^$|^[1-9]*[1-9][0-9]*$";
            krt.Keyinfo = "QQ号";
            krt.Sort = 24;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "tel";
            krt.Keycode = "^$|(\\d{3}-|\\d{4}-)?(\\d{8}|\\d{7})";
            krt.Keyinfo = "国内电话";
            krt.Sort = 25;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "username";
            krt.Keycode = "^$|^\\w+$";
            krt.Keyinfo = "用户名";
            krt.Sort = 26;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "letter";
            krt.Keycode = "^$|^[A-Za-z]+$";
            krt.Keyinfo = "字母";
            krt.Sort = 27;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "letter_u";
            krt.Keycode = "^$|^[A-Z]+$";
            krt.Keyinfo = "大写字母";
            krt.Sort = 28;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "letter_l";
            krt.Keycode = "^$|^[a-z]+$";
            krt.Keyinfo = "小写字母";
            krt.Sort = 29;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "idcard";
            krt.Keycode = "^$|^[1-9]([0-9]{14}|[0-9]{17})$";
            krt.Keyinfo = "身份证";
            krt.Sort = 30;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "charNumber";
            krt.Keycode = "^$|^([\u4e00-\u9fa5]|[a-zA-Z0-9]|[_ ()])*$";
            krt.Keyinfo = "一般性字符";
            krt.Sort = 31;
            BizKeyRegextype.Insert(krt);

            krt.Keyid = Guid.NewGuid().ToString();
            krt.Keyname = "intege";
            krt.Keycode = "^$|^-?[1-9]\\d*$";
            krt.Keyinfo = "整数";
            krt.Sort = 32;
            BizKeyRegextype.Insert(krt);

            LABMsg.Text = "插入验证类型字典表成功";
        }
		public static bool Exists(KeyRegextype model)
		{
			if(model != null )
				return baseOperate.Exists(model);	
			else
				throw new ApplicationException("在dbo.key_regexType中查询某条记录是否存在时,传递的参数model为Null!");
					
		}
		public  static KeyRegextype GetModel(KeyRegextype model)
		{
			if(model != null )
				return baseOperate.GetModel(model);	
			else
				throw new ApplicationException("根据主键获取dbo.key_regexType中的一条记录时,传递的参数model为Null!");
					
		}