private void btnReportSX_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } C_Quotation_KDModel model = (C_Quotation_KDModel)C_Quotation_KDBO.Instance.FindByPK(id); frmQuotationReportSX frm = new frmQuotationReportSX(); frm.Quotation = model; frm.Show(); }
private void btnEdit_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } C_Quotation_KDModel model = (C_Quotation_KDModel)C_Quotation_KDBO.Instance.FindByPK(id); _rownIndex = grvData.FocusedRowHandle; frmQuotationKD frm = new frmQuotationKD(); frm.CurrentQuotation = model; frm.LoadDataChange += main_LoadDataChange; frm.Show(); }
private void hủyDuyệtToolStripMenuItem_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } DialogResult result = MessageBox.Show("Bạn có chắc muốn hủy duyệt báo giá này?", TextUtils.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.No) { return; } C_Quotation_KDModel model = (C_Quotation_KDModel)C_Quotation_KDBO.Instance.FindByPK(id); model.IsApproved = false; C_Quotation_KDBO.Instance.Update(model); grvData.SetFocusedRowCellValue(colIsApproved, false); }
protected C_Quotation_KDFacade(C_Quotation_KDModel model) : base(model) { }