public object GetCcredit(string strCno)
    {
        if (string.IsNullOrEmpty(strCno))
        {
            return(null);
        }

        MySQLBase sqlBase = new MySQLBase();

        try
        {
            string strSQL = "select Ccredit from Course where Cno='" + strCno + "'";
            sqlBase.Connect();
            object objValue = sqlBase.GetValue(strSQL, null);
            return(objValue);
        }
        catch (System.Exception ex)
        {
            return(null);
        }
        finally
        {
            if (sqlBase.HasConnected())
            {
                sqlBase.DisConnect();
            }
        }
    }
    //=======================================
    //根据Sno获取对应的Image
    public bool GetImage(string strSno, out byte[] image)
    {
        image = null;
        if (string.IsNullOrEmpty(strSno))
            return false;

        MySQLBase sqlBase = new MySQLBase();
        try
        {
            //strSno不为空
            sqlBase.Connect();
            string strSQL = "select Simage from Student where Sno='"+strSno+"'";
            object objValue = sqlBase.GetValue(strSQL, null);//获取Image
            if (Convert.IsDBNull(objValue) || objValue == null)
                return false;
            image = (byte[])objValue;
            return true;
        }
        catch (System.Exception ex)
        {
            return false;
        }
        finally
        {
            if (sqlBase.HasConnected())
                sqlBase.DisConnect();
        }
    }
    //=======================================
    //根据Sno获取对应的Image
    public bool GetImage(string strSno, out byte[] image)
    {
        image = null;
        if (string.IsNullOrEmpty(strSno))
        {
            return(false);
        }

        MySQLBase sqlBase = new MySQLBase();

        try
        {
            //strSno不为空
            sqlBase.Connect();
            string strSQL   = "select Simage from Student where Sno='" + strSno + "'";
            object objValue = sqlBase.GetValue(strSQL, null);//获取Image
            if (Convert.IsDBNull(objValue) || objValue == null)
            {
                return(false);
            }
            image = (byte[])objValue;
            return(true);
        }
        catch (System.Exception ex)
        {
            return(false);
        }
        finally
        {
            if (sqlBase.HasConnected())
            {
                sqlBase.DisConnect();
            }
        }
    }
    public object GetCcredit(string strCno)
    {
        if (string.IsNullOrEmpty(strCno))
            return null;

        MySQLBase sqlBase = new MySQLBase();
        try
        {
            string strSQL = "select Ccredit from Course where Cno='" + strCno + "'";
            sqlBase.Connect();
            object objValue = sqlBase.GetValue(strSQL, null);
            return objValue;
        }
        catch (System.Exception ex)
        {
            return null;
        }
        finally
        {
            if (sqlBase.HasConnected())
                sqlBase.DisConnect();
        }
    }