📄 accountbookform.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 + -