注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 AD数据库的备份与还原
 帮助
2008-09-24 12:44:11



2008-08-26 10:00:43



2008-04-01 14:36:06



2008-03-21 17:00:43
private ArrayList NonstopLines(string strStart, string strEnd)
      {
        ArrayList al = new ArrayList();
        for (int i = 0; i < busLine.Count;i++ ) //循环查找每辆直达车
        {
          BusInfo c = (BusInfo)busLine[i]; //将数组重新定义
          string[] arrLines = c.strLines.Split("-".ToCharArray());//将行车路线拆分,放进数组
          int iUpLine = BusLineName.IndexOfArray(arrLines,strStart); //公交车上下行判断
          int iDownLine = BusLineName.IndexOfArray(arrLines, strEnd);
          if (iUpLine >= 0 && iDownLine >= 0)
          {
              nonstopLine nl = new nonstopLine(); //实例化nonstopLine类
              nl.strLineName = c.strLineName; //将从数据库读出的车次信息赋给要输出的车次信息
              nl.strlineCount = Convert.ToString(Math.Abs(iUpLine-iDownLine));//计算行车站数
              string strLines = ""; //定义一个字符串变量,用来保存行车路线站点
              if (iUpLine > iDownLine)
              {
                for (int j = iUpLine; j >= iDownLine; j--)
                {
                  strLines += arrLines[j] + "-";
                }
              }
              else
              {
                for (int j = iUpLine; j <= iDownLine;j++ )
                {
                  strLines += arrLines[j] + "-";
                }
              }
              strLines = strLines.Substring(0, strLines.Length - 1); //去掉字符串最后面的"-"
              nl.strLines = strLines;
              al.Add(nl);
          }
         
        }
        return al;
      }



2007-07-10 12:54:55


类别:未分类 | 阅读全文(520) | 回复(2)      

2007-06-08 16:27:06


类别:未分类 | 阅读全文(1466) | 回复(1)      

公告

逍遥散人 的BLOG 

博客统计信息
用户名:逍遥散人
文章数:29
评论数:7
访问量:4277
无忧币:173
博客积分:244
博客等级:2
注册日期:2007-06-08
背景音乐
我的音乐

00:00 | 00:00