private void sendSMS(string strUserID, string strSMSMessage, string strSMSMobileNo) { clsSMS SMS = new clsSMS(strUserID); try { SMS.sendMessage(strSMSMobileNo.Trim(), strSMSMessage); } catch (Exception ex) { ClientScript.RegisterStartupScript(this.GetType(), "alrterror", "alert('error!! " + ex.Message.ToString().Replace("'", " ") + "');", true); } if (!SMS.propErrorMsg.Equals("")) { ClientScript.RegisterStartupScript(this.GetType(), "alertMsgFailed", "alert('Sending Failed " + SMS.propErrorMsg.Replace("'", " ") + "');", true); this.mdlThirdSwitchPopup.Show(); } if (!SMS.propReturnID.Equals("")) { string strMessageOuput = "You will recieve a text message to your registered mobile number. Enter the code that it contains in the Approval Code field that will appear below the portfolio that you have approved."; ClientScript.RegisterStartupScript(this.GetType(), "alertMsgSent", string.Format("alert('{0}');", strMessageOuput), true); this.mpeSecurityCodePanel.Show(); } }
//private string UpdateStatus(int intDiscretionary, int intSwitchID) //{ // if (intDiscretionary == 1 || intDiscretionary == -1) // { // clsSwitch.updateSwitchHeader(intSwitchID, clsSwitch.enumSwitchStatus.Approved, txtDescription.Text); // return clsSwitch.enumSwitchStatus.Approved.ToString(); // } // else // { // clsSwitch.updateSwitchHeader(intSwitchID, clsSwitch.enumSwitchStatus.Proposed, txtDescription.Text); // return clsSwitch.enumSwitchStatus.Proposed.ToString(); // } //} private void sendSMS(string strUserID, string strSMSMessage, string strPopupMessage, string strSMSMobileNo) { clsSMS SMS = new clsSMS(strUserID); SMS.sendMessage(strSMSMobileNo.Trim(), strSMSMessage); if (!SMS.propErrorMsg.Equals("")) { ClientScript.RegisterStartupScript(this.GetType(), "alertMsgFailed", "alert('Sending Failed " + SMS.propErrorMsg.Replace("'", " ") + "');", true); } if (!SMS.propReturnID.Equals("")) { ClientScript.RegisterStartupScript(this.GetType(), "alertMsgSent", "alert('" + strPopupMessage + "');", true); } }
private void sendSMS(int intSwitchID, string strUserID, string strSMSMessage, string strPopupMessage, string strSMSMobileNo) { clsSMS SMS = new clsSMS(strUserID); SMS.sendMessage(strSMSMobileNo.Trim(), strSMSMessage); if (!SMS.propErrorMsg.Equals("")) { ClientScript.RegisterStartupScript(this.GetType(), "alertMsgFailed", "alert('Sending Failed " + SMS.propErrorMsg.Replace("'", " ") + "');", true); } if (!SMS.propReturnID.Equals("")) { UpdateStatus(intSwitchID); ClientScript.RegisterStartupScript(this.GetType(), "alertMsgSent", "alert('" + strPopupMessage + "');window.location='SchemeListDetails.aspx';", true); } }
private bool sendSMS(string strUserID, string strSMSMessage, string strClientName, string strSMSMobileNo) { System.Text.StringBuilder sbErrorMessage; bool result = false; clsSMS SMS = new clsSMS(strUserID); if (ViewState["SMSErrorMessage"] != null) { sbErrorMessage = (System.Text.StringBuilder)ViewState["SMSErrorMessage"]; } else { sbErrorMessage = new System.Text.StringBuilder(); } SMS.sendMessage(strSMSMobileNo.Trim(), strSMSMessage); if (!SMS.propErrorMsg.Equals("")) { string strError = string.Empty; if (SMS.propErrorMsg.Contains("114") || SMS.propErrorMsg.Contains("105")) { strError = string.Format("Invalid mobile number {0} for {1}.\\n", strSMSMobileNo, strClientName); } else { strError = string.Format("{0} for {1} with Mobile No. {2} \\n", SMS.propErrorMsg, strClientName, strSMSMobileNo); } sbErrorMessage.Append(strError); ViewState["SMSErrorMessage"] = sbErrorMessage; result = false; } if (!SMS.propReturnID.Equals("")) { result = true; } return(result); }
private void sendSMS(string strUserID, string strSMSMessage, string strPopupMessage, string strSMSMobileNo) { clsSMS SMS = new clsSMS(strUserID); SMS.sendMessage(strSMSMobileNo.Trim(), strSMSMessage); if (!SMS.propErrorMsg.Equals("")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alertMsgFailed", "alert('Sending Failed " + SMS.propErrorMsg.Replace("'", " ") + "');", true); } if (!SMS.propReturnID.Equals("")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alertMsgSent", "alert('" + strPopupMessage + "');", true); } }
private bool sendSMS(string strUserID, string strSMSMessage, string strClientName, string strSMSMobileNo) { System.Text.StringBuilder sbErrorMessage; bool result = false; clsSMS SMS = new clsSMS(strUserID); if (ViewState["SMSErrorMessage"] != null) { sbErrorMessage = (System.Text.StringBuilder)ViewState["SMSErrorMessage"]; } else { sbErrorMessage = new System.Text.StringBuilder(); } SMS.sendMessage(strSMSMobileNo.Trim(), strSMSMessage); if (!SMS.propErrorMsg.Equals("")) { string strError = string.Empty; if (SMS.propErrorMsg.Contains("114") || SMS.propErrorMsg.Contains("105")) { strError = string.Format("Invalid mobile number {0} for {1}.\\n", strSMSMobileNo, strClientName); } else { strError = string.Format("{0} for {1} with Mobile No. {2} \\n", SMS.propErrorMsg, strClientName, strSMSMobileNo); } sbErrorMessage.Append(strError); ViewState["SMSErrorMessage"] = sbErrorMessage; result = false; } if (!SMS.propReturnID.Equals("")) { result = true; } return result; }