Sudah berlangganan artikel blog ini via RSS Feed?

Programming tutorials and source code examples

Sunday, April 18, 2010

MessageBox Yes No


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2

{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Data yang dipilih di hapus...?", "peringatan", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
try
{
//foreach (DataGridViewRow row in dataGridView1.SelectedRows)
//{
// dataGridView1.Rows.Remove(row);

//}
//Validate();
//bARANGBindingSource.EndEdit();
//abarang.Simpan(dstes.BARANG);
}
catch (Exception ex)
{
MessageBox.Show("data gagal delete.\ndetail:\n" + ex.Message);
}
}
}

}
}

0 comments:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment