protected void btnMandateSubmit_Click(object sender, EventArgs e) { string userMessage = string.Empty; string BSEMessage = string.Empty; char msgtype = 's'; bool result = false; OnlineMFOrderBo onlineMFOrderBo = new OnlineMFOrderBo(); int mandateId = 0; AdviserStaffSMTPBo advstaffsmtpbo = new AdviserStaffSMTPBo(); if (txtCustomerId.Value != "0") { if (ddlBankName.SelectedItem.ToString().Length > 40) { result = advstaffsmtpbo.BSEMandateCreate(txtClientCode.Text, lblgetcust.Text, Convert.ToDouble(txtAmount.Text), ddlBankName.SelectedItem.ToString().Substring(0, 40), txtBBranch.Text, userVo.UserId, out BSEMessage, out mandateId); } else { result = advstaffsmtpbo.BSEMandateCreate(txtClientCode.Text, lblgetcust.Text, Convert.ToDouble(txtAmount.Text), ddlBankName.SelectedItem.ToString(), txtBBranch.Text, userVo.UserId, out BSEMessage, out mandateId); } if (result) { int OrderId = onlineMFOrderBo.CreateMandateOrder(int.Parse(txtCustomerId.Value.ToString()), Convert.ToDouble(txtAmount.Text), int.Parse(ddlBankName.SelectedValue), txtBBranch.Text, userVo.UserId, mandateId, txtBankAccount.Text, txtIFSC.Text); if (OrderId != 0) { userMessage = BSEMessage + " " + "Order Reference Number is: " + OrderId.ToString(); msgtype = 'S'; freezeControls(); trNewOrder.Visible = true; } else { userMessage = "Order cannot be processed"; msgtype = 'F'; } } else { userMessage = BSEMessage; msgtype = 'F'; } ShowMessage(userMessage, msgtype); } }