コード例 #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (dgKasbon.SelectedCells[0].OwningRow.Cells["StatusKasbon"].Value.ToString() == "C")
            {
                MessageBox.Show("Sudah Penyelesaian, Tidak Bisa di Edit");
                return;
            }
            string    rowID       = dgKasbon.SelectedCells[0].OwningRow.Cells["RowID"].Value.ToString();
            DataTable dtKasbonRow = dtKasbon.Copy();

            dtKasbonRow.DefaultView.RowFilter = "RowID='" + rowID + "'";
            DataView dv = new DataView();

            dv = dtKasbonRow.DefaultView;

            frmKasbonUpdate frm = new frmKasbonUpdate(this, dv.ToTable());

            frm.ShowDialog();
        }
コード例 #2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            frmKasbonUpdate frm = new frmKasbonUpdate(this);

            frm.ShowDialog();
        }