Example #1
0
        private void btnAddItem_Click(object sender, EventArgs e)
        {
            FrmItemDescription frm = new FrmItemDescription(dao, false);

            frm.ShowDialog();

            ReloadDGVData();
        }
Example #2
0
        private void btnEditItem_Click(object sender, EventArgs e)
        {
            if (this.dgvItemData.Rows.Count >= 1)
            {
                FrmItemDescription frm = new FrmItemDescription(dao, true, dao.GetItemByID(dgvItemData.SelectedRows[0].Cells[0].Value.ToString()));
                frm.ShowDialog();

                ReloadDGVData();
            }
            else
            {
                MessageBox.Show("Maaf, masih tidak ada data.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }