C#Winform窗体的,Access数据库,家庭财务管理系统
增加收入项目时,当选择银行转账时,银行卡的余额会增加。家庭财务管理系统,C#Winform窗体的,Access数据库。就是需要定义收入记录表里的银行转账时的银行卡号与银行卡表里的银行卡号相对应,且收入记录里收入了多少金额,银行卡里就增加多少金额。谁可以告诉我一下代码怎么写?在这段代码里怎么添加?/// <summary>
/// 确定对话框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnOK_Click(object sender, EventArgs e)
{
if (!this._ReadOnly)
{
this._Record.Amount = (decimal)this.nudAmout.Value;
this._Record.BankCard = this.cmbBankCard.Text;
this._Record.IncomType = this.cmbType.Text;
if (string.IsNullOrEmpty(this._Record.IncomType))
{
MessageBox.Show(this, "请从列表中选择收入方式!", "提示",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
this._Record.IncomUsage = this.cmbUsage.Text;
if (string.IsNullOrEmpty(this._Record.IncomUsage))
{
MessageBox.Show(this, "请从列表中选择收入来源", "提示",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
this._Record.IncomTime = this.dtpInTime.Value;
this._Record.Description = this.rtbDes.Text.Trim( );
this._Record.RecordTime = DateTime.Now;
}
this.DialogResult = DialogResult.OK;
}
private void cmbUsage_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
} Access Winform 源代码 --------------------编程问答-------------------- 根据你的代码很难写来
private void cmbUsage_SelectedIndexChanged(object sender, EventArgs e)
{
if(cmbUsage.Text == "银行转账")
{
增加余额//nudAmout.Value?
}
}
补充:.NET技术 , C#