public static frmVenda GetInstancia() { if (_Instancia == null) { _Instancia = new frmVenda(); } return(_Instancia); }
private void btnVendasProduto_Click(object sender, EventArgs e) { subMenuVendas.Visible = false; subMenuVendas.Hide(); frmVenda frm = frmVenda.GetInstancia(); frm.ShowDialog(); frm.idfuncionario = Convert.ToInt32(this.IdFuncionario); }
private void btnVendaData_Click(object sender, EventArgs e) { SubMenuConsultas.Visible = false; SubMenuConsultas.Hide(); frmVenda frm = new frmVenda(); frm.ShowDialog(); frm.OcultarTab(); }
private void dataLista_DoubleClick(object sender, EventArgs e) { frmVenda form = frmVenda.GetInstancia(); string par1, par2; par1 = Convert.ToString(dataLista.CurrentRow.Cells["idcliente"].Value); par2 = Convert.ToString(dataLista.CurrentRow.Cells["nome"].Value); form.setCliente(par1, par2); this.Hide(); }
private void dataLista_DoubleClick(object sender, EventArgs e) { frmVenda form = frmVenda.GetInstancia(); string par1, par2; decimal par3, par4; int par5; DateTime par6; par1 = Convert.ToString(this.dataLista.CurrentRow.Cells["iddetalhe_entrada"].Value); par2 = Convert.ToString(this.dataLista.CurrentRow.Cells["nome"].Value); par3 = Convert.ToDecimal(this.dataLista.CurrentRow.Cells["preco_compra"].Value); par4 = Convert.ToDecimal(this.dataLista.CurrentRow.Cells["preco_venda"].Value); par5 = Convert.ToInt32(this.dataLista.CurrentRow.Cells["estoque_atual"].Value); par6 = Convert.ToDateTime(this.dataLista.CurrentRow.Cells["data_vencimento"].Value); form.setProduto(par1, par2, par3, par4, par5, par6); this.Hide(); }
private void frmVenda_FormClosed(object sender, FormClosedEventArgs e) { _Instancia = null; }