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

            kg.Keyid = Guid.NewGuid().ToString();
            kg.Keyname = "小学";
            kg.Keycode = "1";
            kg.Keyinfo = "小学";
            kg.Sort = 0;
            BizKeyGrade.Insert(kg);

            kg.Keyid = Guid.NewGuid().ToString();
            kg.Keyname = "中学";
            kg.Keycode = "2";
            kg.Keyinfo = "中学";
            kg.Sort = 1;
            BizKeyGrade.Insert(kg);

            kg.Keyid = Guid.NewGuid().ToString();
            kg.Keyname = "高中";
            kg.Keycode = "3";
            kg.Keyinfo = "高中";
            kg.Sort = 3;
            BizKeyGrade.Insert(kg);

            kg.Keyid = Guid.NewGuid().ToString();
            kg.Keyname = "大学";
            kg.Keycode = "4";
            kg.Keyinfo = "大学";
            kg.Sort = 4;
            BizKeyGrade.Insert(kg);

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