public SendSms_Result SendSms(string partnerUsername, string partnerPassword, string senderAccount, string receiverMobileNumber, string message)
    {
        SendSms_Result obj = new SendSms_Result();
        RefRunningTBBLL runningobj = new RefRunningTBBLL();
        this.refnum = runningobj.AddRefRunningTBAndReturn();
        WSLogBLL logobj = new WSLogBLL();
        string methodName = "SendSms";

        try
        {
            if (partnerUsername == "" || partnerPassword == "" || senderAccount == "" || receiverMobileNumber == "" || message == "")
            {
                this.partnerName = partnerUsername;
                // LogRequest: Insert Log Request
                logobj.AddWSLog(this.partnerName, this.ipaddress, "Request", this.webserviceName, methodName, partnerUsername + "|" + senderAccount + "|" + receiverMobileNumber + "|" + message, this.refnum);

                obj.Result = "notcomplete_กรุณาระบุข้อมูลให้ครบถ้วน";
            }
            else if (receiverMobileNumber.Length != 10 || !MTL.Utils.ThisWeb.CheckIsNumeric(receiverMobileNumber))
            {
                this.partnerName = partnerUsername;
                // LogRequest: Insert Log Request
                logobj.AddWSLog(this.partnerName, this.ipaddress, "Request", this.webserviceName, methodName, partnerUsername + "|" + senderAccount + "|" + receiverMobileNumber + "|" + message, this.refnum);

                obj.Result = "notcomplete_กรุณาระบุเบอร์โทรศัพท์ให้ถูกต้อง";
            }
            else
            {
                // พิสูจน์ตัวตนของพันธมิตรก่อนที่จะให้ใช้งานจริง
                NETWS_ForPartnerAuthenticationChecking.CheckPartnerAuthentication_Result pacObj = CheckPartnerAuthenticationReturnDetail(partnerUsername, partnerPassword, this.ipaddress);
                if (pacObj.Result.Trim().ToLower() == "passed")
                {
                    this.partnerName = pacObj.PartnerName;
                    // LogRequest: Insert Log Request
                    logobj.AddWSLog(this.partnerName, this.ipaddress, "Request", this.webserviceName, methodName, partnerUsername + "|" + senderAccount + "|" + receiverMobileNumber + "|" + message, this.refnum);

                    string smsSenderUser = senderAccount;
                    string smsSenderPassword = "";
                    switch (senderAccount.Trim())
                    {
                        case "[email protected]":
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "password";
                            break;
                        case "[email protected]":
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "mtl01";
                            break;
                        case "[email protected]":
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "mtl01";
                            break;
                        case "[email protected]":
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "izc7m6ic";
                            break;
                        case "[email protected]":
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "mtl2011";
                            break;
                        case "[email protected]":
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "cashout";
                            break;
                        default:
                            smsSenderUser = "[email protected]";
                            smsSenderPassword = "mtl2011";
                            break;
                    }
                    MTL.NETWS_ForSendSMS.ForSendSMS wsobj = new MTL.NETWS_ForSendSMS.ForSendSMS();
                    MTL.NETWS_ForSendSMS.SMSSendNow_Result sendResult = wsobj.SendSMSNow(smsSenderUser, smsSenderPassword, receiverMobileNumber, message);

                    if (sendResult.Result.Trim() == "sent")
                    {
                        obj.Result = "completed";
                        obj.NetInnovaMessageId = sendResult.MessageId.Trim();
                        obj.NetInnovaTaskId = sendResult.TaskId.Trim();
                    }
                    else
                    {
                        obj.Result = "notcomplete_ไม่สามารถส่ง SMS ให้ได้";
                        obj.NetInnovaMessageId = sendResult.MessageId.Trim();
                        obj.NetInnovaTaskId = sendResult.TaskId.Trim();
                    }
                }
                else
                {
                    this.partnerName = pacObj.PartnerName;
                    // LogRequest: Insert Log Request
                    logobj.AddWSLog(this.partnerName, this.ipaddress, "Request", this.webserviceName, methodName, partnerUsername + "|" + senderAccount + "|" + receiverMobileNumber + "|" + message, this.refnum);

                    obj.Result = pacObj.Result.Trim();
                }
            }

            // LogResponse: Insert Log Response
            logobj.AddWSLog(this.partnerName, this.ipaddress, "Response", this.webserviceName, methodName, obj.Result + "|" + obj.NetInnovaMessageId + "|" + obj.NetInnovaTaskId, this.refnum);

            return obj;
        }
        catch (Exception ex)
        {
            obj.Result = "notcomplete_" + ex.Message.Trim();

            // LogResponse: Insert Log Response
            logobj.AddWSLog(this.partnerName, this.ipaddress, "Response", this.webserviceName, methodName, obj.Result, this.refnum);

            return obj;
        }
    }
    private bool SendSMS(string MobileNumber, string Message)
    {
        bool result = false;
        MTL.NETWS_ForSendSMS.ForSendSMS wsobj = new MTL.NETWS_ForSendSMS.ForSendSMS();
        MTL.NETWS_ForSendSMS.SMSSendNow_Result sendResult = wsobj.SendSMSNow("[email protected]", "password", MobileNumber, Message);

        if (sendResult.Result.Trim() == "sent")
        {
            result = true;
        }
        else
        {
            result = false;
        }

        return result;
    }