private void ConfirmationPushtoSender(string sSMSSender, string message) { try { string Fullmessage = string.Empty; if (sSMSSender.Length > 11 || sSMSSender.Length == 11) { sSMSSender = sSMSSender.Replace("+880", "0"); } else { return; } SmsSubmitPdu pdu; pdu = new SmsSubmitPdu(message, sSMSSender.Trim(), ""); ModemCommunication.gsObj.SendMessage(pdu); DataSqlQuery aDaCommonquery = new DataSqlQuery(); aDaCommonquery.TradeConfirmedStatusUpdate(sSMSSender.Trim()); SendMessageloadConsolApplicationtDesign("0", sSMSSender, message); } catch (Exception) { throw; } }
private void MoneyTrans_ConfirmationPushtoSender(string sSMSSender, string Message, int SMSID) { try { if (sSMSSender.Length > 11 || sSMSSender.Length == 11) { sSMSSender = sSMSSender.Replace("+880", "0"); } else { return; } // Send an SMS message SmsSubmitPdu pdu; // The straightforward version pdu = new SmsSubmitPdu(Message, sSMSSender.Trim(), ""); // "" indicate SMSC No ModemCommunication.gsObj.SendMessage(pdu); //string CurrentDateTime = String.Format("{0:dd-MMM-yyyy HH:mm:ss tt}", System.DateTime.Now); DataSqlQuery oDACommonQuery = new DataSqlQuery(); oDACommonQuery.MoneyTransSMS_StatusUpdate(SMSID); } catch (Exception exc) { //MessageBox.Show(exc.Message); } }
private string getIPOInformation(string Cust_Code) { string cnn = SMS_Constant.CallCenter_ConnectionString; string[] ParendChild = null; string CustCode = string.Empty; string ShortCode = string.Empty; string TradeAccountBalance = string.Empty; string IPOAccountBalance = string.Empty; string IPOBalance = string.Empty; DataSqlQuery dataQuery = new DataSqlQuery(); SqlConnection conn = new SqlConnection(cnn); DataSet oDataSet = new DataSet(); SqlDataAdapter SQLDbAdapter = new SqlDataAdapter(); string query = "Select Sess.Company_Short_Code as Short_Code,Convert(decimal(28,0),ROUND((Sess.TotalAmount),2)) as TotalAmount,'" + Cust_Code + "' as Cust_Code,Convert(decimal(28,2),ROUND((Select t.Balance from tbl_Customer_Account as t where t.Cust_Code='" + Cust_Code + "'),2)) AS TradeAcc_Balance,Convert(decimal(28,2),ROUND(ISNULL((Select t.Balance from tbl_Customer_IPO_Account as t where t.Cust_Code='" + Cust_Code + "'),0),2)) AS IPOAcc_Balance from [dbksclCallCenter].[dbo].[tbl_IPO_SessionforCompanyInfo] as Sess"; SQLDbAdapter.SelectCommand = new SqlCommand(query, conn); SQLDbAdapter.Fill(oDataSet); DataTable dt = new DataTable(); dt = oDataSet.Tables[0]; var PRegcode = (dataQuery.GetParentChildCheckFormCustCode(Cust_Code)); if (PRegcode.Count != 0) { ParendChild = PRegcode.ToArray(); CustCode = ParendChild[0] + "," + ParendChild[1] + "," + ParendChild[2].ToString(); } else { CustCode = Cust_Code; } string shareSummery = "ID :" + Cust_Code + "," + "Current IPO :"; foreach (DataRow dr in dt.Rows) { ShortCode = dr["Short_Code"].ToString(); IPOBalance = dr["TotalAmount"].ToString(); TradeAccountBalance = dr["TradeAcc_Balance"].ToString(); IPOAccountBalance = dr["IPOAcc_Balance"].ToString(); if (ShortCode != "") { //MessageGenerate dd = new MessageGenerate(); //MessageGenerate.messageStroe(Cust_Code, ShortCode, IPOBalance, TradeAccountBalance, IPOAccountBalance, CustCode); shareSummery = shareSummery + " " + dr["Short_Code"].ToString() + " " + "&" + " " + "Amount:" + dr["TotalAmount"].ToString() + "," + "IPO parent Acc. Balance:" + dr["IPOAcc_Balance"].ToString() + "," + "Trade Acc. Balance:" + dr["TradeAcc_Balance"].ToString() + "," + "SMS Format:" + dr["Short_Code"].ToString() + " " + CustCode + " " + "pmipo rmipo"; } else { DataSqlQuery objdataSqlQuery = new DataSqlQuery(); string SMSCode = "SMS09"; string sMessage = objdataSqlQuery.GetNotRegisterMessage(SMSCode); shareSummery = sMessage; } } return(shareSummery); }
public static string IPORegErrorMessage(string Key) { string Message = string.Empty; DataSqlQuery data = new DataSqlQuery(); string SMSCode = "SMS08"; string sMessage = data.GetNotRegisterMessage(SMSCode); Message = sMessage.Replace("_", Key); return(Message); }
public static string Get_SMSText_IPOSuccessfull(string[] CustCode) { DataSqlQuery data = new DataSqlQuery(); string Message = string.Empty; string SMSCode = "SMS06"; string Cust_Code = string.Join(",", CustCode); string sMessage = data.GetNotRegisterMessage(SMSCode); Message = sMessage.Replace("_", Cust_Code); return(Message); }
public static string Get_SMSText_IPOApproverSuccessFully(string[] CustCode, string CompanyShortName) { DataSqlQuery data = new DataSqlQuery(); string Message = string.Empty; string SMSCode = "SMS11"; string Cust_Code = string.Join(",", CustCode); string sMessage = data.GetNotRegisterMessage(SMSCode); Message = sMessage.Replace("_", Cust_Code); Message = Message.Replace("-", CompanyShortName); return(Message); }
public static string Get_SMSText_IPOResultProcessingMessage(string[] SuccessFullCustCode, string[] UnSuccessFullCustCode, string CompanyShortCode) { DataSqlQuery data = new DataSqlQuery(); string Message = string.Empty; string SMSCode = "SMS12"; string SuccessfullCust_Code = string.Join(",", SuccessFullCustCode); string UnSuccessCust_Code = string.Join(",", UnSuccessFullCustCode); string sMessage = data.GetNotRegisterMessage(SMSCode); Message = sMessage.Replace("_", SuccessfullCust_Code); Message = Message.Replace("-", UnSuccessCust_Code); Message = Message.Replace("~", CompanyShortCode); return(Message); }
private void DayendTradeConfirmationPushtosender(string Custcode, string sSMSSender, string Message) { try { string Fullmessage = string.Empty; if (sSMSSender.Length > 11 || sSMSSender.Length == 11) { sSMSSender = sSMSSender.Replace("+880", "0"); } else { return; } // Send an SMS message SmsSubmitPdu pdu; // The straightforward version if (Message.Length > 160) { Message = SplitStringAt(160, Message); string[] word = Message.Split('|'); Message = word[0]; pdu = new SmsSubmitPdu(Message, sSMSSender.Trim(), "");// "" indicate SMSC No ModemCommunication.SendMessage(pdu); SendMessageloadConsolApplicationtDesign(Custcode, sSMSSender, Message); Message = word[1]; pdu = new SmsSubmitPdu(Message, sSMSSender.Trim(), ""); // "" indicate SMSC No ModemCommunication.SendMessage(pdu); SendMessageloadConsolApplicationtDesign(Custcode, sSMSSender, Message); } else { pdu = new SmsSubmitPdu(Message, sSMSSender.Trim(), ""); ModemCommunication.SendMessage(pdu); SendMessageloadConsolApplicationtDesign(Custcode, sSMSSender, Message); } DataSqlQuery oDACommonQuery = new DataSqlQuery(); oDACommonQuery.DayendTradeConfirmedStatusUpdate(sSMSSender.Trim()); } catch (Exception) { //MessageBox.Show(exc.Message); throw; } }
public static string Get_IPODefaultMessage(String ReceiveMessage) { DataSqlQuery data = new DataSqlQuery(); string message = string.Empty; List <string> CustCode = new List <string>(); string SMSCode = "SMS03"; string sMessage = data.GetNotRegisterMessage(SMSCode); var Company_Short_Code = data.GetIPOCompanyShortCodeSearch(); string[] ArryCompanyShortCode = Company_Short_Code.ToArray(); string FullIPOCompanyShortCode = string.Join(",", ArryCompanyShortCode); string[] Input_CustCode = null; var listtmp = new List <string>(Regex.Split(ReceiveMessage, @"\D+")); Input_CustCode = listtmp.Where(t => !string.IsNullOrEmpty(Convert.ToString(t))).ToArray(); if (Input_CustCode.Length > 0) { int i = 0; foreach (string Value in Input_CustCode) { CustCode.Add(Value); i++; if (i == 2) { break; } } } string[] Cust_Code = CustCode.ToArray(); String FinalCustCode = String.Join(",", Cust_Code); message = sMessage.Replace("_", FullIPOCompanyShortCode); message = message.Replace("102", FinalCustCode); if (Input_CustCode.Length > 1) { message = message.Replace("pIPO", "Pmipo"); message = message.Replace("rIPO", "Pmtrade"); } return(message); }
private void ConfirmationIPOPushtoSender(string sSMSSender, string Message) { try { if (sSMSSender.Length > 11 || sSMSSender.Length == 11) { sSMSSender = sSMSSender.Replace("+880", "0"); } else { return; } SmsSubmitPdu pdu; pdu = new SmsSubmitPdu(Message, sSMSSender.Trim(), ""); ModemCommunication.gsObj.SendMessage(pdu); DataSqlQuery oDACommonQuery = new DataSqlQuery(); oDACommonQuery.IPOConfirmedStatusUpdate(sSMSSender.Trim()); } catch (Exception exc) { throw new Exception(exc.Message); } }
public void IPOPushtoSender(string CustCode, string PhoneNumber, string Message) { try { string FullMessage = string.Empty; if (PhoneNumber.Length > 11 || PhoneNumber.Length == 11) { PhoneNumber = PhoneNumber.Replace("+880", "0"); } else { //return ; } SendInvalidCustomerNotice(PhoneNumber, Message); DataSqlQuery oDACommonQuery = new DataSqlQuery(); oDACommonQuery.IPOConfirmedStatusUpdate(PhoneNumber.Trim()); SendMessageloadConsolApplicationtDesign(CustCode, PhoneNumber, Message); } catch (Exception) { throw; } }
public List <object> Deposite_Withdraw(SmsPdu SmsPdu) { List <object> Result_Deposite_Withdraw = new List <object>(); try { if (SmsPdu is SmsDeliverPdu) { SmsDeliverPdu Dpdu = (SmsDeliverPdu)SmsPdu; string Text = Dpdu.UserDataText.ToUpper(); char[] delimiterChars = { ' ', ',', '.', ':', '\t', '/', '_', ';', '.', }; string[] Word = Text.Split(delimiterChars); string RegCustCode = string.Empty; string Deposite_Withdraw = string.Empty; string Trade_IPO = string.Empty; string Amount = string.Empty; string ErrorMsg = string.Empty; string[] output_CustCode = null; string SMSCode = String.Empty; string Search_ReceiveID = string.Empty; string[] Cust_Code = null; string PhoneNumber = string.Empty; if (Dpdu.OriginatingAddress.Length > 11 || Dpdu.OriginatingAddress.Length == 11) { PhoneNumber = Dpdu.OriginatingAddress.Replace("+880", "0"); } var RegCode = (objData.GetCustCodeMultipleFromPhoneNo(Dpdu.OriginatingAddress)); RegCustCode = string.Join(",", RegCode.ToArray()); if (RegCustCode != "") { SMSCode = SMSCommadCode.Deposite_Withdraw_RegCustCode + "-"; } else { SMSCode = SMSCommadCode.Deposite_Withdraw_Default + "-"; } //-------------- Deposite/Withdraw Check--------- string DefaultText = "D,W,Deposite,Withdraw"; string[] DefaulttextArray = DefaultText.ToUpper().Split(','); foreach (string Value in DefaulttextArray) { if (Word.Contains(Value.ToUpper())) { if (Value == "D" || Value == "DEPOSITE") { Deposite_Withdraw = "Deposite"; break; } else if (Value == "W" || Value == "WITHDRAW") { Deposite_Withdraw = "Withdraw"; break; } } } if (Deposite_Withdraw != "") { SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Found + "-"; } else { SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Default + "-"; } //--------------- End Deposite/Withdraw Check ------------ //--------------- Check Trade / IPO ---------------------- string message = "Trade,Ipo,I,P"; string[] Message = message.ToUpper().Split(','); foreach (string Value in Message) { if (Word.Contains(Value.ToUpper())) { if (Value == "TRADE" || Value == "T") { Trade_IPO = "Trade"; break; } else if (Value == "IPO" || Value == "I") { Trade_IPO = "IPO"; break; } } } if (Trade_IPO != "") { SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Trade_Ipo + "-"; } else { SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Default + "-"; } //---------------END Trade / IPO ---------- //---------------- Search Amount ------ List <string> listAmount = new List <string>(); listAmount = Word.ToList(); foreach (string value in Word) { if (value == "TRADE" || value == "T") { break; } else if (value == "IPO" || value == "I") { break; } else { listAmount.Remove(value); } } string[] TAmount = listAmount.ToArray(); string textAmount = string.Join(",", TAmount); string[] Input_Amount = null; var listtmpAmount = new List <string>(Regex.Split(textAmount, @"\D+")); Input_Amount = listtmpAmount.Where(t => !string.IsNullOrEmpty(Convert.ToString(t))).ToArray(); Amount = string.Join(",", Input_Amount); if (Amount != "") { SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Amount + "-"; } else { SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Default + "-"; } //---------------- End Search Amount ---- //--------- Check Cust_Code -------------- List <string> listCust_Code = new List <string>(); foreach (string value in Word) { if (value == "TRADE" || value == "T") { break; } else if (value == "IPO" || value == "I") { break; } else { listCust_Code.Add(value); } } string[] CustCode = listCust_Code.ToArray(); string[] Input_CustCode = null; string textCustCode = string.Join(",", CustCode); var listtmp = new List <string>(Regex.Split(textCustCode, @"\D+")); Input_CustCode = listtmp.Where(t => !string.IsNullOrEmpty(Convert.ToString(t))).ToArray(); string[] ARegCode = RegCode.ToArray(); var listRegCode = string.Join(",", ARegCode); var listPlaceCustCode = string.Join(",", Input_CustCode); if (listPlaceCustCode == listRegCode) { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_CustCode; } else { string[] RegCodeforParentAndChildCode = null; //---------- Parent Child ------------------------ string[] Reg_CustCode = RegCode.ToArray(); List <KeyValuePair <string, string[]> > objectsGot = new List <KeyValuePair <string, string[]> >(); foreach (string Rreg in Reg_CustCode) { var PRegcode = (objData.GetParentChildCheckFormCustCode(Rreg.ToString())); RegCodeforParentAndChildCode = PRegcode.ToArray(); objectsGot.Add(new KeyValuePair <string, string[]>(Rreg.ToString(), (string[])RegCodeforParentAndChildCode)); } if (Reg_CustCode.Length > 0) { string Code = string.Empty; if (RegCodeforParentAndChildCode.Length != 0) { foreach (var tmp in objectsGot) { DataSqlQuery objdataSqlQuery = new DataSqlQuery(); string ErrorMsg_Tmp = MessageGenerate.IPORegErrorMessage(tmp.Key); int l = 1; int invalidFound = 0; foreach (string value in Input_CustCode) { if (!tmp.Value.Contains(value) && l < Input_CustCode.Length) { ErrorMsg_Tmp = ErrorMsg_Tmp + value + ","; invalidFound++; } else if (!tmp.Value.Contains(value)) { ErrorMsg_Tmp = ErrorMsg_Tmp + value; invalidFound++; } l++; } if (invalidFound == 0) { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_CustCode; RegCustCode = tmp.Key; break; } else { string FirstSMSCode = "SMS07"; string sMessageFirstpart = objdataSqlQuery.GetNotRegisterMessage(FirstSMSCode); ErrorMsg = ErrorMsg_Tmp + sMessageFirstpart; } } } } else { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Default; } } if (ErrorMsg != "") { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.Deposite_Withdraw_Default; } //--------- End Cust_ Code ---------------- //--------- Receive ID ------------------ string ReceiveID = string.Empty; Search_ReceiveID = objData.ReceiveID(); string ReceiveMessage = objData.GetReceiveMessage(Search_ReceiveID); string Phone_Message = Dpdu.UserDataText; if (Phone_Message.Contains(ReceiveMessage)) { ReceiveID = Search_ReceiveID; } //------------ End receive ID ------------ Result_Deposite_Withdraw.Add(RegCustCode); Result_Deposite_Withdraw.Add(Deposite_Withdraw); Result_Deposite_Withdraw.Add(Trade_IPO); Result_Deposite_Withdraw.Add(Amount); Result_Deposite_Withdraw.Add(output_CustCode); Result_Deposite_Withdraw.Add(PhoneNumber); Result_Deposite_Withdraw.Add(ReceiveID); Result_Deposite_Withdraw.Add(Phone_Message); Result_Deposite_Withdraw.Add(ErrorMsg); Result_Deposite_Withdraw.Add(SMSCode); } } catch (Exception) { throw; } return(Result_Deposite_Withdraw); }
public List <object> IPORequest(SmsPdu pdu) { List <object> resultList = new List <object>(); //=================================================== try { if (pdu is SmsDeliverPdu) { SmsDeliverPdu dpdu = (SmsDeliverPdu)pdu; String Text = dpdu.UserDataText.ToLower(); string SMSCode = string.Empty; string output_PaymentType = string.Empty; string output_RefundType = string.Empty; string output_CompanyCode = string.Empty; string ErrorMsg = string.Empty; string[] output_CustCode = null; string output_Message = dpdu.UserDataText; string output_PnoneNumber = dpdu.OriginatingAddress; if (dpdu.OriginatingAddress.Length > 11 || dpdu.OriginatingAddress.Length == 11) { dpdu.OriginatingAddress = dpdu.OriginatingAddress.Replace("+880", "0"); } var RegCode = (objData.GetCustCodeMultipleFromPhoneNo(dpdu.OriginatingAddress)); string Output_RegCustCode = string.Join(",", RegCode.ToArray()); if (Output_RegCustCode != "") { SMSCode = SMSCode + SMSCommadCode.IPORegCust_Code + "-"; } else { SMSCode = SMSCode + SMSCommadCode.IPODefault_Code + "-"; } char[] delimiterChars = { ' ', ',', '.', ':', '\t', '/', '_', ';', '.', }; string[] Word = Text.Split(delimiterChars); List <string> listCustCodeforMessage = new List <string>(); string[] Input_CustCode = null; var listtmp = new List <string>(Regex.Split(Text, @"\D+")); Input_CustCode = listtmp.Where(t => !string.IsNullOrEmpty(Convert.ToString(t))).ToArray(); string[] RegCodeforarray = Output_RegCustCode.Split(','); #region NewWork var listRegCustCode = string.Join(",", RegCodeforarray); var listMessageplaceCustCode = string.Join(",", Input_CustCode); if (listRegCustCode.Contains(listMessageplaceCustCode)) { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.IPOCustomerFound + "-"; } else if (listRegCustCode.Length == listMessageplaceCustCode.Length) { List <string> ValidationRegCode = new List <string>(); foreach (string value in Input_CustCode) { if (!RegCodeforarray.Contains(value)) { ValidationRegCode.Add((value).ToString()); } } if (ValidationRegCode.Count == 0) { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.IPOCustomerFound + "-"; } } else { string[] RegCodeforParentAndChildCode = null; //---------- Parent Child ------------------------ List <KeyValuePair <string, string[]> > objectsGot = new List <KeyValuePair <string, string[]> >(); foreach (string Rreg in RegCodeforarray) { var PRegcode = (objData.GetParentChildCheckFormCustCode(Rreg.ToString())); RegCodeforParentAndChildCode = PRegcode.ToArray(); objectsGot.Add(new KeyValuePair <string, string[]>(Rreg.ToString(), (string[])RegCodeforParentAndChildCode)); } string Code = string.Empty; if (RegCodeforParentAndChildCode.Length != 0) { foreach (var tmp in objectsGot) { DataSqlQuery objdataSqlQuery = new DataSqlQuery(); string ErrorMsg_Tmp = MessageGenerate.IPORegErrorMessage(tmp.Key); int l = 1; int invalidFound = 0; foreach (string value in Input_CustCode) { if (!tmp.Value.Contains(value) && l < Input_CustCode.Length) { ErrorMsg_Tmp = ErrorMsg_Tmp + value + ","; invalidFound++; } else if (!tmp.Value.Contains(value)) { ErrorMsg_Tmp = ErrorMsg_Tmp + value; invalidFound++; } l++; } if (invalidFound == 0) { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.IPOCustomerFound + "-"; Output_RegCustCode = tmp.Key; break; } else { string SMSCodelastPart = "SMS07"; string sMessage = objdataSqlQuery.GetNotRegisterMessage(SMSCodelastPart); ErrorMsg = ErrorMsg_Tmp + sMessage; } } } else { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.DefaultCode + "-"; } } resultList.Add(Output_RegCustCode); if (ErrorMsg != "") { output_CustCode = Input_CustCode; SMSCode = SMSCode + SMSCommadCode.DefaultCode + "-"; } //---------- End Parent Child ------------------- #endregion //- ---------- IPO Company Select ------------------ string Comapnt_ShortCode = ""; string IpoCompanyShortCode = string.Empty; Comapnt_ShortCode = Word[0].ToLower(); if (Comapnt_ShortCode != "") { IpoCompanyShortCode = GetCompany_Short_Code_FromReg(Comapnt_ShortCode); } if (IpoCompanyShortCode != "") { output_CompanyCode = Comapnt_ShortCode; resultList.Add(output_CompanyCode); SMSCode = SMSCode + SMSCommadCode.IPOCompanyFound + "-"; } else if (IpoCompanyShortCode == "") { SMSCode = SMSCode + SMSCommadCode.IPODefault_Code + "-"; } //-------------------- End Company Select ----------------- if (ErrorMsg == "") { resultList.Add(Input_CustCode); } else { resultList.Add(Input_CustCode); } string IPO_PaymentType = "pIPO,ptrade,pmIPO,PmTrade"; string[] IPO_paymenttype = IPO_PaymentType.Split(','); foreach (string PType in IPO_paymenttype) { if (Word.Contains(PType.ToLower())) { output_PaymentType = PType.ToLower(); } } resultList.Add(output_PaymentType); if (output_PaymentType != "") { SMSCode = SMSCode + SMSCommadCode.IPOPaymentType + "-"; } else if (output_PaymentType == "") { SMSCode = SMSCode + SMSCommadCode.IPODefault_Code + "-"; } string IPO_RefundType = "rIPO,rtrade,rEFT,rmIPO,rmTrade"; string[] IPO_refundtype = IPO_RefundType.Split(','); foreach (string RType in IPO_refundtype) { if (Word.Contains(RType.ToLower())) { output_RefundType = RType.ToLower(); } } resultList.Add(output_RefundType); if (output_RefundType != "") { SMSCode = SMSCode + SMSCommadCode.IPORefundType; } else if (output_RefundType == "") { SMSCode = SMSCode + SMSCommadCode.IPODefault_Code; } string ReceiveID = objData.ReceiveID(); resultList.Add(output_Message); resultList.Add(output_PnoneNumber); resultList.Add(ReceiveID); resultList.Add(ErrorMsg); resultList.Add(SMSCode); } } catch (Exception ex) { throw new Exception(ex.Message); } //======================== return(resultList); }
public void PushtoSender(long CustomerID, string sSMSSender, string SMSShortCode, string CustCode) { try { string FullMessage = string.Empty; if (sSMSSender.Length > 11 || sSMSSender.Length == 11) { sSMSSender = sSMSSender.Replace("+880", "0"); } else { return; } if (CustomerID < 1) { CustomerID = GetCustomerID_FromReg(0, sSMSSender); } else { CustomerID = GetCustomerID_FromReg(CustomerID, sSMSSender); } string PushMessage = ""; if (SMSShortCode.ToUpper().Trim() == "SS") { PushMessage = GetShareSummery(CustomerID); } else if (SMSShortCode.ToUpper().Trim() == "CB") { PushMessage = GetCurrentBalance(CustomerID); } else if (SMSShortCode.ToUpper().Trim() == "LPR" || SMSShortCode.ToUpper().Trim() == "LP") { PushMessage = getLastPaymentReceived(CustomerID); } else if (SMSShortCode.ToUpper().Trim() == "AS" || SMSShortCode.ToUpper().Trim() == "ACS") { PushMessage = getAccountSummery(CustomerID); } else { return; } if (CustomerID < 1) { PushMessage = "Your mobile number is not tag with your customer id.please do contact with KSCL."; } SmsSubmitPdu pdu; if (PushMessage.Length > 160) { PushMessage = SplitStringAt(160, PushMessage); string[] word = PushMessage.Split('|'); PushMessage = word[0]; pdu = new SmsSubmitPdu(PushMessage, sSMSSender.Trim()); ModemCommunication.gsObj.SendMessage(pdu); SendMessageloadConsolApplicationtDesign(CustCode, sSMSSender, PushMessage); PushMessage = word[1]; pdu = new SmsSubmitPdu(PushMessage, sSMSSender.Trim()); ModemCommunication.gsObj.SendMessage(pdu); SendMessageloadConsolApplicationtDesign(CustCode, sSMSSender, PushMessage); } else { pdu = new SmsSubmitPdu(PushMessage, sSMSSender.Trim(), ""); // "" indicate SMSC No ModemCommunication.gsObj.SendMessage(pdu); SendMessageloadConsolApplicationtDesign(CustCode, sSMSSender, PushMessage); } DataSqlQuery oDACommonQuery = new DataSqlQuery(); oDACommonQuery.ReceivedStatusUpdate("+88" + sSMSSender.Trim(), SMSShortCode); } catch (Exception) { throw; } }