private void btnPayment_Click(object sender, EventArgs e) { if (frmPayments == null || !Form.ActiveForm.Contains(frmPayments)) { //CloseForm(); this.Visible = false; frmPayments = new Screen.POS.frmReceipt(); frmPayments.Show(); //AddFormToMainPanel(frmServices); } }
private void dgview_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { var senderGrid = (DataGridView)sender; if (e.RowIndex >= 0) { var id = Convert.ToInt64(senderGrid.Rows[e.RowIndex].Cells[0].Value); if (id > 0) { frmReceipt frm = new frmReceipt() { Mode = Models.EntryMode.Edit, ReceiptId = id }; if (frm.ShowDialog() == DialogResult.OK) { Search(dtpFrom.Value, dtpTo.Value, null); } } } }
public void Initialize(RFForm args) { CultureInfo invariantCulture = CultureInfo.InvariantCulture; if (!(args is frmGetProduct)) { return; } this.m_Form = (frmGetProduct)args; this.m_Parent = (frmReceipt)args.Parent; this.con = DBConnection.Open(m_Form); if (this.m_Form.Parent != null && string.Compare(this.m_Form.Parent.GetType().ToString().ToLower(invariantCulture), "Mantis.LVision.rfReceipt.frmReceipt".ToLower(invariantCulture), false) == 0) { ReceiptCode = m_Parent.txtReceiptCode.Value.ToString(); this.m_Form.txtProduct.Validating += new OnValidationEventHandler(this.txtProduct_Validating); this.m_bReadOnlyMultiplier = true; this.m_Form.txtMultiplier.Enter += new OnEnterEventHandler(this.txtMultiplier_Enter); } }
/// <summary> /// Displays form consisting of the current order's information /// </summary> private void ShowReceipt() { Form receipt = new frmReceipt(order); receipt.ShowDialog(); }