private void dgvSangria_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         int idSangria = Convert.ToInt32(dgvSangria.CurrentRow.Cells[0].Value);
         InstanciarSangriaRepositorio();
         SangriaViewModel sangriaViewModel = _sangriaRepositorio.GetViewModelPorID(id: idSangria);
         if (OpenMdiForm.OpenForWithShowDialog(new frmCriarSangria(EnumSangria.Exibir, sangriaViewModel)) == DialogResult.Yes)
         {
             ;
         }
     }
     catch (CustomException error)
     {
         DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso");
     }
     catch (Exception error)
     {
         SaveErroInTxt.RecordInTxt(error, this.GetType().Name);
         DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso");
     }
 }
Beispiel #2
0
 public frmCriarSangria(EnumSangria enumSangria, SangriaViewModel sangria)
 {
     _enumSangria = enumSangria;
     _sangria     = sangria;
     InitializeComponent();
 }