• 大小: 153KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-13
  • 语言: 其他
  • 标签:

资源简介

日常事务管理系统,里面功能挺全面的,适合初学者借鉴。

资源截图

代码片段和文件信息

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

namespace 日常事务管理系统
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            textBox2.Text = DateTime.Now.ToShortDateString();

        }

        private void Form1_Load(object sender EventArgs e)
        {

        }

        private void radioButton1_CheckedChanged(object sender EventArgs e)
        {
            comboBox1.Items.Clear();
            if (radioButton2.Checked == true)
            {
                comboBox1.Items.Add(“生活费用“);
                comboBox1.Items.Add(“医疗费用“);
                comboBox1.Items.Add(“其他费用“);
            }
            else
            {
                comboBox1.Items.Add(“工作收入“);
                comboBox1.Items.Add(“投资收益“);
                comboBox1.Items.Add(“其他收入“);
            }
            comboBox1.SelectedIndex = 0;
        }

        private void button1_Click(object sender EventArgs e)
        {
            string s_收支类型 = null;
            string date = textBox2.Text;
            string s_收支类别 = comboBox1.Text.Trim();
            string declare = textBox1.Text.Trim();
            string s_收支项目 = listBox1.Text.Trim();
            int mony = Convert.ToInt32(textBox3.Text.Trim());
            string b_备注 = richTextBox1.Text.Trim();

            if (radioButton1.Checked == true)
            {
                s_收支类型 = radioButton1.Text;
            }
            else if(radioButton2.Checked == true)
            {
                s_收支类型 = radioButton2.Text;
            }
          
            string connString = (“Server=(local);Integrated Security=SSPI;database=zlg“);
            SqlConnection conn = new SqlConnection(connString);//定义一个数据连接实例

            string MyInsert = String.Format(“insert into 财务表( s_收支类型s_收支类别 date dedares_收支项目 money b_备注)values(‘{0}‘‘{1}‘‘{2}‘‘{3}‘‘{4}‘‘{5}‘‘{6}‘)“ s_收支类型 s_收支类别 date declare s_收支项目 mony b_备注);

            try
            {
                conn.Open();
                SqlCommand MyCommand = new SqlCommand(MyInsert conn);
                int count = MyCommand.ExecuteNonQuery();
                if (count > 0)
                {
                    MessageBox.Show(“添加财务信息成功!“ “添加成功“ MessageBoxButtons.OK MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show(“添加财务信息失败!“ “添加失败“ MessageBoxButtons.OK MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message “操作数据库出错!请重新输入信息!“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);

            }
            finally
            {
            

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-11-08 20:41  日常事务管理系统\
     目录           0  2017-11-08 20:41  日常事务管理系统\日常事务管理系统\
     文件         187  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\App.config
     文件       11408  2016-12-16 22:32  日常事务管理系统\日常事务管理系统\Form1.Designer.cs
     文件        4950  2016-12-16 22:32  日常事务管理系统\日常事务管理系统\Form1.cs
     文件        5817  2016-12-16 22:32  日常事务管理系统\日常事务管理系统\Form1.resx
     文件         543  2016-12-12 17:19  日常事务管理系统\日常事务管理系统\Program.cs
     目录           0  2017-11-08 20:41  日常事务管理系统\日常事务管理系统\Properties\
     文件        1372  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\Properties\AssemblyInfo.cs
     文件        2900  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\Properties\Resources.Designer.cs
     文件        5612  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\Properties\Resources.resx
     文件        1111  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\Properties\Settings.Designer.cs
     文件         249  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\Properties\Settings.settings
     目录           0  2017-11-08 20:41  日常事务管理系统\日常事务管理系统\bin\
     目录           0  2017-11-08 20:41  日常事务管理系统\日常事务管理系统\bin\Debug\
     文件       44544  2016-12-18 11:24  日常事务管理系统\日常事务管理系统\bin\Debug\日常事务管理系统.exe
     文件         187  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\bin\Debug\日常事务管理系统.exe.config
     文件      114176  2016-12-18 11:24  日常事务管理系统\日常事务管理系统\bin\Debug\日常事务管理系统.pdb
     文件       24224  2016-12-18 11:24  日常事务管理系统\日常事务管理系统\bin\Debug\日常事务管理系统.vshost.exe
     文件         187  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\bin\Debug\日常事务管理系统.vshost.exe.config
     文件         490  2012-06-02 22:34  日常事务管理系统\日常事务管理系统\bin\Debug\日常事务管理系统.vshost.exe.manifest
     目录           0  2018-04-13 10:20  日常事务管理系统\日常事务管理系统\bin\Release\
     目录           0  2017-11-08 20:41  日常事务管理系统\日常事务管理系统\obj\
     目录           0  2017-11-08 20:41  日常事务管理系统\日常事务管理系统\obj\Debug\
     文件        1453  2016-12-08 10:35  日常事务管理系统\日常事务管理系统\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7112  2016-12-16 23:04  日常事务管理系统\日常事务管理系统\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     目录           0  2018-04-13 10:20  日常事务管理系统\日常事务管理系统\obj\Debug\TempPE\
     文件           0  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2016-12-08 08:07  日常事务管理系统\日常事务管理系统\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     文件         180  2016-12-16 22:32  日常事务管理系统\日常事务管理系统\obj\Debug\日常事务管理系统.Form1.resources
............此处省略45个文件信息

评论

共有 条评论

相关资源