大家能不能帮我一下,它说的梦到考试是什么意思思啊,又是怎样操作的。。。急啊 明天就考试啦 谢谢啦

我要的作文里面要用好习惯和坏习惯的词组,能不能帮我下,明天考试啊_百度知道
我要的作文里面要用好习惯和坏习惯的词组,能不能帮我下,明天考试啊
我要作文哈帮帮啊面要习惯坏习惯初二作文<img class="word-replace" src="/api/getdecpic?picenc=0ad-60字
提问者采纳
家坏习惯肯定少吧我比:玩游戏机课差粗……想必些习惯许吧且些坏习惯给我坏处给我处
先说说游戏吧我玩游戏课都专家想着要才能闯关所我作业没完绩急速降咯期末考试考我灰我才发现要努力要玩游戏我知道努力呢
课差决能宽容课差师渐渐冷落我我反应师却理我没看见我我举手发言师总叫别叫我于我暗暗决我定要听课让师再冷落我要差我知道课要注意听讲呢
粗让我造影响我却着粗习惯真让我太烦恼考试我粗结虽<img class="word-replace" src="/api/getdecpic?picenc=0a006c655f我注意100真遗憾我重没考<img class="word-replace" src="/api/getdecpic?picenc=0af0我真觉遗憾要粗我改掉各坏习惯呢
些坏习惯虽给我带烦恼我能改掉几坏习惯高兴我坏习惯
我泼朗男孩我都太粗粗酿错
比说忘带笔袋课向同处借笔;吃饭忘带勺向别借;家忘带钥匙家门口干等着……止师批评我爸爸妈妈说我我想改我总改总粗
我粗连累同事情:几星期前午我往吃完饭走进教室我教室看见同都拥李伟课桌我凑原发期《少报》我顺手抢份我自座位始写作业李健没拿《少报》便挨向同询问没拿报纸询问我我专致志写作业便假思索说:没拿
真巧我作业太没间休息《少报》我碰都没碰第二我拿起《少报》才想起昨报纸没看我顺手翻哗声面掉份报纸我看脸刷红原我拿份我真想立刻告诉李健念我脚黏住想:我说李健误解哎错错谁让我粗反张报纸没起我保持沉默
第二知道谁说李健向师说件事师新给李健份报纸批评发报纸李伟我真想立刻师前讲明白午同告诉我发报纸李伟发报纸差错班主任狠狠批评顿撤掉宣传委员职位换其顿种惭愧意油我粗使李伟师批评师骂我真起我再没机帮李伟澄清谁让我粗向李健讲清楚连串问题连串紧紧揪着我……
同习惯力量巨旦养种习惯自觉轨道运行习惯则终身受益;要坏习惯知觉辈同定要染我坏习惯要记住我管任何情况都能粗管做事都要细细再细粗害自连累同
英语作文,OK?‘
Habits have a great effect on a person&#39;s life.So in order to improve our living standard,we should develop more good habits,such as going to bed early,washing hands before meals and doing exercises in the morning .
However,some bad habits can spoil our lives,for example,smoking and staying up late at night,which are bad for a perpon&#39;health.
Therefore,possessing good habits can people enjoy life better,why not change your bad nabits into possitive ones?
其他类似问题
坏习惯的相关知识
按默认排序
其他1条回答
我要的是作文
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁随笔 - 237&
文章 - 35&
评论 - 849&
&&&&&&&&&&&
将此文章发布到首页是想让大家帮助我找到问题所在,所以恳请DuDu别把我文章给转移区域!!小弟先谢过了!!
我做了个在线测试的系统。答题时是用Ajax技术来向一个数据处理页ashx页页面发送答案,然后在该ashx页面通过存储过程对答案进行提交。当本系统初次使用的时候50人考试没有任何问题,不过,自从第一次使用之后,就出现了如下的现象:
&&&&在内存512M的2003服务器系统下,人数少的的时候使用本系统进行答题时不会出现问题,可是当人数超过10左右时就会出现这样或那样的问题。或者说&#8220;某某表不存在&#8221;,或者说DataReader未关闭。可是我已经仔细研究了代码,我认为能优化的地方都已经优化了。现在实在找不出解决办法了,吐血了都快,希望大家快帮帮我啊!
我所用到的操作类的部分主要代码是这样的:
&&1using&S
&&2using&System.D
&&3using&System.Data.SqlC
&&4using&System.T
&&6namespace&DataAccess
&&8&&&&public&class&dbControl
&10&&&&&&&&private&static&dbControl&m_objDBcontrol&=&null;
&12&&&&&&&&private&static&string&strS//数据库连接字符串
&13&&&&&&&&private&SqlConnection&myConn&=&null;
&15&&&&&&&&构造函数#region&构造函数
&16&&&&&&&&private&dbControl()
&17&&&&&&&&{
&18&&&&&&&&&&&&myConn&=&new&SqlConnection(strSql);
&19&&&&&&&&}
&20&&&&&&&&#endregion
&22&&&&&&&&实例化数据库操作对象#region&实例化数据库操作对象
&23&&&&&&&&/**////&&summary&
&24&&&&&&&&///&实例化数据库操作对象
&25&&&&&&&&///&&/summary&
&26&&&&&&&&///&&param&name="connectionString"&连接数据库的字符串&/param&
&27&&&&&&&&///&&returns&数据库控制对象&/returns&
&28&&&&&&&&public&static&dbControl&GetDBOpterator(string&connectionString)
&29&&&&&&&&{
&30&&&&&&&&&&&&try
&31&&&&&&&&&&&&{
&32&&&&&&&&&&&&&&&&if&(m_objDBcontrol&==&null)
&33&&&&&&&&&&&&&&&&{
&34&&&&&&&&&&&&&&&&&&&&strSql&=&connectionS
&35&&&&&&&&&&&&&&&&&&&&m_objDBcontrol&=&new&dbControl();
&36&&&&&&&&&&&&&&&&}
&37&&&&&&&&&&&&&&&&return&m_objDB
&38&&&&&&&&&&&&}
&39&&&&&&&&&&&&catch&(Exception&ex)
&40&&&&&&&&&&&&{
&41&&&&&&&&&&&&&&&&throw&(ex);
&42&&&&&&&&&&&&}
&43&&&&&&&&}
&44&&&&&&&&#endregion
&46&&&&&&&&通过带有参数的Sql语句获取DataReader[推荐使用此方法],&SqlLDataReader类型#region&通过带有参数的Sql语句获取DataReader[推荐使用此方法],&SqlLDataReader类型
&47&&&&&&&&/**////&&summary&
&48&&&&&&&&///&通过带有参数的SQL语句获取SqlDataReader对象
&49&&&&&&&&///&&/summary&
&50&&&&&&&&///&&param&name="strSql"&带有参数的SQL语句,如:"select&*&from&Sample&where&id=@id"&/param&
&51&&&&&&&&///&&param&name="paramsArr"&可以是一个参数数组&/param&
&52&&&&&&&&///&&returns&SqlDataReader对象&/returns&
&53&&&&&&&&public&SqlDataReader&get_Reader(string&strSql,&params&&SqlParameter[]&paramArray)
&54&&&&&&&&{
&55&&&&&&&&&&&&SqlCommand&myCmd&=&new&SqlCommand();
&56&&&&&&&&&&&&//添加SqlCommand对象的参数
&57&&&&&&&&&&&&foreach&(SqlParameter&temp&in&paramArray)
&58&&&&&&&&&&&&{
&59&&&&&&&&&&&&&&&&myCmd.Parameters.Add(temp);
&60&&&&&&&&&&&&}
&62&&&&&&&&&&&&//利用SqlCommand对象的ExecuteReader()方法获取SqlDataR
&63&&&&&&&&&&&&try
&64&&&&&&&&&&&&{
&65&&&&&&&&&&&&&&&&myCmd.Connection&=&myC
&66&&&&&&&&&&&&&&&&mandText&=&strS
&67&&&&&&&&&&&&&&&&ConnectionManage(true);
&68&&&&&&&&&&&&&&&&return&myCmd.ExecuteReader(CommandBehavior.CloseConnection);
&69&&&&&&&&&&&&}
&70&&&&&&&&&&&&catch&(Exception&ex)
&71&&&&&&&&&&&&{
&72&&&&&&&&&&&&&&&&throw&(ex);
&73&&&&&&&&&&&&}
&74&&&&&&&&&&&&finally
&75&&&&&&&&&&&&{
&76&&&&&&&&&&&&&&&&myCmd.Dispose();
&77&&&&&&&&&&&&}
&78&&&&&&&&}
&79&&&&&&&&#endregion
&81&&&&&&&&通过带有参数的Sql语句获取DataTable[推荐使用此方法],返回值:DataTable类型#region&通过带有参数的Sql语句获取DataTable[推荐使用此方法],返回值:DataTable类型
&82&&&&&&&&/**////&&summary&
&83&&&&&&&&///&通过带有参数的Sql语句获取DataTable[推荐使用此方法]
&84&&&&&&&&///&&/summary&
&85&&&&&&&&///&&param&name="strSql"&含参数的带有查询功能的Sql语句
&86&&&&&&&&///&&/param&
&87&&&&&&&&///&&param&name="paramArray"&&/param&
&88&&&&&&&&///&&returns&DataTable对象&/returns&
&89&&&&&&&&public&DataTable&get_DataTable(string&strSql,&params&SqlParameter[]&paramArray)
&90&&&&&&&&{
&91&&&&&&&&&&&&DataTable&dtTemp&=&new&DataTable();
&92&&&&&&&&&&&&SqlCommand&myCmd&=&new&SqlCommand();
&93&&&&&&&&&&&&SqlDataAdapter&myDataAdapter&=&null;
&94&&&&&&&&&&&&try
&95&&&&&&&&&&&&{
&96&&&&&&&&&&&&&&&&myCmd.Connection&=&myC
&97&&&&&&&&&&&&&&&&mandText&=&strS
&99&&&&&&&&&&&&&&&&//添加SqlCommand对象的参数
<span style="color: #0&&&&&&&&&&&&&&&&foreach&(SqlParameter&temp&in&paramArray)
<span style="color: #1&&&&&&&&&&&&&&&&{
<span style="color: #2&&&&&&&&&&&&&&&&&&&&myCmd.Parameters.Add(temp);
<span style="color: #3&&&&&&&&&&&&&&&&}
<span style="color: #4
<span style="color: #5&&&&&&&&&&&&&&&&myDataAdapter&=&new&SqlDataAdapter(myCmd);
<span style="color: #6&&&&&&&&&&&&&&&&ConnectionManage(true);
<span style="color: #7&&&&&&&&&&&&&&&&myDataAdapter.Fill(dtTemp);
<span style="color: #8&&&&&&&&&&&&&&&&return&dtT
<span style="color: #9&&&&&&&&&&&&}
<span style="color: #0&&&&&&&&&&&&catch&(Exception&ex)
<span style="color: #1&&&&&&&&&&&&{
<span style="color: #2&&&&&&&&&&&&&&&&throw&(ex);
<span style="color: #3&&&&&&&&&&&&}
<span style="color: #4&&&&&&&&&&&&finally
<span style="color: #5&&&&&&&&&&&&{
<span style="color: #6&&&&&&&&&&&&&&&&ConnectionManage(false);
<span style="color: #7&&&&&&&&&&&&&&&&myDataAdapter.Dispose();
<span style="color: #8&&&&&&&&&&&&&&&&dtTemp.Dispose();
<span style="color: #9&&&&&&&&&&&&&&&&myCmd.Dispose();
<span style="color: #0&&&&&&&&&&&&}
<span style="color: #1&&&&&&&&}
<span style="color: #2&&&&&&&&#endregion
<span style="color: #3
<span style="color: #4&&&&&&&&执行返回值不是表的的存储过程#region&&执行返回值不是表的的存储过程
<span style="color: #5&&&&&&&&/**////&&summary&
<span style="color: #6&&&&&&&&///&执行&返回值不是表的且无参数的存储过程
<span style="color: #7&&&&&&&&///&&/summary&
<span style="color: #8&&&&&&&&///&&param&name="str_ProcudureName"&存储过程名&/param&
<span style="color: #9&&&&&&&&///&&returns&返回该存储过程影响的行数&/returns&
<span style="color: #0&&&&&&&&public&int&sp_Execute(string&str_ProcudureName)
<span style="color: #1&&&&&&&&{
<span style="color: #2&&&&&&&&&&&&SqlCommand&myCmd&=&new&SqlCommand();
<span style="color: #3&&&&&&&&&&&&try
<span style="color: #4&&&&&&&&&&&&{
<span style="color: #5&&&&&&&&&&&&&&&&mandText&=&str_ProcudureN
<span style="color: #6&&&&&&&&&&&&&&&&mandType&=&CommandType.StoredP
<span style="color: #7&&&&&&&&&&&&&&&&myCmd.Connection&=&myC
<span style="color: #8&&&&&&&&&&&&&&&&ConnectionManage(true);
<span style="color: #9&&&&&&&&&&&&&&&&return&myCmd.ExecuteNonQuery();
<span style="color: #0&&&&&&&&&&&&}
<span style="color: #1&&&&&&&&&&&&catch&(Exception&ex)
<span style="color: #2&&&&&&&&&&&&{
<span style="color: #3&&&&&&&&&&&&&&&&throw&(ex);
<span style="color: #4&&&&&&&&&&&&}
<span style="color: #5&&&&&&&&&&&&finally
<span style="color: #6&&&&&&&&&&&&{
<span style="color: #7&&&&&&&&&&&&&&&&myCmd.Dispose();
<span style="color: #8&&&&&&&&&&&&&&&&ConnectionManage(false);
<span style="color: #9&&&&&&&&&&&&}
<span style="color: #0&&&&&&&&}
<span style="color: #1&&&&&&&&#endregion
<span style="color: #2
<span style="color: #3&&&&&&&&执行返回值为单个数据表的存储过程#region&执行返回值为单个数据表的存储过程
<span style="color: #4&&&&&&&&/**////&&summary&
<span style="color: #5&&&&&&&&///&执行带有参数的存储过程
<span style="color: #6&&&&&&&&///&如果该存储过程返回数据表,则返回值为数据表
<span style="color: #7&&&&&&&&///&否则,返回该存储过程影响的行数
<span style="color: #8&&&&&&&&///&&/summary&
<span style="color: #9&&&&&&&&///&&param&name="str_ProcudureName"&存储过程名称&/param&
<span style="color: #0&&&&&&&&///&&param&name="paramArray"&参数数组&/param&
<span style="color: #1&&&&&&&&///&&returns&DataTable对象&/returns&
<span style="color: #2&&&&&&&&public&Object&sp_Execute(string&str_ProcudureName,&sp_ReturnType&returnType,&params&SqlParameter[]&paramArray)
<span style="color: #3&&&&&&&&{
<span style="color: #4&&&&&&&&&&&&SqlParameter&s&=&new&SqlParameter();
<span style="color: #5&&&&&&&&&&&&SqlCommand&myCmd&=&new&SqlCommand();
<span style="color: #6&&&&&&&&&&&&SqlDataAdapter&myDataA
<span style="color: #7&&&&&&&&&&&&try
<span style="color: #8&&&&&&&&&&&&{
<span style="color: #9&&&&&&&&&&&&&&&&mandText&=&str_ProcudureN
<span style="color: #0&&&&&&&&&&&&&&&&mandType&=&CommandType.StoredP
<span style="color: #1&&&&&&&&&&&&&&&&foreach&(SqlParameter&temp&in&paramArray)
<span style="color: #2&&&&&&&&&&&&&&&&{
<span style="color: #3&&&&&&&&&&&&&&&&&&&&myCmd.Parameters.Add(temp);
<span style="color: #4&&&&&&&&&&&&&&&&}
<span style="color: #5
<span style="color: #6&&&&&&&&&&&&&&&&ConnectionManage(true);
<span style="color: #7
<span style="color: #8&&&&&&&&&&&&&&&&myCmd.Connection&=&myC
<span style="color: #9&&&&&&&&&&&&&&&&//返回值为DataTable
<span style="color: #0&&&&&&&&&&&&&&&&if&(returnType&==&sp_ReturnType.DataTable)
<span style="color: #1&&&&&&&&&&&&&&&&{
<span style="color: #2&&&&&&&&&&&&&&&&&&&&myDataAdapter&=&new&SqlDataAdapter(myCmd);
<span style="color: #3
<span style="color: #4&&&&&&&&&&&&&&&&&&&&DataTable&dtTemp&=&new&DataTable();
<span style="color: #5&&&&&&&&&&&&&&&&&&&&myDataAdapter.Fill(dtTemp);
<span style="color: #6&&&&&&&&&&&&&&&&&&&&if&(dtTemp&!=&null)
<span style="color: #7&&&&&&&&&&&&&&&&&&&&&&&&return&dtT
<span style="color: #8&&&&&&&&&&&&&&&&&&&&else
<span style="color: #9&&&&&&&&&&&&&&&&&&&&&&&&return&null;
<span style="color: #0&&&&&&&&&&&&&&&&}
<span style="color: #1&&&&&&&&&&&&&&&&else
<span style="color: #2&&&&&&&&&&&&&&&&{
<span style="color: #3&&&&&&&&&&&&&&&&&&&&//返回值为受影响的行数
<span style="color: #4&&&&&&&&&&&&&&&&&&&&return&myCmd.ExecuteNonQuery();
<span style="color: #5&&&&&&&&&&&&&&&&}
<span style="color: #6&&&&&&&&&&&&}
<span style="color: #7&&&&&&&&&&&&catch&(Exception&ex)
<span style="color: #8&&&&&&&&&&&&{
<span style="color: #9&&&&&&&&&&&&&&&&throw&
<span style="color: #0&&&&&&&&&&&&}
<span style="color: #1&&&&&&&&&&&&finally
<span style="color: #2&&&&&&&&&&&&{
<span style="color: #3&&&&&&&&&&&&&&&&myCmd.Dispose();
<span style="color: #4&&&&&&&&&&&&&&&&ConnectionManage(false);
<span style="color: #5&&&&&&&&&&&&}
<span style="color: #6&&&&&&&&}
<span style="color: #7&&&&&&&&#endregion
<span style="color: #8
<span style="color: #9&&&&&&&&执行具有输出参数的存储过程[我用的就是此方法!!]#region&执行具有输出参数的存储过程[我用的就是此方法!!]
<span style="color: #0&&&&&&&&/**////&&summary&
<span style="color: #1&&&&&&&&///&执行带有输出参数的存储过程
<span style="color: #2&&&&&&&&///&&/summary&
<span style="color: #3&&&&&&&&///&&param&name="str_ProcudureName"&存储过程名称&/param&
<span style="color: #4&&&&&&&&///&&param&name="outParam"&输出参数的名称&/param&
<span style="color: #5&&&&&&&&///&&param&name="paramArray"&参数数组&/param&
<span style="color: #6&&&&&&&&///&&returns&Object类型&/returns&
<span style="color: #7&&&&&&&&public&object&sp_Execute(string&str_ProcudureName,&string&outParam,&params&SqlParameter[]&paramArray)
<span style="color: #8&&&&&&&&{
<span style="color: #9&&&&&&&&&&&&SqlCommand&myCmd&=&new&SqlCommand();
<span style="color: #0&&&&&&&&&&&&try
<span style="color: #1&&&&&&&&&&&&{
<span style="color: #2&&&&&&&&&&&&&&&&mandText&=&str_ProcudureN
<span style="color: #3&&&&&&&&&&&&&&&&mandType&=&CommandType.StoredP
<span style="color: #4&&&&&&&&&&&&&&&&foreach&(SqlParameter&temp&in&paramArray)
<span style="color: #5&&&&&&&&&&&&&&&&{
<span style="color: #6&&&&&&&&&&&&&&&&&&&&myCmd.Parameters.Add(temp);
<span style="color: #7&&&&&&&&&&&&&&&&}
<span style="color: #8
<span style="color: #9&&&&&&&&&&&&&&&&ConnectionManage(true);
<span style="color: #0&&&&&&&&&&&&&&&&myCmd.Connection&=&myC
<span style="color: #1&&&&&&&&&&&&&&&&myCmd.ExecuteNonQuery();
<span style="color: #2&&&&&&&&&&&&&&&&return&myCmd.Parameters[outParam].V
<span style="color: #3&&&&&&&&&&&&}
<span style="color: #4&&&&&&&&&&&&catch&(Exception&ex)
<span style="color: #5&&&&&&&&&&&&{
<span style="color: #6&&&&&&&&&&&&&&&&throw&(ex);
<span style="color: #7&&&&&&&&&&&&}
<span style="color: #8&&&&&&&&&&&&finally
<span style="color: #9&&&&&&&&&&&&{
<span style="color: #0&&&&&&&&&&&&&&&&myCmd.Dispose();
<span style="color: #1&&&&&&&&&&&&&&&&ConnectionManage(false);
<span style="color: #2&&&&&&&&&&&&}
<span style="color: #3&&&&&&&&}
<span style="color: #4&&&&&&&&#endregion
<span style="color: #5
<span style="color: #6&&&&&&&&Connection对象处理#region&Connection对象处理
<span style="color: #7
<span style="color: #8&&&&&&&&/**////&&summary&
<span style="color: #9&&&&&&&&///&关于对Connection对象的处理
<span style="color: #0&&&&&&&&///&&/summary&
<span style="color: #1&&&&&&&&///&&param&name="IsOpen"&True:打开,False:关闭&/param&
<span style="color: #2&&&&&&&&private&void&ConnectionManage(bool&IsOpen)
<span style="color: #3&&&&&&&&{
<span style="color: #4&&&&&&&&&&&&if&(IsOpen&==&true)
<span style="color: #5&&&&&&&&&&&&{
<span style="color: #6&&&&&&&&&&&&&&&&if&(myConn.State&!=&ConnectionState.Open)
<span style="color: #7&&&&&&&&&&&&&&&&{
<span style="color: #8&&&&&&&&&&&&&&&&&&&&myConn.Open();
<span style="color: #9&&&&&&&&&&&&&&&&}
<span style="color: #0&&&&&&&&&&&&}
<span style="color: #1&&&&&&&&&&&&else&if&(IsOpen&==&false)
<span style="color: #2&&&&&&&&&&&&{
<span style="color: #3&&&&&&&&&&&&&&&&if&(myConn.State&!=&ConnectionState.Closed)
<span style="color: #4&&&&&&&&&&&&&&&&{
<span style="color: #5&&&&&&&&&&&&&&&&&&&&myConn.Close();
<span style="color: #6&&&&&&&&&&&&&&&&}
<span style="color: #7&&&&&&&&&&&&}
<span style="color: #8&&&&&&&&}
<span style="color: #9
<span style="color: #0&&&&&&&&#endregion
<span style="color: #1
<span style="color: #2&&&&}
<span style="color: #3}
<span style="color: #4
然后我调用该类时这样调用:在一个基类中生成该对象,然后各个需要进行数据库操作的页面继承此基类
<span style="color: #&protected&dbControl&objDB&=&dbControl.GetDBOpterator(System.Configuration.ConfigurationManager.ConnectionStrings["HDHTTestOnline_ConnectionString"].ConnectionString);
连接字符串是这样的:
<span style="color: #&connectionStrings&
<span style="color: #&&&&&&&&&add&name="TestOnline_ConnectionString"&connectionString="server=192.168.0.79;database=TestOuser=password="/&
<span style="color: #&&/connectionStrings&
以下是答题页面的代码:
答题页面我是这样设计的:每道题目上有一个&#8220;保存&#8221;按钮,用户需要每答一题点击一次它,点击保存按钮时触发如下事件:
&1&postTarget="PaperDealHandler.ashx?questionid="&+&escape(questionid)&+&"&answer="&+&escape(answer);
&2&&&&&&&&&&&&
&3&&&&&&&&&&&&//将要处理的题目的ID及其答案提交到数据处理程序中
&4&&&&&&&&&&&&var&wRequest=new&Sys.Net.WebRequest();
&5&&&&&&&&&&&&wRequest.set_url(postTarget);
&6&&&&&&&&&&&&wRequest.set_httpVerb("POST");
&7&&&&&&&&&&&&
&8&&&&&&&&&&&&timer=window.setTimeout("showSaving()",timelength);//设置timelength秒之后显示"正在保存"的timeout
&9&&&&&&&&&&&&
<span style="color: #&&&&&&&&&&&&wRequest.add_completed(OnWebRequestCompleted);//提交完成时的事件
<span style="color: #&&&&&&&&&&&&wRequest.invoke();
以下是ashx页面的数据处理的代码:
&2&&&&&&&&&&&&{
&3&&&&&&&&&&&&&&&&string&RecruId&=&context.Session["RecruId"].ToString();//招聘ID
&4&&&&&&&&&&&&&&&&string&TestID&=&context.Session["TestID"].ToString();//测试ID
&5&&&&&&&&&&&&&&&&string&PaperID&=&context.Session["PaperID"].ToString();//试卷ID
&6&&&&&&&&&&&&&&&&string&StuID&=&context.Session["StuID"].ToString();//考生编号
&8&&&&&&&&&&&&&&&&//Session["lastTime"]用来保存考生上次提交试题的时间
&9&&&&&&&&&&&&&&&&if&(Session["lastTime"]&!=&null)
<span style="color: #&&&&&&&&&&&&&&&&{
<span style="color: #&&&&&&&&&&&&&&&&&&&&DateTime&dtBegin&=&DateTime.Parse(Session["lastTime"].ToString());
<span style="color: #&&&&&&&&&&&&&&&&&&&&DateTime&dtEnd&=&DateTime.N
<span style="color: #
<span style="color: #&&&&&&&&&&&&&&&&&&&&TimeSpan&
<span style="color: #&&&&&&&&&&&&&&&&&&&&ts&=&dtEnd.Subtract(dtBegin);
<span style="color: #
<span style="color: #&&&&&&&&&&&&&&&&&&&&SqlParameter[]&spTimeSpan&=&new&SqlParameter[<span style="color: #];
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@RecruID",&RecruId);
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@TestID",&TestID);
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@PaperID",&PaperID);
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@StuID",&StuID);
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@SpentHours",&ts.Hours);
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@SpentMinutes",&ts.Minutes);
<span style="color: #&&&&&&&&&&&&&&&&&&&&spTimeSpan[<span style="color: #]&=&new&SqlParameter("@SpentSeconds",&ts.Seconds);
<span style="color: #
<span style="color: #&&&&&&&&&&&&&&&&&&&&objDB.sp_Execute("pro_stuAnswerTime",&DataAccess.dbControl.sp_ReturnType.AffectedRowsCount,&spTimeSpan);
<span style="color: #&&&&&&&&&&&&&&&&&&&&//重新将当前时间同仁给Session["lastTime"];
<span style="color: #&&&&&&&&&&&&&&&&&&&&Session["lastTime"]&=&DateTime.Now.ToString();
<span style="color: #&&&&&&&&&&&&&&&&}
<span style="color: #
<span style="color: #&&&&&&&&&&&&&&&&SqlParameter[]&spTemp&=&new&SqlParameter[<span style="color: #];
<span style="color: #&&&&&&&&&&&&&&&&spTemp[<span style="color: #]&=&new&SqlParameter("@RecruID",&RecruId);
<span style="color: #&&&&&&&&&&&&&&&&spTemp[<span style="color: #]&=&new&SqlParameter("@TestID",&TestID);
<span style="color: #&&&&&&&&&&&&&&&&spTemp[<span style="color: #]&=&new&SqlParameter("@PaperID",&PaperID);
<span style="color: #&&&&&&&&&&&&&&&&spTemp[<span style="color: #]&=&new&SqlParameter("@StuID",&StuID);
<span style="color: #&&&&&&&&&&&&&&&&spTemp[<span style="color: #]&=&new&SqlParameter("@QuestionID",&QuestionID);
<span style="color: #&&&&&&&&&&&&&&&&spTemp[<span style="color: #]&=&new&SqlParameter("@AnswerInfo",&Answer);
<span style="color: #
<span style="color: #&&&&&&&&&&&&&&&&int&i&=&(int)objDB.sp_Execute("pro_InsertStuAnswer",&DataAccess.dbControl.sp_ReturnType.AffectedRowsCount,&spTemp);
<span style="color: #
pro_InsertStuAnswer存储过程的代码:
&2&&存储过程名:pro_InsertStuAnswer
&3&&输入参数:
&4&&&&@RecruID&招聘ID
&5&&&&@TestID&&考试ID
&6&&&&@PaperID&试卷ID
&7&&&&@StuID&&&考生ID
&8&&&&@QuestionID&问题ID
&9&&&&@AnswerInfo&问题答案
<span style="color: #&&输出参数:
<span style="color: #&&&&@@ROWCOUNT&&&&操作影响的行数
<span style="color: #&&用途:
<span style="color: #&&对某生的某次考试的成绩的添加和修改
<span style="color: #*/
<span style="color: #
<span style="color: #CREATE&PROCEDURE&dbo.pro_InsertStuAnswer
<span style="color: #&&&&@RecruID&int,
<span style="color: #&&&&@TestID&int,
<span style="color: #&&&&@PaperID&int,
<span style="color: #&&&&@StuID&int,
<span style="color: #&&&&@QuestionID&bigint,
<span style="color: #&&&&@AnswerInfo&varchar(<span style="font-weight: color: #)
<span style="color: #&&&&
<span style="color: #AS
<span style="color: #&&&&if&(select&count(*)&from&&tb_StuAnswers&where&RecruID=@RecruID&and&&TestID=@TestID&and&PaperID=@PaperID&and&StuID=@StuID&and&QuestionID=@QuestionID)=<span style="font-weight: color: #
<span style="color: #&&&&&&&&begin
<span style="color: #&&&&&&&&&&&&--没有记录,则向表中插入该条记录
<span style="color: #&&&&&&&&&&&&insert&into&Tb_StuAnswers(RecruID,TestID,PaperID,StuID,QuestionID,AnswerInfo)&values(@RecruID,@TestID,@PaperID,@StuID,@QuestionID,@AnswerInfo);
<span style="color: #&&&&&&&&end
<span style="color: #&&&&else
<span style="color: #&&&&&&&&begin
<span style="color: #&&&&&&&&--数据库已有该记录,则说明考生为修改答案
<span style="color: #&&&&&&&&&&&&update&Tb_StuAnswers&set&AnswerInfo=@AnswerInfo&where&&RecruID=@RecruID&and&&TestID=@TestID&and&PaperID=@PaperID&and&StuID=@StuID&and&QuestionID=@QuestionID&&&&
<span style="color: #&&&&&&&&end
<span style="color: #&&&&return&@@ROWCOUNT;
<span style="color: #&&&&RETURN
<span style="color: #GO
<span style="color: #
<span style="color: #&protected&dbControl&objDB&=&dbControl.GetDBOpterator(System.Configuration.ConfigurationManager.ConnectionStrings["HDHTTestOnline_ConnectionString"].ConnectionString);
阅读(...) 评论()}

我要回帖

更多关于 apec是什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信