示例#1
0
        private void mnuNovo_Click(object sender, EventArgs e)
        {
            var frm = new FormCadastroVenda(this.Usuario);

            if (frm.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            CarregarGridView();
        }
示例#2
0
 private void Editar()
 {
     if (gridView.SelectedRows.Count > 0)
     {
         var id  = Convert.ToInt32(gridView.SelectedRows[0].Cells[0].Value);
         var obj = new VendaDAO().BuscarPorId(id);
         obj.Itens = new ItemVendaDAO().BuscarPorVenda(obj.Id);
         var frm = new FormCadastroVenda(obj, this.Usuario);
         if (frm.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         CarregarGridView();
     }
 }