private void CreateSIPOrder() { bool accountDebitStatus = false; if (!Page.IsValid) { divValidationError.Visible = true; return; } if (btnSubmit.Text == "Submit") { onlineMFOrderVo.Action = "Insert"; int retVal = 1; //commonLookupBo.IsRuleCorrect(float.Parse(txtAmount.Text), float.Parse(lblMinAmountrequiredDisplay.Text), float.Parse(txtAmount.Text), float.Parse(lblMutiplesThereAfterDisplay.Text), DateTime.Parse(lblCutOffTimeDisplay.Text)); if (retVal != 0 && retVal != 1) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('Please enter amount greater than or equal to minimum SIP amount & in mutiple of subsequent amount');", true); return; } IDictionary <string, string> sipOrderIds = new Dictionary <string, string>(); //decimal availableBalance = boOnlineOrder.GetUserRMSAccountBalance(customerVo.AccountId); string message = string.Empty; int OrderId = 0; int sipId = 0; //if (availableBalance >= Convert.ToDecimal(onlineMFOrderVo.Amount)) //{ SaveOrderDetails(); sipOrderIds = boOnlineOrder.CreateOrderMFSipDetails(onlineMFOrderVo, (BackOfficeUserId != 0) ? BackOfficeUserId : userVo.UserId); OrderId = int.Parse(sipOrderIds["OrderId"].ToString()); sipId = int.Parse(sipOrderIds["SIPId"].ToString()); //if (OrderId != 0 && !string.IsNullOrEmpty(customerVo.AccountId)) //{ // accountDebitStatus = boOnlineOrder.DebitRMSUserAccountBalance(customerVo.AccountId, -onlineMFOrderVo.Amount, OrderId); // ShowAvailableLimits(); //} //} char msgType; message = CreateUserMessage(OrderId, sipId, accountDebitStatus, retVal == 1 ? true : false, out msgType); ShowMessage(message, msgType); } else { onlineMFOrderVo.Action = "Update"; int retVal = 1; //commonLookupBo.IsRuleCorrect(float.Parse(txtAmount.Text), float.Parse(lblMinAmountrequiredDisplay.Text), float.Parse(txtAmount.Text), float.Parse(lblMutiplesThereAfterDisplay.Text), DateTime.Parse(lblCutOffTimeDisplay.Text)); if (retVal != 0 && retVal != 1) { ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('Rules defined were incorrect');", true); return; } if (retVal == 1) { ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Message", "javascript:DeleteConfirmation();", true); } List <int> OrderIds = new List <int>(); SaveOrderDetails(); //OrderIds = boOnlineOrder.CreateOrderMFSipDetails(onlineMFOrderVo, userVo.UserId); } FreezeControls(); }