Exemplo n.º 1
0
        private void btnSelecionar_Click(object sender, EventArgs e)
        {
            if (dgv.RowCount == 0)
            {
                FNotificao.AlerForm("Não Nenhum Fármaco Selecionado", TipoNotificacao.info);
            }
            else
            {
                if (dgv.CurrentRow.Cells[13].Value.ToString() == "Disponível")
                {
                    Estoque es = new Estoque();

                    // txtPrijs textbox está Invisível no Formulario Venda
                    //f.txtPrijs.Text = dgv.CurrentRow.Cells[10].Value.ToString();
                    if (dgv.CurrentRow.Cells[11].Value.ToString() == "")
                    {
                        es.Descricao = "Sem Descrição";
                    }
                    else
                    {
                        es.Descricao = dgv.CurrentRow.Cells[11].Value.ToString();
                    }
                    Funcionario dto = new Funcionario();
                    FVenda      f   = FVenda.getInstancia(dto);
                    f.txtCod.Text    = dgv.CurrentRow.Cells[4].Value.ToString();
                    f.txtDescri.Text = dgv.CurrentRow.Cells[11].Value.ToString();
                    f.txtPreco.Text  = dgv.CurrentRow.Cells[10].Value.ToString();
                    f.txtPrijs.Text  = dgv.CurrentRow.Cells[10].Value.ToString();
                    f.txtEstok.Text  = dgv.CurrentRow.Cells[5].Value.ToString();
                    f.txtProd.Text   = dgv.CurrentRow.Cells[3].Value.ToString();
                    if (dgv.CurrentRow.Cells[12].Value.ToString() == "")
                    {
                        f.picBox.Image = new Bitmap(Application.StartupPath + "\\Imagens\\image_100px.png");
                    }
                    else
                    {
                        f.picBox.Image    = new Bitmap(Application.StartupPath + "\\Imagens\\" + dgv.CurrentRow.Cells[12].Value.ToString());
                        f.picBox.SizeMode = PictureBoxSizeMode.StretchImage;
                    }

                    f.Show();
                    Listar();
                }
                else
                {
                    FNotificao.AlerForm("O Fármaco Selecionaro Não Encontra-se DISPONÍVEL", TipoNotificacao.aviso);
                }
            }
        }
Exemplo n.º 2
0
 private void btnCaixa_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["FVenda"] == null)
     {
         FAbrirCaixa frm = new FAbrirCaixa();
         frm.NomeGlobal  = _NomeGlobal;
         frm.CargoGlobal = _CargoGlobal;
         frm.SenhaGlobal = _SenhaGlobal;
         frm.IdGlobal    = _IdGlobal;
         frm.ShowDialog();
     }
     else
     {
         Funcionario dto = new Funcionario();
         FVenda      f   = FVenda.getInstancia(dto);
         f.Show();
     }
 }
Exemplo n.º 3
0
 private void btnAbrir_Click(object sender, EventArgs e)
 {
     if (Logado == false)
     {
         if (cbCaixa.SelectedIndex != 0)
         {
             AbrirCaixa();
         }
         else
         {
             errorP.SetError(cbCaixa, "!");
             FNotificao.AlerForm("Selecionar o Caixa", TipoNotificacao.aviso);
         }
     }
     else
     {
         FVenda f = FVenda.getInstancia(null);
         f.Show();
     }
 }