Example #1
0
        protected async void SendSms_Click(object sender, EventArgs e)
        {
            var           cid           = Request.QueryString["cid"];
            CustomerModel customer      = new CustomerModel(Convert.ToInt32(cid));
            string        customerPhone = customer.phonNumber;
            string        customername  = customer.firstnmae + " " + customer.lastname;

            string     teratmentID  = Request.QueryString["tid"].ToString();
            RepairJobl repairJob    = new RepairJobl(Convert.ToInt32(teratmentID));
            string     LicensePlate = repairJob.license_Number;


            Garge  garge        = new Garge(Convert.ToInt32(Session["UserID"]));
            string garageName   = garge.GetNameGarga();
            string garageNumber = garge.GetPhone();

            //This Method Sends Using API and its ASYNC (You have to wait until the process ends)
            await SmsSender.SendUsingAPIAsync(
                garageNumber,
                garageName,
                customerPhone,
                customername,
                LicensePlate
                );

            Thread.Sleep(5000); //Sleep for 5 SECOND Until API FINISH His Work
            showmodel();
        }