Exemple #1
0
        public void Send_sms2()
        {
            DataTable landline  = hotelinfo.getLandLinenumber();
            String    ll_number = landline.Rows[0]["LANDLINE1"].ToString();
            string    no        = "9848082999";
            String    AdvanceAmount;

            if (txtamntrecivd.Text != null)
            {
                AdvanceAmount = txtamntrecivd.Text;
            }
            else
            {
                AdvanceAmount = "0.00";
            }
            String username     = "******";
            String password     = "******";
            String mobileNumber = "91" + "9494433033";
            //String customer = "Room No : " + roomno.Text + "\nRoom Type : " + roomcategory.Text + "\nArrival & Departure : " + arrival.Text + " - " + departure.Text + "\nAdvance Paid : " + AdvanceAmount;
            String customer = "Room No : " + roomno.Text + "\nAdvance Paid : " + AdvanceAmount + "\nName : " + txtfirstname.Text + "";
            String url      = "http://sms.zestwings.com/smpp.sms?username="******"&password="******"&to=" + mobileNumber + "&from=VELSOL&text=" + customer + "";

            try
            {
                HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(url);

                // Prepare and Add URL Encoded data
                UTF8Encoding encoding = new UTF8Encoding();
                httpWReq.Method      = "GET";
                httpWReq.ContentType = "application/x-www-form-urlencoded";

                HttpWebResponse response       = (HttpWebResponse)httpWReq.GetResponse();
                StreamReader    reader         = new StreamReader(response.GetResponseStream());
                string          responseString = reader.ReadToEnd();

                // Close the response
                reader.Close();
                response.Close();
            }
            catch (SystemException ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemple #2
0
        public void Send_SMS()
        {
            DataTable landline  = hotelinfo.getLandLinenumber();
            String    ll_number = landline.Rows[0]["MOBILE_NO"].ToString();
            //string no = "9848082999";
            String username = "******";
            String password = "******";

            SmsMobileNumber = "91" + "9494433033";


            SmsMessage = "Checkin's : " + Checkins + "\nCheckout's : " + Checkouts + "\nReservations : " + Reservations + "\nAmount Collected : " + Math.Round(Advance + Settle, 2, MidpointRounding.AwayFromZero) + "\nAmount Outward : " + Math.Round(Paidout + Refunds, 2, MidpointRounding.AwayFromZero) + "\n" + TimeStamp;
            String url = "http://sms.zestwings.com/smpp.sms?username="******"&password="******"&to=" + SmsMobileNumber + "&from=HRTVEL&text=" + SmsMessage + "";

            try
            {
                HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(url);
                //Prepare and Add URL Encoded data
                UTF8Encoding encoding = new UTF8Encoding();
                httpWReq.Method      = "GET";
                httpWReq.ContentType = "application/x-www-form-urlencoded";

                HttpWebResponse response       = (HttpWebResponse)httpWReq.GetResponse();
                StreamReader    reader         = new StreamReader(response.GetResponseStream());
                string          responseString = reader.ReadToEnd();

                //Close the response
                reader.Close();
                response.Close();
            }
            catch (SystemException ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            //     popup.IsOpen = false;
        }
Exemple #3
0
        public void Send_SMS()
        {
            DataTable landline  = hotelinfo.getLandLinenumber();
            String    ll_number = landline.Rows[0]["LANDLINE1"].ToString();

            String username     = "******";
            String password     = "******";
            String mobileNumber = "91" + txtmobileno.Text;
            String customer     = "Thank you very much for choosing us! \nYour Room No's : " + tbrmst.Text + "\nAdvance Paid : 0.00 \nFor Assistance Call : " + ll_number + "";
            String url          = "http://sms.zestwings.com/smpp.sms?username="******"&password="******"&to=" + mobileNumber + "&from=VELSOL&text=" + customer + "";

            try
            {
                HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(url);

                //Prepare and Add URL Encoded data
                UTF8Encoding encoding = new UTF8Encoding();
                //byte[] data = encoding.GetBytes(sbPostData.ToString());
                //Specify post method
                httpWReq.Method      = "POST";
                httpWReq.ContentType = "application/x-www-form-urlencoded";

                HttpWebResponse response       = (HttpWebResponse)httpWReq.GetResponse();
                StreamReader    reader         = new StreamReader(response.GetResponseStream());
                string          responseString = reader.ReadToEnd();

                //Close the response
                reader.Close();
                response.Close();
            }
            catch (SystemException ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            //     popup.IsOpen = false;
        }