Exemple #1
0
        private bool VoteProcess(EnumLibrary.IDVoteFlag voteFlag)
        {
            if (voteFlag == EnumLibrary.IDVoteFlag.None)
            {
                if (DXMessage.ShowYesNoAndTips("确定撤销上次投票结果么?") == System.Windows.Forms.DialogResult.No)
                {
                    return(false);
                }
            }
            else
            {
                var dialog = this.CreateDialog <_dialogInputVoteReason>();
                dialog.ReturnEvent += new _dialogInputVoteReason.ReturnContentToParentForm(GetVoteReason);
                dialog.ContentTitle = CTMHelper.GetIDVoteFlagName((int)voteFlag) + "理由";
                if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                {
                    return(false);
                }
            }

            _IDService.IDOperationVoteProcess(LoginInfo.CurrentUser.UserCode, ApplyNo, OperateNo, voteFlag, _reasonCategoryId, _reasonContent, this.chkAdminVeto.Checked);

            this._reasonCategoryId = -1;
            this._reasonContent    = null;

            RefreshForm();

            return(true);
        }
Exemple #2
0
        private bool VoteProcess(string formSerialNo, string buttonTag)
        {
            EnumLibrary.IDVoteFlag voteFlag = EnumLibrary.IDVoteFlag.None;

            switch (buttonTag)
            {
            case "Approval":
                voteFlag = EnumLibrary.IDVoteFlag.Approval;
                break;

            case "Oppose":
                voteFlag = EnumLibrary.IDVoteFlag.Oppose;
                break;

            case "Abstain":
                voteFlag = EnumLibrary.IDVoteFlag.Abstain;
                break;

            case "Revoke":
                voteFlag = EnumLibrary.IDVoteFlag.None;
                break;

            default:
                voteFlag = EnumLibrary.IDVoteFlag.None;
                break;
            }

            if (voteFlag == EnumLibrary.IDVoteFlag.Approval || voteFlag == EnumLibrary.IDVoteFlag.Oppose || voteFlag == EnumLibrary.IDVoteFlag.Abstain)
            {
                var dialog = this.CreateDialog <_dialogInputContent>();
                dialog.ReturnEvent += new _dialogInputContent.ReturnContentToParentForm(GetVoteReason);
                dialog.ContentTitle = CTMHelper.GetIDVoteFlagName((int)voteFlag) + "理由";
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return(false);
                }
            }
            else
            {
                if (DXMessage.ShowYesNoAndTips("确定撤销上次投票结果么?") == DialogResult.No)
                {
                    return(false);
                }
            }

            _IDService.InvestmentDecisionVoteProcess(LoginInfo.CurrentUser.UserCode, formSerialNo, voteFlag, _voteReason);

            return(true);
        }
Exemple #3
0
        public virtual void IDOperationAccuracyProcess(string investorCode, string applyNo, string operateNo, EnumLibrary.IDVoteFlag voteFlag, string reasonContent, bool isAdminVeto)
        {
            if (string.IsNullOrEmpty(reasonContent))
            {
                reasonContent = @"";
            }

            var commanText = $@"EXEC [dbo].[sp_IDOperationAccuracyProcess]
                                        @InvestorCode = '{investorCode}',
		                                @ApplyNo = '{applyNo}',
                                        @OperateNo='{operateNo}',
		                                @VoteFlag = {(int)voteFlag},
		                                @ReasonContent =N'{reasonContent}',
                                        @IsAdminVeto = {isAdminVeto}";

            _dbContext.ExecuteSqlCommand(commanText);
        }
Exemple #4
0
        public virtual void InvestmentDecisionVoteProcess(string investorCode, string formSerialNo, EnumLibrary.IDVoteFlag flag, string reason)
        {
            if (string.IsNullOrEmpty(reason))
            {
                reason = @"";
            }

            reason = reason.Replace("'", "''");

            var commanText = $@"EXEC [dbo].[sp_InvestmentDecisionVoteProcess]
                                        @InvestorCode = '{investorCode}',
		                                @FormSerialNo = '{formSerialNo}',
		                                @VoteFlag = {(int)flag},
		                                @Reason =N'{@reason}'"        ;

            _dbContext.ExecuteSqlCommand(commanText);
        }