protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference1.SUSMSClient s = new ServiceReference1.SUSMSClient();

            string[] st = new string[200];
            st = s.getCarriers();

            {
                //Response.Write(Session["phonenum" + newstr].ToString());

                string phonenum = "1" + TextBox2.Text;

                string message = "You have won the bid";
                string add = s.sendSMS("t-mobile", phonenum, message);

                Label4.Text = @"<div style='margin-top:20px' class='form - group alert alert-success fade in'><a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a> Message sent! </div>";
            }
        }
        //sending sms
        private void button_Click(object sender, EventArgs e)
        {
            mydiv.Visible = true;
            Button button = sender as Button;
            if (button != null)
            {
                string i = button.ID;
                // Response.Write(i);
                //int p = i.IndexOf("b");
                string newstr = i.Substring(1);

                ServiceReference1.SUSMSClient s = new ServiceReference1.SUSMSClient();

                string[] st = new string[200];
                st = s.getCarriers();

                if (Session["phonenum" + newstr] != null)
                {
                    //Response.Write(Session["phonenum" + newstr].ToString());

                    string phonenum = "1" + Session["phonenum" + newstr].ToString();
                    TextBox tbemail = (TextBox)mydiv.FindControl("textboxemail" + newstr);
                    string newtxtnew = tbemail.Text;
                    Session["emailtosend"] = newtxtnew;
                    string message = "You have won the bid";
                    string add = s.sendSMS("t-mobile", phonenum, message);

                    Label1.Text = @"<div style='margin-top:20px' class='form - group alert alert-success fade in'><a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a> Message sent! </div>";

                    //Response.Write(add);

                    // Response.Write(addew);

                }

            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            signUp = new SignUpController();
            userControl = new UserCtrl();

            if (IsPostBack)
            {
                ResultLabel.Visible = true;
            }

            if (!IsPostBack)
            {
                EditProfileTitle.Visible = false;

                //if (Session["name"]!= null)
                if (Page.PreviousPage == null && Session["name"]!= null)
                {
                    //Manage title and button visibility for Edit Profile
                    EditProfileBtn.Visible = true;
                    SignUpBtn.Visible = false;
                    BackButton.Visible = true;
                    SignUpTitle.Visible = false;
                    EditProfileTitle.Visible = true;
                    ResultLabel.Visible = false;

                    email.ReadOnly = true;
                    confEmail.ReadOnly = true;
                    string emailString = Session["name"].ToString();

                    u = userControl.getProfileInfo(emailString);

                    email.Text = u.Email;
                    confEmail.Text = u.Email;
                    firstName.Text = u.FirstName;
                    lastName.Text = u.LastName;
                    address.Text = u.Address;
                    city.Text = u.City;
                    DropDownList1.SelectedValue = u.State;
                    zipCode.Text = u.Zip.ToString();
                    //Phone.Text = u.Phone;
                    MobilePhone.Text = u.Phone;
                    checkToText.Checked = u.Text;

                }
            }

            ServiceReference1.SUSMSClient isuService = new ServiceReference1.SUSMSClient();

            string[] carriers = isuService.getCarriers();

            if (carriers.Length > 0 && CarrierList.Items.Count <= 1)
            {
                foreach (string carrier in carriers)
                {
                    CarrierList.Items.Add(new ListItem(carrier, carrier));
                }
            }
        }