private void ToggleEnableAssignBarns(Stage stage) { if (CurrentStageSelected != stage && !ucAssignBarns.BarnsAssigned.Any()) { CurrentStageSelected = stage; ucAssignBarns.Enabled = true; } else if (CurrentStageSelected != stage && ucAssignBarns.BarnsAssigned.Any()) { MessageBoxDisplayService .ShowConfirmationDialog( "Si cambia el estado del batch perdera todos las asignaciones de galpones cargadas en este formulario. Desea Continuar?", "Cambiar Estado", () => { ucAssignBarns.ClearAsignations(); CurrentStageSelected = stage; }); } else if (stage == null && !ucAssignBarns.BarnsAssigned.Any()) { ucAssignBarns.Enabled = false; } }
private void btnRemoveBarn_Click(object sender, EventArgs e) { MessageBoxDisplayService.ShowConfirmationDialog("Esta seguro que desea remover el galpón?", "Remover Galpon", OnBarnRemoved); }