Esempio n. 1
0
        private void btDeposit_Click(object sender, EventArgs e)
        {
            GetAssociatorData();

            FormDeposit dlg = new FormDeposit();

            dlg.CardID     = m_Associator.CardID;
            dlg.Associator = m_Associator.Associator;
            double Surplus = m_Associator.Surplus;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string Employee = "";//有待修改
                string Remark   = dlg.Remark;

                if (CGlobalInstance.Instance.DbAdaHelper.AssociatorDeposit(dlg.CardID, Surplus, dlg.Value, Employee, Remark))
                {
                    MessageBox.Show("充值成功!");
                }
                else
                {
                    MessageBox.Show("充值失败!");
                }
                GetAssociatorData();
            }
        }
Esempio n. 2
0
        private void toolStripButtonReserve_Click(object sender, EventArgs e)
        {
            if (dgvMain.CurrentRow != null)
            {
                int    AssociatorID = Convert.ToInt32(dgvMain.CurrentRow.Cells["ColumnAssociatorID"].Value);
                double Surplus      = Convert.ToDouble(dgvMain.CurrentRow.Cells["ColumnSurplus"].Value);


                FormDeposit dlg = new FormDeposit();

                dlg.CardID     = dgvMain.CurrentRow.Cells["ColumnCardID"].Value.ToString();
                dlg.Associator = dgvMain.CurrentRow.Cells["ColumnAssociator"].Value.ToString();

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    string Employee = "";//有待修改
                    string Remark   = dlg.Remark;

                    if (CGlobalInstance.Instance.DbAdaHelper.AssociatorDeposit(dlg.CardID, Surplus, dlg.Value, Employee, Remark))
                    {
                        MessageBox.Show("充值成功!");
                    }
                    else
                    {
                        MessageBox.Show("充值失败!");
                    }
                }
            }
        }