您现在的位置: 无忧电子商务网 >> 信息学院 >> 程序开发 >> asp.net >> 正文

ASP.NET开发员工业绩评测中心(3)

作者:作者:崔…    信息学院来源:网络收集    点击数:    更新时间:2006-8-28 我要参与讨论

       (以下源代码不排版)
  
    源代码编译环境:安装Visual Studio.net 7.0,SqlServer2000
  
    源代码1(前台评测主页面):
  
  //建立数据库连接,取出bigRules表数据放入ds中
  SqlConnection conn = new SqlConnection(“server=localhost;uid=sa;pwd=;database=ygpc”;
  SqlCommand comm. = new SqlCommand(“select * from bigRules”,conn);
  SqlDataAdapter da = new SqlDataAdapter(comm);
  DataSet ds;
  da.Fill(ds,”bigRules”);
  int nTotalBig = ds.Tables[“bigRules”].Rows.Count;
  int k = Convert.ToInt32(ds.Tables["bigRules"].Rows[0]["bigID"].ToString());
  
  for(int iBig=0;k<=Convert.ToInt32(ds.Tables["bigRules"].Rows[nTotalBig-1]["bigID"].ToString());k=Convert.ToInt32(ds.Tables["bigRules"].Rows[iBig]["ID"].ToString()))
  //iBig代表bigRules表中行值,k代表iBig行对应的ID值
  {
   string commText = "Select * from smallRules where bigID="+k+"order by id";
   SqlCommand commSmall = new SqlCommand(commText,conn);
   SqlDataAdapter daSmall = new SqlDataAdapter(commSmall);
   if(ds1!=null) ds1.Clear();
   ds1 = new DataSet();//每次循环都需要更新ds1中记录的细则数据
   daSmall.Fill(ds1,"smallRules");
   int nTotalRows = ds1.Tables["smallRules"].Rows.Count;
   int i=Convert.ToInt32(ds1.Tables["smallRules"].Rows[0]["ID"].ToString());
   string str = "select * from score where
    _testPersonID="+testID+"and testedPersonID="+testedID+"and month="+curMon+" and smallID="+i;
   //判断当前被测员工当月是否已有过成绩,即检查score表中是否有与testedID, testID,curMon相符
   //的记录,判断结果为true或false存入hidTested隐藏控件中,
   // 在显示”黄框”以往成绩时起到作用,略
   for(int z=0;i<=Convert.ToInt32(ds1.Tables["smallRules"]
    _.Rows[nTotalRows-1][“ID”].ToString());
   i=Convert.ToInt32(ds1.Tables[“smallRules”].Rows[z][“ID”].ToString()))
   //z代表smallRules中的行值,i代表z行的ID值,需要找出i值对应的score表的"成绩"值
   { 
    HtmlTableRow tr = new HtmlTableRow();
    array.SetValue(indexPageRow++,i);
    //array为静态数组,记录每个i值在页面上的对应行,
    // 因为各项评测smallRules经过后台不断的增,删,改,其ID值与页面上的行并不对应
    for(int j=0;j<ds1.Tables["smallRules"].Columns.Count;j++)
    {
     HtmlTableCell tc = new HtmlTableCell();
     if(j==0)//当前范围的零行零列
     {
      if(i == Convert.ToInt32(ds1.Tables["smallRules"].Rows[0]["ID"].ToString()))
      {
       //最左的细则分类列,注意从bigRules表中取数据
       tc.InnerHtml = s.Tables["bigRules"].Rows[iBig][j+1].ToString()+
              _ds.Tables["bigRules"].Rows[iBig]["totalS

[1] [2] [3] 下一页

在google里搜索更多ASP.NET开发员工业绩评测中心(3)

Google
Web www.51ec.org
  • 上一篇信息学院:

  • 下一篇信息学院:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    我来说两句 对此文章发表了评论
      昵 称: *必填    ·注册用户·
      评 分: 1分 2分 3分 4分 5分     严禁发表危害国家安全、政治、黄色淫秽等内容的评论,用户需对自己在使用本网站服务过程中的行为承担法律责任。本站管理员有权保留或删除评论内容,评论内容只代表机友个人观点,与本网站立场无关。  
    评 论
    内 容

     
    评论列表 (最新 评论仅限网友观点!)

    供求信息




    | 设为首页 | 加入收藏 | 关于我们 | 广告服务 | 联系方式 | 友情链接 | 版权申明