Exemplo n.º 1
0
        private void Hapus_Click(object sender, EventArgs e)
        {
            DialogResult dialog = MessageBox.Show("Yakin ?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dialog == DialogResult.Yes)
            {
                BranchesModel branch = (BranchesModel)BranchBS.Current;
                BranchXpCollection.Remove(branch);
                branch.Delete();
                BranchUOW.CommitChanges();
            }
        }
Exemplo n.º 2
0
        private void Simpan_Click(object sender, EventArgs e)
        {
            if (!validator.Validate())
            {
                return;
            }

            BranchesModel branch = (BranchesModel)BranchBS.Current;

            branch.Save();
            BranchXpCollection.Add(branch);
            BranchUOW.CommitChanges();
            BranchBS.EndEdit();

            ViewState();
        }