• 大小: 1.84MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-04
  • 语言: 其他
  • 标签: 交易系统  

资源简介

实现了交易的各种情况,一方发出订单,一方接受订单,一方取消订单,合同终止。

资源截图

代码片段和文件信息

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;
using System.Data.SqlClient;
using System.Configuration;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button4_Click(object sender EventArgs e)
        {

        }

        private void button3_Click(object sender EventArgs e)//跳转到另外的窗口
        {
            //Form2 form2 = new Form2();
            //form2.TopLevel = false; // 这一步最重要 去除子窗体的顶级窗体设置
            //form2.Parent = this.panel1; // 子窗体的父容器
            //form2.FormBorderstyle = FormBorderstyle.None; // 去边框标题栏等
            //form2.Dock = Dockstyle.Fill; // 填充
            //form2.Show();


            Form2 frm2 = new Form2();
            //  this.Hide();
            if (frm2.ShowDialog() == DialogResult.OK)
            {
                this.Show();
            }
        }

        private void button4_Click_1(object sender EventArgs e)//取消登陆界面
        {
            this.Close();
        }

        private void button1_Click(object sender EventArgs e)//登录按钮,检验并连接数据库匹配帐号
        {
            if (textBox1 .Text .Trim ()!=““ &&textBox2 .Text .Trim ()!=““ )
            {
                string sqlconnstr = ConfigurationManager.ConnectionStrings[“ConnectionString“].ToString();
                SqlConnection cn = new SqlConnection(sqlconnstr);
                SqlCommand cmd = new SqlCommand();
                cmd.Connection = cn;
                cn.Open();
             if (radioButton1.Checked )
             {
                cmd.CommandText = “select * from customer where c_no=@no and c_pw=@pw“;
                cmd.Parameters.AddWithValue(“@no“ textBox1.Text.Trim());
                cmd.Parameters.AddWithValue(“@pw“ textBox2.Text.Trim());
                SqlDataReader sdr = cmd.ExecuteReader();
                int t = 0;
                while (sdr.Read())
                {
                    t++;
                }
                if (t > 0)
                {
               //     MessageBox.Show(“找到该用户“);
                    cmd = null;
                    cn.Close();
                    cn = null;
                    yhForm frm = new yhForm(textBox1.Text.Trim());
                    this.Hide();
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        this.Show();
                    }

                }
                else
                {
                    MessageBox.Show(“用户名或密码错误,请重新输入“);

                }
            }////////////////////////////////if
             else   if (radioButton2.Checked)
             {
                 cmd.CommandText = “select * from gys where g_no=@no and g_pw=@pw“;
                 cmd.Paramet

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-06-25 16:27  软工2012-6-25\
     目录           0  2012-06-14 14:54  软工2012-6-25\WindowsFormsApplication1\
     目录           0  2012-06-14 14:54  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\
     文件         962  2012-05-25 06:24  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1.sln
     文件       54272  2012-06-21 00:36  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1.suo
     文件        1048  2012-06-11 10:34  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\App.config
     目录           0  2012-06-14 14:54  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\
     目录           0  2012-06-14 14:54  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\
     文件     2293760  2012-06-11 11:07  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MyDatabase.mdf
     文件      573440  2012-06-11 11:07  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MyDatabase_log.ldf
     文件      333824  2012-06-11 11:04  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
     文件        1048  2012-06-11 10:34  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
     文件      820736  2012-06-11 11:04  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
     文件       11592  2012-06-20 22:09  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
     文件        1048  2012-06-11 10:34  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
     文件         490  2007-07-21 01:33  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
     文件        6083  2012-06-05 09:13  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
     文件        8589  2012-06-05 09:13  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
     文件        5814  2012-06-05 09:13  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
     文件        6174  2012-06-11 10:35  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs
     文件       11231  2012-05-29 12:59  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form2.Designer.cs
     文件        5814  2012-05-29 12:59  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx
     文件        8949  2012-06-05 08:59  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs
     文件       12431  2012-06-05 08:59  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form3.Designer.cs
     文件        8354  2012-06-05 08:59  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\Form3.resx
     文件       13604  2012-06-11 12:49  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\gysForm.cs
     文件       20551  2012-06-11 12:49  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\gysForm.Designer.cs
     文件        7103  2012-06-11 12:49  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\gysForm.resx
     文件        4018  2012-06-11 11:04  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\gysxgForm.cs
     文件       10423  2012-06-05 08:41  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\gysxgForm.Designer.cs
     文件        5814  2012-06-05 08:41  软工2012-6-25\WindowsFormsApplication1\WindowsFormsApplication1\gysxgForm.resx
............此处省略47个文件信息

评论

共有 条评论