private void btnUpdate_Click(object sender, EventArgs e) { try { if (!GlobalFunctions.checkRights("tsmStockWithdrawal", "Update")) { return; } foreach (DataRow _drStatus in loInventory.getInventoryStatus(dgvList.CurrentRow.Cells[0].Value.ToString()).Rows) { if (_drStatus[0].ToString() == "Y") { MessageBoxUI _mbStatus = new MessageBoxUI("You cannot update a FINALIZED Stock Inventory!", GlobalVariables.Icons.Warning, GlobalVariables.Buttons.OK); _mbStatus.ShowDialog(); return; } } if (dgvList.Rows.Count > 0) { StockWithdrawalDetailUI loStockWithdrawalDetail = new StockWithdrawalDetailUI(dgvList.CurrentRow.Cells[0].Value.ToString()); loStockWithdrawalDetail.ParentList = this; loStockWithdrawalDetail.ShowDialog(); } } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnUpdate_Click"); em.ShowDialog(); return; } }
private void btnCreate_Click(object sender, EventArgs e) { if (!GlobalFunctions.checkRights("tsmStockWithdrawal", "Create")) { return; } StockWithdrawalDetailUI loStockWithdrawalDetail = new StockWithdrawalDetailUI(); loStockWithdrawalDetail.ParentList = this; loStockWithdrawalDetail.ShowDialog(); }
private void btnCreate_Click(object sender, EventArgs e) { try { if (!GlobalFunctions.checkRights("tsmStockWithdrawal", "Create")) { return; } StockWithdrawalDetailUI loStockWithdrawalDetail = new StockWithdrawalDetailUI(); loStockWithdrawalDetail.ParentList = this; loStockWithdrawalDetail.ShowDialog(); } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnCreate_Click"); em.ShowDialog(); return; } }
private void btnUpdate_Click(object sender, EventArgs e) { if (!GlobalFunctions.checkRights("tsmStockWithdrawal", "Update")) { return; } foreach (DataRow _dr in loInventoryHeader.getAllData("", dgvList.CurrentRow.Cells[0].Value.ToString(), "", "Stock Withdrawal").Rows) { if (_dr["Final"].ToString() == "Y") { MessageBoxUI mb = new MessageBoxUI("Stock Withdrawal is already FINALIZED!", GlobalVariables.Icons.Information, GlobalVariables.Buttons.OK); mb.ShowDialog(); return; } } StockWithdrawalDetailUI loStockWithdrawalDetail = new StockWithdrawalDetailUI(dgvList.CurrentRow.Cells[0].Value.ToString()); loStockWithdrawalDetail.ParentList = this; loStockWithdrawalDetail.ShowDialog(); }