예제 #1
0
        private void HoraForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.comboBox1.Items.Clear();
                foreach (Proyecto p in proyectoService.listar())
                {
                    this.comboBox1.Items.Add(p);
                }
                if (proyectoSelected != null)
                {
                    this.comboBox1.SelectedItem = proyectoSelected;
                }

                this.createButton.Visible = true;
                this.deleteButton.Visible = false;
                this.saveButton.Visible   = false;
                this.cancelButton.Visible = true;
            }
            catch (ProEasyException pEx)
            {
                showError(i18n().GetString("errors." + pEx.Code));
            }
            catch (Exception)
            {
                showError(i18n().GetString("errors.1"));
            }
        }
예제 #2
0
 private void ProyectoForm_Load(object sender, EventArgs e)
 {
     try
     {
         this.listado.Rows.Clear();
         List <Proyecto> proyectos = proyectoService.listar();
         foreach (Proyecto proyecto in proyectos)
         {
             this.listado.Rows.Add(new object[] { proyecto.Id, proyecto.Nombre, proyecto.Habilitado });
         }
         this.createButton.Visible    = true;
         this.deleteButton.Visible    = false;
         this.saveButton.Visible      = false;
         this.cancelButton.Visible    = true;
         this.resourcesButton.Visible = false;
     }
     catch (ProEasyException pEx)
     {
         showError(i18n().GetString("errors." + pEx.Code));
     }
     catch (Exception)
     {
         showError(i18n().GetString("errors.1"));
     }
 }