/// <summary>修改收支记录</summary> private void btnModify_Click(object sender, EventArgs e) { if (this.dgvWasteBook.CurrentRow != null) { decimal dWbId = decimal.Parse(this.dgvWasteBook.CurrentRow.Cells[0].Value.ToString()); frmWasteBook objfrmWasteBook = new frmWasteBook(dWbId); if (objfrmWasteBook.ShowDialog() == DialogResult.OK) { this.LoadWasteBookList(); } //if (objWasteBook.Type == "e") //{ // //支出 // frmExpend objfrmExpend = new frmExpend(dWbId); // DialogResult = objfrmExpend.ShowDialog(); //} //else if (objWasteBook.Type == "i") //{ // //收入 // frmIncome objfrmIncome = new frmIncome(dWbId); // DialogResult = objfrmIncome.ShowDialog(); //} //if (DialogResult == DialogResult.OK) //{ // this.LoadWasteBookList(); //} } }
/// <summary>新增收入</summary> private void btnIncome_Click(object sender, EventArgs e) { frmWasteBook objfrmWasteBook = new frmWasteBook("i"); if (objfrmWasteBook.ShowDialog() == DialogResult.OK) { this.LoadWasteBookList(); } }