コード例 #1
0
ファイル: ClientForm.cs プロジェクト: BillTheBest/opencbs
        private void btnWriteOff_Click(object sender, EventArgs e)
        {
            //if (Confirm("ConfirmWriteOff.Text"))
            //    WriteOff();
            int writeOffMethodId;
            var dialogResult = new WriteOffOkCancelForm().ShowDialogWrappe(out writeOffMethodId);

            if (dialogResult != DialogResult.Cancel)
                WriteOff(writeOffMethodId);
        }
コード例 #2
0
ファイル: ClientForm.cs プロジェクト: himmelreich-it/opencbs
        private void btnWriteOff_Click(object sender, EventArgs e)
        {
            if (_credit == null) return;
            try
            {
                var form = new WriteOffOkCancelForm();
                var loanService = ServiceProvider.GetContractServices();
                form.ShowWriteOffOptions(loanService.GetWriteOffOptions());

                if (form.ShowDialog() != DialogResult.OK) return;

                WriteOff(form.OptionId, form.Comment);
            }
            catch (Exception ex)
            {
                new frmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog();
                return;
            }
        }