Exemplo n.º 1
0
        protected void CloseItemView_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewRow row = CloseItemView.SelectedRow;

            Label   lb      = (Label)row.FindControl("Label1");
            TextBox bidTxt  = (TextBox)row.FindControl("BidTextBox");
            TextBox winText = (TextBox)row.FindControl("WinValTextBox");

            Item closeItem = itemCtrl.getItemByID(row.Cells[0].Text);
            User winUser   = userCtrl.getBuyerInfo(bidTxt.Text);

            if (closeItem != null && winUser != null)
            {
                int i = itemCtrl.updateBidItem(closeItem, winUser, winText.Text);
                if (i <= 0)
                {
                    ErrorNumsLbl.Text = closeItem.CategoryID + closeItem.ItemID;
                }

                if (winUser.Text)
                {
                    string msg = "Hello, we're BabyFold's Festival of Trees. We're pleased to let you know that you won the item: " + closeItem.ItemName + " with $" + winText.Text + "!";
                    smsCtrl.sendText(winUser.Phone, msg);
                }
            }

            CloseItemView.DataBind();
        }
Exemplo n.º 2
0
        protected void BtnText_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(SMSMessage.Text))
            {
                TextCallController txtCtrl = new TextCallController();

                txtCtrl.sendText(singleUser.Phone, SMSMessage.Text);
                MessageSent.Visible = true;
            }
        }