• 大小: 14.66MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-21
  • 语言: C#
  • 标签: C#  SQL  

资源简介

源码自行车租赁系统 适合学生自主学习,C# 数据库在压缩包内

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 自行车租赁系统
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
            radioButton1.Checked = true;
            textBox1.Focus();
            this.StartPosition = FormStartPosition.CenterScreen;
        }
        public static string userId;
        private void button1_Click(object sender EventArgs e)//登录
        {
            string id = textBox1.Text.Trim();
            string pwd = textBox2.Text.Trim();
            if (id==““||pwd==““)
            {
                MessageBox.Show(“用户名或密码不能为空“);
            }
            else
            {
                if (radioButton1.Checked == true)//会员登录
                {
                    string s = string.Format(“select * from 会员表 where 账号=‘{0}‘ and 密码=‘{1}‘“ id pwd);
                    DataTable dt = SqlHelper.ExecuteDataTable(s);
                    if (dt.Rows.Count > 0)
                    {
                        MessageBox.Show(“登录成功“);
                        userId = id;
                        会员 form = new 会员();
                        form.Show();
                        textBox1.Text = ““;
                        textBox2.Text = ““; this.Hide();
                    }
                    else
                    {
                        MessageBox.Show(“用户名或密码有误“);
                    }
                }
                else if (radioButton2.Checked == true)//管理员登录
                {
                    string s = string.Format(“select * from 管理员表 where 登录账号=‘{0}‘ and 登录密码=‘{1}‘“ id pwd);
                    DataTable dt = SqlHelper.ExecuteDataTable(s);
                    if (dt.Rows.Count > 0)
                    {
                        MessageBox.Show(“登录成功“);
                        userId = id;
                        管理员 form = new 管理员();
                        form.Show();
                        textBox1.Text = ““;
                        textBox2.Text = ““; this.Hide();
                    }
                    else
                    {
                        MessageBox.Show(“用户名或密码有误“);
                    }
                }
                else if (radioButton3.Checked==true)
                {
                    string s = string.Format(“select * from 超级管理员表 where 登录账号=‘{0}‘ and 登录密码=‘{1}‘“ id pwd);
                    DataTable dt = SqlHelper.ExecuteDataTable(s);
                    if (dt.Rows.Count > 0)
                    {
                        MessageBox.Show(“登录成功“);
                        userId = id;
                        超级管理员 form = new 超级管理员();
                        form.Show();
                        textBox1.Text = ““;
                        textBox2.Text = ““; this.Hide();
                    }
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        3488  2016-06-22 16:05  51Aspx源码必读.txt
     文件         226  2016-06-22 15:52  App.config
     目录           0  2016-06-22 15:49  DB_51aspx\
     文件     3145728  2016-06-22 16:06  DB_51aspx\Bike.mdf
     文件     1048576  2016-06-22 16:06  DB_51aspx\Bike_log.ldf
     文件        9539  2015-12-09 14:41  Login.Designer.cs
     文件        3592  2015-12-09 14:41  Login.cs
     文件      154790  2015-12-09 14:41  Login.resx
     文件         503  2016-06-17 11:55  Program.cs
     目录           0  2016-06-22 15:48  Properties\
     文件        1384  2015-12-04 17:47  Properties\AssemblyInfo.cs
     文件        9334  2015-12-09 14:40  Properties\Resources.Designer.cs
     文件       12177  2015-12-09 14:40  Properties\Resources.resx
     文件        1108  2015-12-04 17:47  Properties\Settings.Designer.cs
     文件         249  2015-12-04 17:47  Properties\Settings.settings
     目录           0  2016-06-22 15:48  Resources\
     文件       50570  2015-12-08 20:13  Resources\02453108.jpg
     文件      150072  2015-12-08 20:13  Resources\10513481_102216297195_2.jpg
     文件      143214  2015-12-08 20:13  Resources\1263764_214611095048_2.jpg
     文件        7932  2015-12-08 20:13  Resources\135183871123.jpg
     文件       12568  2015-12-08 20:13  Resources\14281675.jpg
     文件       59826  2015-12-08 20:13  Resources\20101221111217_big.jpg
     文件      157250  2015-12-08 20:13  Resources\20120605143641365.jpg
     文件       70240  2015-12-08 20:13  Resources\20140101173158640.jpg
     文件      148718  2015-12-08 20:13  Resources\201503030002321029.jpg
     文件       70785  2015-12-08 20:13  Resources\202615_zxc.jpg
     文件       56752  2015-12-08 20:13  Resources\221242_IMG_0080.jpg
     文件       57916  2015-12-08 20:13  Resources\221430_IMG_0078.jpg
     文件       26558  2015-12-08 20:13  Resources\34.jpg
     文件      104042  2015-12-08 20:13  Resources\53159-12040123205873.jpg
     文件      161025  2015-12-08 20:13  Resources\6022420_231625538000_2.jpg
............此处省略89个文件信息

评论

共有 条评论