Beispiel #1
0
 private void AddMoneyLog(object sender, EventArgs e)
 {
     using (JMoneyLogInputF dialog = new JMoneyLogInputF())
     {
         //dialog.ShowDialog();
         dialog.DisplayThis(null, updateMoneyInfo);
     }
 }
Beispiel #2
0
        private void EditMoneyLog(object sender, EventArgs e)
        {
            int col = dgvMoneyLog.CurrentCell.ColumnIndex;
            int row = dgvMoneyLog.CurrentCell.RowIndex;


            int index = dgvMoneyLog.CurrentRow.Index;
            int i     = (int)dgvMoneyLog.Rows[index].Cells["SerialNo"].Value;

            using (JMoneyLogInputF dialog = new JMoneyLogInputF())
            {
                dialog.DisplayThis(new JMoneyLog()
                {
                    SerialNo = (int)dgvMoneyLog.Rows[index].Cells["SerialNo"].Value,
                    Date     = (DateTime)dgvMoneyLog.Rows[index].Cells["Date"].Value,
                    Type     = (string)dgvMoneyLog.Rows[index].Cells["Type"].Value,
                    Item     = (string)dgvMoneyLog.Rows[index].Cells["Item"].Value,
                    Amount   = (int)dgvMoneyLog.Rows[index].Cells["Amount"].Value,
                    Source   = (string)dgvMoneyLog.Rows[index].Cells["Source"].Value,
                    Target   = (string)dgvMoneyLog.Rows[index].Cells["Target"].Value,
                    Remark   = (string)dgvMoneyLog.Rows[index].Cells["Remark"].Value
                }, updateMoneyInfo);
            }
        }