private void vistaButton1_Click(object sender, EventArgs e)
 {
     try
     {
         sms_sender = new SMS();
         sms_sender.SendSMS(textBox3.Text,textBox2.Text,textBox1.Text);
         MessageBox.Show("SMS Telah dikirim !!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         textBox1.Clear();
         textBox2.Clear();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
示例#2
0
 private void vistaButton1_Click(object sender, EventArgs e)
 {
     try
     {
         sms_sender = new SMS();
         listBox1.Items.Clear();
         for (short i = 0; i < dataGridView1.Rows.Count; i++)
         {
             if (dataGridView1[0, i].Value.ToString() == "True")
             {
                 sms_sender.SendSMS(textBox2.Text, dataGridView1[6, i].Value.ToString(),textBox1.Text);
                 listBox1.Items.Add(dataGridView1[2, i].Value.ToString()+" Terkirim");
             }
         }
         MessageBox.Show("Semua sms telah dikirim !!!", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }