• 大小: 949KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-21
  • 语言: C#
  • 标签: SQL  .Net  C#  

资源简介

停车场管理系统,C#实现,VS2017工程,数据库为SQL Server LocalDB。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using ParkingLotDB;

namespace ParkingLotManagement
{
    /// 
    /// Control the main form and its procedure.
    /// 

    public partial class MainForm : Form
    {
        /// 
        /// Enum used for representing diagram mode.
        /// 

        enum DiagramMode { Monthly Yearly };
        /// 
        /// Store the configuration of fee count.
        /// 

        private decimal pricePerTenMinutes;
        /// 
        /// Store all configurations‘ names.
        /// 

        private List configNames = new List();
        /// 
        /// Store all configurations‘ prices.
        /// 

        private List listPricePerTenMinutes = new List();
        /// 
        /// Store the current diagram mode.
        /// 

        private DiagramMode diagramMode;

        /// 
        /// Make a series according to the given data table.
        /// The chart type of the series will be set to line type.
        /// If the x is not found in the table its corresponding y value
        /// will be zero.
        /// 

        /// The series‘ name.
        /// The total count of points.
        /// The given data table.
        /// The series you want.
        private Series MakeSeries(string seriesName int xCount DataTable dt)
        {
            Series series = new Series(seriesName)
            {
                // Set chart type to be Line Chart.
                ChartType = SeriesChartType.Line
            };
            int rowIndex = 0;
            for (int i = 1; i <= xCount; i++)
            {
                // Find data in the dataTable.
                if(rowIndex < dt.Rows.Count && int.Parse(dt.Rows[rowIndex][1].ToString()) == i)
                {
                    series.Points.AddXY(i float.Parse(dt.Rows[rowIndex][0].ToString()));
                    rowIndex++;
                }
                // Not find.
                else
                {
                    series.Points.AddXY(i 0);
                }
            }
            return series;
        }

        /// 
        /// Initialize comboBoxConfig by adding items to it and setting
        /// its default selected item to the first one. class member variables
        /// configNames and listPricePerTenMinutes will also be initialized in
        /// this method.
        /// 

        private void InitComboBoxConfig()
        {
            tr

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-06-10 12:43  ParkingLotManagement\
     目录           0  2018-10-22 15:31  ParkingLotManagement\.git\
     文件          66  2018-04-19 21:28  ParkingLotManagement\.gitattributes
     文件        4982  2018-04-19 21:28  ParkingLotManagement\.gitignore
     文件          20  2018-06-09 23:55  ParkingLotManagement\.git\COMMIT_EDITMSG
     文件         316  2018-04-19 21:28  ParkingLotManagement\.git\config
     文件         188  2018-04-19 21:28  ParkingLotManagement\.git\description
     文件         111  2018-07-24 22:48  ParkingLotManagement\.git\FETCH_HEAD
     文件          23  2018-04-19 21:28  ParkingLotManagement\.git\HEAD
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\hooks\
     文件         478  2018-04-19 21:28  ParkingLotManagement\.git\hooks\applypatch-msg.sample
     文件         896  2018-04-19 21:28  ParkingLotManagement\.git\hooks\commit-msg.sample
     文件        3327  2018-04-19 21:28  ParkingLotManagement\.git\hooks\fsmonitor-watchman.sample
     文件         189  2018-04-19 21:28  ParkingLotManagement\.git\hooks\post-update.sample
     文件         424  2018-04-19 21:28  ParkingLotManagement\.git\hooks\pre-applypatch.sample
     文件        1642  2018-04-19 21:28  ParkingLotManagement\.git\hooks\pre-commit.sample
     文件        1348  2018-04-19 21:28  ParkingLotManagement\.git\hooks\pre-push.sample
     文件        4898  2018-04-19 21:28  ParkingLotManagement\.git\hooks\pre-rebase.sample
     文件         544  2018-04-19 21:28  ParkingLotManagement\.git\hooks\pre-receive.sample
     文件        1492  2018-04-19 21:28  ParkingLotManagement\.git\hooks\prepare-commit-msg.sample
     文件        3610  2018-04-19 21:28  ParkingLotManagement\.git\hooks\update.sample
     文件        2870  2018-06-09 23:55  ParkingLotManagement\.git\index
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\info\
     文件         240  2018-04-19 21:28  ParkingLotManagement\.git\info\exclude
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\lfs\
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\lfs\objects\
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\lfs\objects\logs\
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\lfs\tmp\
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\lfs\tmp\objects\
     目录           0  2018-04-19 21:28  ParkingLotManagement\.git\logs\
     文件         469  2018-06-09 23:55  ParkingLotManagement\.git\logs\HEAD
............此处省略237个文件信息

评论

共有 条评论