• 大小: 278KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-05
  • 语言: C#
  • 标签: C#  股票交易  

资源简介

使用C#实现的模拟股票交易系统,有图形界面和数据库支持!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;

namespace StockApp
    {
    class AddMarketInfo
        {

        public static void addMarketInfo(string stockKindDouble tradePricestring tradeTime)
            {
            OleDbConnection myConn = null;
            try
                {
                string strCon = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Market.accdb“;
                myConn = new OleDbConnection(strCon);
                string insert = “INSERT INTO Market(stockKindtradePricetradeTime) values(‘“;
                insert += stockKind + “‘‘“;
                insert += tradePrice.ToString() + “‘‘“;
                insert += tradeTime + “‘)“;

                OleDbCommand comm = new OleDbCommand();
                comm.CommandText = insert;
                comm.Connection = myConn;
                myConn.Open();
                comm.ExecuteNonQuery();
                }
            catch (Exception ex)
                {
                System.Console.WriteLine(ex.ToString());
                }
            finally
                {
                myConn.Close();
                }
            
            }
        }
    }

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-12-19 02:31  StockAppFianl\
     目录           0  2011-12-19 05:29  StockAppFianl\StockApp\
     文件         866  2011-12-19 02:09  StockAppFianl\StockApp.sln
     文件       39424  2011-12-19 15:13  StockAppFianl\StockApp.suo
     文件        1278  2011-12-19 02:12  StockAppFianl\StockApp\AddMarketInfo.cs
     文件        1437  2011-12-19 02:20  StockAppFianl\StockApp\AddUserTrade.cs
     目录           0  2011-12-19 00:57  StockAppFianl\StockApp\bin\
     目录           0  2011-12-19 12:26  StockAppFianl\StockApp\bin\Debug\
     文件      716800  2011-12-19 05:43  StockAppFianl\StockApp\bin\Debug\Market.accdb
     文件       33280  2011-12-19 12:25  StockAppFianl\StockApp\bin\Debug\StockApp.exe
     文件       79360  2011-12-19 12:25  StockAppFianl\StockApp\bin\Debug\StockApp.pdb
     文件       11600  2011-12-19 12:26  StockAppFianl\StockApp\bin\Debug\StockApp.vshost.exe
     文件         490  2010-03-17 22:39  StockAppFianl\StockApp\bin\Debug\StockApp.vshost.exe.manifest
     文件      692224  2011-12-19 05:42  StockAppFianl\StockApp\bin\Debug\User.accdb
     文件      716800  2011-12-19 05:43  StockAppFianl\StockApp\bin\Debug\UserInfo.accdb
     文件      720896  2011-12-19 05:43  StockAppFianl\StockApp\bin\Debug\UserTradeList.accdb
     目录           0  2011-12-19 00:57  StockAppFianl\StockApp\bin\Release\
     文件        2901  2011-12-19 05:30  StockAppFianl\StockApp\ClassDiagram1.cd
     文件        2629  2011-12-19 05:39  StockAppFianl\StockApp\LoginForm.cs
     文件        5642  2011-12-19 05:39  StockAppFianl\StockApp\LoginForm.Designer.cs
     文件        5817  2011-12-19 05:39  StockAppFianl\StockApp\LoginForm.resx
     文件        2906  2011-12-19 04:02  StockAppFianl\StockApp\MainForm.cs
     文件       21096  2011-12-19 04:02  StockAppFianl\StockApp\MainForm.Designer.cs
     文件        5817  2011-12-19 04:02  StockAppFianl\StockApp\MainForm.resx
     文件      716800  2011-12-19 05:20  StockAppFianl\StockApp\Market.accdb
     文件         950  2011-12-19 05:59  StockAppFianl\StockApp\MarketForm.cs
     文件        2811  2011-12-19 05:59  StockAppFianl\StockApp\MarketForm.Designer.cs
     文件        5817  2011-12-19 05:59  StockAppFianl\StockApp\MarketForm.resx
     文件        2861  2011-12-19 05:56  StockAppFianl\StockApp\MarketForm_A.cs
     文件        3043  2011-12-19 04:05  StockAppFianl\StockApp\MarketForm_A.Designer.cs
     文件        5817  2011-12-19 04:05  StockAppFianl\StockApp\MarketForm_A.resx
............此处省略42个文件信息

评论

共有 条评论