⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accountbookform.cs

📁 《C#和.NET第一步》中的财务系统 利用三层结构做的
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Common;
namespace HomeMoney
{
	public partial class AccountBookForm : Form
	{
		private DataSet dsCurrent;
		private AccountBook accountCurrent = new AccountBook();

		public AccountBook AccountCurrent
		{
			get { return accountCurrent; }
		}
		public AccountBookForm()
		{
			InitializeComponent();
		}

		private void AccountBookForm_Load(object sender, EventArgs e)
		{
			dsCurrent = new Business.ClassInfoManager().GetClassInfos();
			DataView dw = dsCurrent.Tables[0].DefaultView;
			dw.RowFilter = "LEN(CBIItem)>0";
			this.cbType.DataSource = dw;
			this.cbType.ValueMember = "CBIItem";
		}

	private void btnOk_Click(object sender, EventArgs e)
	{
		this.accountCurrent.AMoneyType = this.cbMoneyType.SelectedItem.ToString();
		List<string> list = new List<string>();
		list.Add("股票");
		list.Add("基金");
		list.Add("国债");
		list.Add("黄金");
		if (list.Contains(cbType.SelectedValue.ToString()))
			this.accountCurrent.AType = "投资";
		else
			this.accountCurrent.AType = "收支";
		this.accountCurrent.ARemarks = this.txtRemark.Text;
		this.accountCurrent.AName = this.txtName.Text;
		this.Close();
	}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -