Exemplo n.º 1
0
 public Contact(User user, Candidate candidate, String observation, String description )
 {
     this.candidate = candidate;
     this.user = user;
     this.observation = observation;
     this.description = description;
     this.date = DateTime.Now;
 }
Exemplo n.º 2
0
 public Skill(Candidate candidate, Technology tech, Seniority seniority, int years, String certificate,
     String observations, DateTime since, DateTime until, DateTime lastModif)
 {
     this.candidate = candidate;
         this.technology = tech;
         this.seniority = seniority;
         this.years = years;
         this.certificate = certificate;
         this.observations = observations;
         this.since = since;
         this.until = until;
         this.lastModification = lastModif;
 }
Exemplo n.º 3
0
        protected void btnAltaCand_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                String candName = !"".Equals(txtCandNombre.Text) ? txtCandNombre.Text : "";
                String candLastName = !"".Equals(txtCandApellido.Text) ? txtCandApellido.Text : "";
                String candDNI = !"".Equals(txtCandDNI.Text) ? txtCandDNI.Text : "";
                String candEmail = !"".Equals(txtCandEmail.Text) ? txtCandEmail.Text : "";
                String candPhone = !"".Equals(txtCandTelefono.Text) ? txtCandTelefono.Text : "";
                String candAddress = !"".Equals(txtCandDomicilio.Text) ? txtCandDomicilio.Text : "";
                DateTime candBirthday = !"".Equals(txtCandFechaNacimiento.Text) ? DateParser.parse(txtCandFechaNacimiento.Text) : DateTime.Now;

                if ("Ingresar".Equals(btnAltaCand.Text)) // es porque es un alta
                {
                    if (!candDao.existsCandidate(candDNI))
                    {
                        if (!"".Equals(candName) && !"".Equals(candLastName) && !"".Equals(candDNI) && !"".Equals(candEmail)
                            && !"".Equals(candPhone) && !"".Equals(candAddress) && !DateTime.Now.Equals(candBirthday))
                        {
                            Candidate cand = new Candidate { Name = candName, LastName = candLastName, DNI = candDNI, email = candEmail, phone = candPhone, address = candAddress, birthday = candBirthday };
                            candDao.saveOrUpdate(cand);
                            //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Recurso ingresado exitosamente!')", true);
                            disableCandidateFields();
                            makeSkillOptionsVisible();
                            this.lblCandId.Text = cand.Id.ToString();
                            filler.fillComboData(this.cmbTechs, techDao);
                            filler.fillComboData(this.cmbSeniority, seniorityDao);
                        }
                        else
                        {
                            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Ocurrió un error al dar de alta el recurso')", true);
                        }
                    }else{
                        Candidate cand = candDao.getCandidatesByField(candDNI, "DNI", 1)[0];
                        fillCandidateData(cand.Id.ToString());
                        disableCandidateFields();
                        makeSkillOptionsVisible();
                        filler.fillComboData(this.cmbTechs, techDao);
                        filler.fillComboData(this.cmbSeniority, seniorityDao);
                    }

                }
                else if ("Guardar".Equals(btnAltaCand.Text))
                { // es porque es una modificacion
                    try
                    {
                        long candidateId = Convert.ToInt32(this.lblCandId.Text);
                        Candidate candidate = candDao.getById(candidateId);
                        candidate.Name = this.txtCandNombre.Text;
                        candidate.LastName = this.txtCandApellido.Text;
                        candidate.DNI = this.txtCandDNI.Text;
                        candidate.email = this.txtCandEmail.Text;
                        candidate.phone = this.txtCandTelefono.Text;
                        candidate.address = this.txtCandDomicilio.Text;
                        candidate.birthday = DateParser.parse(this.txtCandFechaNacimiento.Text);
                        candDao.saveOrUpdate(candidate);
                        //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Candidato actualizado exitosamente!')", true);
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "$('#popupText').text('Edición exitosa!');ShowModalPopup();", true);
                    }
                    catch (Exception ex) { }
                }
            }
        }