/// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(university.Model.CCOM.Nationality model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Nationality set ");

            strSql.Append(" Nationality_name = @Nationality_name  ");
            strSql.Append(" where Nationality_id=@Nationality_id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@Nationality_id",   SqlDbType.Int,     4),
                new SqlParameter("@Nationality_name", SqlDbType.VarChar, 255)
            };

            parameters[0].Value = model.Nationality_id;
            parameters[1].Value = model.Nationality_name;
            int rows = DBSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public university.Model.CCOM.Nationality GetModel(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select Nationality_id, Nationality_name  ");
            strSql.Append("  from Nationality ");
            strSql.Append(" where " + strWhere);


            university.Model.CCOM.Nationality model = new university.Model.CCOM.Nationality();
            DataSet ds = DBSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Nationality_id"].ToString() != "")
                {
                    model.Nationality_id = int.Parse(ds.Tables[0].Rows[0]["Nationality_id"].ToString());
                }
                model.Nationality_name = ds.Tables[0].Rows[0]["Nationality_name"].ToString();

                return(model);
            }
            else
            {
                return(null);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(university.Model.CCOM.Nationality model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into Nationality(");
            strSql.Append("Nationality_name");
            strSql.Append(") values (");
            strSql.Append("@Nationality_name");
            strSql.Append(") ");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Nationality_name", SqlDbType.VarChar, 255)
            };

            parameters[0].Value = model.Nationality_name;

            object obj = DBSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public university.Model.CCOM.Nationality GetModel(int Nationality_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select Nationality_id, Nationality_name  ");
            strSql.Append("  from Nationality ");
            strSql.Append(" where Nationality_id=@Nationality_id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Nationality_id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Nationality_id;


            university.Model.CCOM.Nationality model = new university.Model.CCOM.Nationality();
            DataSet ds = DBSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Nationality_id"].ToString() != "")
                {
                    model.Nationality_id = int.Parse(ds.Tables[0].Rows[0]["Nationality_id"].ToString());
                }
                model.Nationality_name = ds.Tables[0].Rows[0]["Nationality_name"].ToString();

                return(model);
            }
            else
            {
                return(null);
            }
        }