Exemple #1
0
        //删除成绩
        //输入:
        //      XUserID - 用户编号;
        //输出:
        //      删除成功:返回True;
        //      删除失败:返回False;
        public bool DeleteByStr(int SID)
        {
            SqlParameter[] Params = new SqlParameter[1];

            DataBase DB = new DataBase();
            string strsql = "DELETE FROM Scoretb WHERE ID = @ID";
            Params[0] = DB.MakeInParam("@ID", SqlDbType.Int, 4, SID);               //成绩编号

            int Count = -1;
            Count = DB.ProcStr(strsql, Params);
            if (Count > 0)
                return true;
            else return false;
        }
Exemple #2
0
        //我是周浩----我是周浩
        //更新试卷是否评阅的状态
        public bool UpdateByProc(string XUserID, int XPaperID, string Xstate)
        {
            SqlParameter[] Params = new SqlParameter[3];

            DataBase DB = new DataBase();
            string strsql = "UPDATE UserAnswertb SET state= @state WHERE UserID = @UserID and PaperID= @PaperID";
            Params[0] = DB.MakeInParam("@UserID", SqlDbType.VarChar, 50, XUserID);
            Params[1] = DB.MakeInParam("@PaperID", SqlDbType.Int, 4, XPaperID);
            Params[2] = DB.MakeInParam("@state", SqlDbType.VarChar, 50, Xstate);

            int Count = -1;
            Count = DB.ProcStr(strsql, Params);
            if (Count > 0)
                return true;
            else return false;
        }