基本信息
源码名称:账单记录小工具(无数据库)
源码大小:14.14M
文件格式:.zip
开发语言:C#
更新时间:2022-02-13
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 8 元 
   源码介绍

账单记录小工具(无数据库)

记录日常 收支

 public partial class Form1 : Form
    {
       private BillServices bs;
        public Form1()
        {
            InitializeComponent();
            dateTimePicker2.Value = dateTimePicker2.Value.AddDays(1);
            bs = new BillServices(); 
        }

        private List<Bill> bill;
        private void button1_Click(object sender, EventArgs e)
        {
            bill =  bs.Search(Convert.ToDateTime( dateTimePicker1.Value.ToString("D")), Convert.ToDateTime(dateTimePicker2.Value.ToString("D")), comboBox1.Text, textBox1.Text);
            label6.Text = bill.Where(t => t.Type == "支出").Sum(t => t.Money).ToString();
            label7.Text = bill.Where(t => t.Type == "收入").Sum(t => t.Money).ToString();
            dataGridView1.DataSource = Tools.Tool.ToDataTable(bill);

        }

        private void button2_Click(object sender, EventArgs e)
        {
            FrmBill fmb = new FrmBill(); 
            fmb.StartPosition = FormStartPosition.CenterParent;
            fmb.SetBillServices(bs, Tools.DoType.新增);
            if (fmb.ShowDialog()==DialogResult.OK)
            {
                button1_Click(null, null);
            }
            fmb.Dispose();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count!=1)
            {
                MessageBox.Show("请选择一行"); return;
            }
            Bill b = new Bill();
            b.Id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value);
            b.Type = Convert.ToString(dataGridView1.SelectedRows[0].Cells["Type"].Value);
            b.Detail = Convert.ToString(dataGridView1.SelectedRows[0].Cells["Detail"].Value);
            b.Money = Convert.ToDecimal(dataGridView1.SelectedRows[0].Cells["Money"].Value);
            b.Instraction = Convert.ToString(dataGridView1.SelectedRows[0].Cells["Instraction"].Value);

            FrmBill fmb = new FrmBill(); 
            fmb.StartPosition = FormStartPosition.CenterParent;
            fmb.SetBillServices(bs, Tools.DoType.修改,b);
            if (fmb.ShowDialog() == DialogResult.OK)
            {
                button1_Click(null, null);
            }
            fmb.Dispose();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count != 1)
            {
                MessageBox.Show("请选择一行"); return;
            } 
            int id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value); 
            if (MessageBox.Show("确认删除?", "此删除不可恢复", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                bs.DeleteAsync(id);
                button1_Click(null, null);
            }
        } 
    }

.
├── BalancePayments
│   ├── BalancePayments
│   │   ├── App.config
│   │   ├── BalancePayments.csproj
│   │   ├── Form1.Designer.cs
│   │   ├── Form1.cs
│   │   ├── Form1.resx
│   │   ├── FrmBill.Designer.cs
│   │   ├── FrmBill.cs
│   │   ├── FrmBill.resx
│   │   ├── Models
│   │   │   ├── Bill.cs
│   │   │   └── OutPut.cs
│   │   ├── Program.cs
│   │   ├── Properties
│   │   │   ├── AssemblyInfo.cs
│   │   │   ├── Resources.Designer.cs
│   │   │   ├── Resources.resx
│   │   │   ├── Settings.Designer.cs
│   │   │   └── Settings.settings
│   │   ├── Services
│   │   │   └── BillServices.cs
│   │   ├── Tools
│   │   │   ├── Common.cs
│   │   │   ├── Log.cs
│   │   │   └── Tool.cs
│   │   ├── bin
│   │   │   ├── Data
│   │   │   │   └── Bill.json
│   │   │   ├── Debug
│   │   │   │   ├── BalancePayments.exe
│   │   │   │   ├── BalancePayments.exe.config
│   │   │   │   ├── BalancePayments.pdb
│   │   │   │   ├── BalancePayments.vshost.exe
│   │   │   │   ├── BalancePayments.vshost.exe.config
│   │   │   │   ├── Newtonsoft.Json.dll
│   │   │   │   └── Newtonsoft.Json.xml
│   │   │   └── Release
│   │   ├── obj
│   │   │   └── Debug
│   │   │       ├── BalancePayments.Form1.resources
│   │   │       ├── BalancePayments.FrmBill.resources
│   │   │       ├── BalancePayments.Properties.Resources.resources
│   │   │       ├── BalancePayments.csproj.FileListAbsolute.txt
│   │   │       ├── BalancePayments.csproj.GenerateResource.Cache
│   │   │       ├── BalancePayments.csprojResolveAssemblyReference.cache
│   │   │       ├── BalancePayments.exe
│   │   │       ├── BalancePayments.pdb
│   │   │       ├── DesignTimeResolveAssemblyReferences.cache
│   │   │       ├── DesignTimeResolveAssemblyReferencesInput.cache
│   │   │       ├── TempPE
│   │   │       ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│   │   │       ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│   │   │       └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│   │   └── packages.config
│   ├── BalancePayments.sln
│   └── packages
│       ├── Newtonsoft.Json.13.0.1
│       │   ├── LICENSE.md
│       │   ├── Newtonsoft.Json.13.0.1.nupkg
│       │   └── lib
│       │       ├── net20
│       │       │   ├── Newtonsoft.Json.dll
│       │       │   └── Newtonsoft.Json.xml
│       │       ├── net35
│       │       │   ├── Newtonsoft.Json.dll
│       │       │   └── Newtonsoft.Json.xml
│       │       ├── net40
│       │       │   ├── Newtonsoft.Json.dll
│       │       │   └── Newtonsoft.Json.xml
│       │       ├── net45
│       │       │   ├── Newtonsoft.Json.dll
│       │       │   └── Newtonsoft.Json.xml
│       │       ├── netstandard1.0
│       │       │   ├── Newtonsoft.Json.dll
│       │       │   └── Newtonsoft.Json.xml
│       │       ├── netstandard1.3
│       │       │   ├── Newtonsoft.Json.dll
│       │       │   └── Newtonsoft.Json.xml
│       │       └── netstandard2.0
│       │           ├── Newtonsoft.Json.dll
│       │           └── Newtonsoft.Json.xml
│       ├── SunnyUI.3.1.1
│       │   ├── LICENSE
│       │   ├── SunnyUI.3.1.1.nupkg
│       │   ├── SunnyUI.png
│       │   └── lib
│       │       ├── net40
│       │       │   └── SunnyUI.dll
│       │       ├── net472
│       │       │   └── SunnyUI.dll
│       │       ├── net5.0-windows7.0
│       │       │   └── SunnyUI.dll
│       │       └── net6.0-windows7.0
│       │           └── SunnyUI.dll
│       └── SunnyUI.Common.3.1.0
│           ├── LICENSE
│           ├── SunnyUI.Common.3.1.0.nupkg
│           ├── SunnyUI.png
│           └── lib
│               ├── net40
│               │   └── SunnyUI.Common.dll
│               ├── net472
│               │   └── SunnyUI.Common.dll
│               ├── net5.0
│               │   └── SunnyUI.Common.dll
│               ├── net6.0
│               │   └── SunnyUI.Common.dll
│               ├── netcoreapp3.1
│               │   └── SunnyUI.Common.dll
│               └── netstandard2.1
│                   └── SunnyUI.Common.dll
└── 账单记录小工具(无数据库).rar

37 directories, 76 files