示例#1
0
        private void btnCredito_Click(object sender, EventArgs e)
        {
            this.Enabled = false;
            FormCredito frm = new FormCredito(lblTotal.Text);

            frm.ShowDialog();
            this.Enabled = true;
            BusinesPagamento.CadastroPedidoPagamento(TiposPagamento.Crédito, int.Parse(lblIdPedido.Text), decimal.Parse(lblTotal.Text), decimal.Parse(lblTroco.Text));
            try
            {
                string rpta = BusinesPedido.FecharCompra(Convert.ToInt32(lblIdPedido.Text), StatusPedido.Fechado);
                lblIdPedido.Text           = "idpedido";
                txtPesquisaProduto.Enabled = false;
                lblCompraAberta.Text       = "Compra Finalizada... *F5 PARA ABRIR UMA NOVA COMPRA";
                DisableBtn();
                btnFechar.Enabled = true;
                lblTrocoT.Text    = "Troco:";
                if (rpta.Equals("OK"))
                {
                    lblPagamento.Text = TiposPagamento.Crédito.ToString();
                }
                else
                {
                    MessageBox.Show(rpta);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
            CompraEmAndamento = true;
        }
示例#2
0
 private void tblCreditos_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         int  id   = (int)tblCreditos.Rows[e.RowIndex].Cells["id"].Value;
         Form form = new FormCredito(id);
         form.ShowDialog();
     }
 }