Esempio n. 1
0
        private void SimpanTSB_Click(object sender, EventArgs e)
        {
            mitemscategory K = new mitemscategory();

            K.CategoryID  = txtCategoryID.Text;
            K.Description = txtDescription.Text;
            K.Active      = Convert.ToInt32(txtActive.Text);

            if (new mitemscategoryCRUD().insertData(K))
            {
                MessageBox.Show("Data berhasil di tambahkan");
                Binding();
            }
            else
            {
                MessageBox.Show("Data gagal ditambahkan");
            }
        }
Esempio n. 2
0
        private void UbahTSB_Click(object sender, EventArgs e)
        {
            mitemscategory K = new mitemscategory();

            K.CategoryID  = txtCategoryID.Text;
            K.Description = txtDescription.Text;
            K.Active      = Convert.ToInt32(txtActive.Text);
            string categoryID = K.CategoryID;

            if (new mitemscategoryCRUD().updateData(categoryID, K))
            {
                MessageBox.Show("Data Berhasil di update");
                Binding();
            }
            else
            {
                MessageBox.Show("Data gagal di update");
            }
        }