private void btnRemove_Click_1(object sender, EventArgs e) { if (row >= 0) { if (isAdminActive == false) { FrmPassAdmin frm = new FrmPassAdmin(this); frm.ShowDialog(); } else { ProductsSelectedSell item = _productsSelectedSellController.ListALL()[gVProductsSelected.FocusedRowHandle]; if (item.Quantidade > 1) { item.Quantidade--; _productsSelectedSellController.update(item); } else { _productsSelectedSellController.delete(item); } updateGrid(gVProductsSelected.FocusedRowHandle); } } else { MessageBox.Show("Selecione um produto"); } row = -1; }
private void btnReset_Click_1(object sender, EventArgs e) { if (isAdminActive == false) { FrmPassAdmin frm = new FrmPassAdmin(this); frm.ShowDialog(); } else { foreach (ProductsSelectedSell item in _productsSelectedSellController.ListALL()) { _productsSelectedSellController.delete(item); } updateGrid(0); } }
private void bunifuThinButton21_Click_1(object sender, EventArgs e) { if (table == null) { MessageBox.Show("Escolha uma mesa"); } else { if (isAdminActive == false) { FrmPassAdmin frm = new FrmPassAdmin(this); frm.ShowDialog(); } else { FrmTransferirProducts frm = new FrmTransferirProducts(table.Id, this); frm.ShowDialog(); } } }