Beispiel #1
0
        private void toolStripButton_Add_Click(object sender, EventArgs e)
        {
            PaymentModeAdd add = new PaymentModeAdd();

            add.Owner = this;
            if (add.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Prompt.Information("操作成功,数据已添加!");
            }
        }
Beispiel #2
0
        private void toolStripButton_View_Click(object sender, EventArgs e)
        {
            if (dataGridView_PaymentMode.CurrentRow != null)
            {
                string id = dataGridView_PaymentMode.CurrentRow.Cells["ColID"].Value.ToString();

                PaymentModeAdd frmView = new PaymentModeAdd();
                frmView.Mode      = FormMode.view;
                frmView.PaymentID = id;

                frmView.ShowDialog();
            }
        }
Beispiel #3
0
        private void toolStripButton_Modify_Click(object sender, EventArgs e)
        {
            if (dataGridView_PaymentMode.CurrentRow != null)
            {
                string id = dataGridView_PaymentMode.CurrentRow.Cells["ColID"].Value.ToString();

                if (IsReference(id))
                {
                    Prompt.Warning("相应记录已被应用,无法修改");
                    return;
                }

                PaymentModeAdd frmModify = new PaymentModeAdd();
                frmModify.Mode      = FormMode.modify;
                frmModify.PaymentID = id;
                frmModify.Owner     = this;

                frmModify.ShowDialog();
            }
        }