private void btnUpdate_Click(object sender, EventArgs e) { try { if (!GlobalFunctions.checkRights("tsmPriceQuotation", "Update")) { return; } foreach (DataRow _drStatus in loPriceQuotation.getPriceQuotationStatus(dgvList.CurrentRow.Cells[0].Value.ToString()).Rows) { if (_drStatus[0].ToString() == "Y") { MessageBoxUI _mbStatus = new MessageBoxUI("You cannot update an APPROVED Price Quotation!", GlobalVariables.Icons.Warning, GlobalVariables.Buttons.OK); _mbStatus.ShowDialog(); return; } } if (dgvList.Rows.Count > 0) { PriceQuotationDetailUI loPriceQuotationDetail = new PriceQuotationDetailUI(dgvList.CurrentRow.Cells[0].Value.ToString()); loPriceQuotationDetail.ParentList = this; loPriceQuotationDetail.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) { try { if (!GlobalFunctions.checkRights("tsmPriceQuotation", "Create")) { return; } PriceQuotationDetailUI loPriceQuotationDetail = new PriceQuotationDetailUI(); loPriceQuotationDetail.ParentList = this; loPriceQuotationDetail.ShowDialog(); } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnCreate_Click"); em.ShowDialog(); return; } }