Beispiel #1
0
        protected void btnInitiateApprovalProcess_Click(object sender, EventArgs e)
        {
            if (ValidationInput())
            {
                ViewState["Action"] = "Approval";

                #region Save Initailly

                if (_bankAccountDepositID <= 0)
                {
                    SaveACBankAccountDepositEntity();
                }

                #endregion

                #region Approval Process

                Boolean apResult = APRobot.CreateApprovalProcessForNewBankDeposit(_bankAccountDepositID, Int64.Parse(ddlAPPanelID.SelectedValue));

                if (apResult == true)
                {
                    MiscUtil.ShowMessage(lblMessage, "Approval Process Submited successfully.", UIConstants.MessageType.GREEN);
                    //String NavigationUrl = UrlHelper.BuildSecureUrl("~/REQ/REQRequisitionList.aspx", string.Empty).ToString();
                    //Response.Redirect(NavigationUrl);
                    _bankAccountDepositID = 0;

                    String str = (String)ViewState["Action"].ToString();

                    if (str == "Approval")
                    {
                        _BankAccountDepositID       = 0;
                        _ACBankAccountDepositEntity = new ACBankAccountDepositEntity();
                        PrepareInitialView();
                        PrepareInitialViewDepositeItem();
                        CurrentACBankAccountDepositItemList = new List <ACBankAccountDepositItem_DetailedEntity>();
                        BindACBankAccountDepositItemList();
                        BuildTotalValueLabel();
                        hypReportLink.Visible = false;
                    }
                }
                else
                {
                    MiscUtil.ShowMessage(lblMessage, "Failed to Submit Approval Process.", UIConstants.MessageType.RED);
                }

                EnableDisableApprovalProcessCheck();

                #endregion
            }
        }