private void btnUpdate_Click(object sender, EventArgs e) { try { if (!GlobalFunctions.checkRights("tsmStockReceiving", "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) { StockReceivingDetailUI loStockReceivingDetail = new StockReceivingDetailUI(dgvList.CurrentRow.Cells[0].Value.ToString()); loStockReceivingDetail.ParentList = this; loStockReceivingDetail.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("tsmStockReceiving", "Create")) { return; } StockReceivingDetailUI loStockReceivingDetail = new StockReceivingDetailUI(); loStockReceivingDetail.ParentList = this; loStockReceivingDetail.ShowDialog(); }
private void btnCreate_Click(object sender, EventArgs e) { try { if (!GlobalFunctions.checkRights("tsmStockReceiving", "Create")) { return; } StockReceivingDetailUI loStockReceivingDetail = new StockReceivingDetailUI(); loStockReceivingDetail.ParentList = this; loStockReceivingDetail.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("tsmStockReceiving", "Update")) { return; } foreach (DataRow _dr in loInventoryHeader.getAllData("", dgvList.CurrentRow.Cells[0].Value.ToString(), "", "Stock Receiving").Rows) { if (_dr["Final"].ToString() == "Y") { MessageBoxUI mb = new MessageBoxUI("Stock Receiving is already FINALIZED!", GlobalVariables.Icons.Information, GlobalVariables.Buttons.OK); mb.ShowDialog(); return; } } StockReceivingDetailUI loStockReceivingDetail = new StockReceivingDetailUI(dgvList.CurrentRow.Cells[0].Value.ToString()); loStockReceivingDetail.ParentList = this; loStockReceivingDetail.ShowDialog(); }