private void nextStep() { if (Session.getCarrinho() == null) { if (loginDB.checkAdmin(username.Text)) { adminDashboard admin = new adminDashboard(); admin.Show(); this.Hide(); } else { Home home = new Home(); home.Show(); this.Hide(); } } else { if (Session.GetClientes().UseCard || Session.GetClientes().UsePIMCoin) { PagoConfirmForm pagoConfirm = new PagoConfirmForm(); this.Hide(); pagoConfirm.Show(); } else { MessageBox.Show("Cliente nao possui metodo de pagamento. Por favor adicione o tipo de pagamento "); tipodepago tipodePagoForm = new tipodepago(); this.Hide(); tipodePagoForm.Show(); } } }
private void button2_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(textBox2.Text)) { Session.GetClientes().UsePIMCoin = true; BlockPIM block = new BlockPIM(Session.GetClientes().IdUsuario, textBox2.Text); blockDB.newKey(block.IdCliente, block.Key); clienteDB.updateUsePIMCoin(block.IdCliente); PagoConfirmForm payment = new PagoConfirmForm(); this.Hide(); payment.Show(); } else { MessageBox.Show("Adicione sua chave PIMcoin publica"); } }