Пример #1
0
        protected void repEmplois_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "btnEmp")
            {
                Session["IdEmp"] = e.CommandArgument.ToString();

                UpdateEmp.Visible = true;

                derDemandes.Visible    = false;
                nvDemandes.Visible     = false;
                PostJob.Visible        = false;
                mesEmplois.Visible     = false;
                modifierCompte.Visible = false;

                int id   = int.Parse(Session["IdEmp"].ToString());
                int idus = int.Parse(Session["idUser"].ToString());


                Emploi emps = db.Emploi.Where(w => w.idEmploi == id && w.idEntreprise == idus).First();
                txttitre.Text          = emps.titre;
                txtvilleemp.Text       = emps.ville;
                txtnbpost.Text         = emps.nbPostes.ToString();
                txtdateechan.Text      = emps.dateEcheance.ToString("yyyy-MM-dd");
                txtsalaire.Text        = emps.Salaire.ToString();
                txtDescriptionemp.Text = emps.descrip;
            }
        }
Пример #2
0
 private void ExecuteUnLoaded()
 {
     Close            = false;
     SelectedAgent    = null;
     _SelectedStatut  = null;
     _SelectedService = null;
     _SelectedEmploi  = null;
 }
Пример #3
0
 public Goblin(Emploi emploi, int salaire, Goblin collegue, Goblin superieur)
 {
     id             = nextId++;
     this.emploi    = emploi;
     this.salaire   = salaire;
     stress         = 0;
     greviste       = false;
     this.collegue  = collegue;
     this.superieur = superieur;
 }
Пример #4
0
        public static EmploiWPF GetEmploiWPF(this Emploi vm)
        {
            EmploiWPF wpf = new EmploiWPF();

            wpf.diplomeMin = vm.DiplomeMin;
            if (vm.ExpMin != null)
            {
                wpf.experienceMin = (int)vm.ExpMin;
            }
            wpf.fonction       = vm.Fonction;
            wpf.jobDescription = vm.Desc;
            wpf.offreEmploiId  = vm.Id;
            return(wpf);
        }
Пример #5
0
        protected void btn_update_emp_ServerClick(object sender, EventArgs e)
        {
            int    id   = int.Parse(Session["IdEmp"].ToString());
            Emploi emps = db.Emploi.SingleOrDefault(x => x.idEmploi == id);

            emps.titre        = txttitre.Text;
            emps.ville        = txtvilleemp.Text;
            emps.nbPostes     = int.Parse(txtnbpost.Text);
            emps.dateEcheance = DateTime.Parse(txtdateechan.Text).Date;
            emps.Salaire      = double.Parse(txtsalaire.Text);
            emps.descrip      = txtDescriptionemp.Text;

            db.SubmitChanges();

            reset(this);
            Listjob_ServerClick(sender, e);
        }
Пример #6
0
        public async void Initialize()
        {
            ParamGlobaux   = _dataService.ParamGlobaux;
            EnableImprimer = false;

            oConnection      = ClassLibraryProget.DataBase.OpenSqlServer(_dataService.ParamGlobaux.ConnectionString);
            DureeMaxCDDCourt = Convert.ToInt32(Parametres.RechercherParametres(oConnection, ParamGlobaux.IDEtablissement, "", "Durée maxi CDD court"));
            oConnection.Close();

            IsEnable = true;

            //Initialisation des listes///////////

            SelectedAgent = new AgentModel();
            PeriodeCommun = new ObservableCollection <PeriodeModulation>();

            var taskAgents   = _dataService.GetAgentsContratsAsync();
            var taskStatuts  = _dataService.GetStatutsAsync(true);
            var taskServices = _dataService.GetServicesAsync(true);
            var taskEmplois  = _dataService.GetEmploisAsync(true);


            await Task.WhenAll(taskAgents, taskStatuts, taskServices, taskEmplois);

            _TousAgents = taskAgents.Result.ToList();

            Agents = new ObservableCollection <AgentModel>(_TousAgents.Distinct().OrderBy(a => a.Prenom).OrderBy(a => a.Nom));

            Statuts  = taskStatuts.Result;
            Services = taskServices.Result;
            Emplois  = taskEmplois.Result;



            //On initialise les selections sur la ligne vide
            _SelectedStatut  = Statuts[0];
            _SelectedService = Services[0];
            _SelectedEmploi  = Emplois[0];

            SelectAllAgents = false;
            UpdateListePeriodes();
        }
        public ActionResult AjouterEmploi([Bind(Include = "FileName, FilePath")] Emploi emploi, HttpPostedFileBase emploiFile, int id)
        {
            string filename = string.Empty;
            string filepath = string.Empty;

            filename = emploiFile.FileName;
            string ext = Path.GetExtension(filename);

            if (ext == ".pdf")
            {
                var a = emploi.SelectedSaison;
                filepath = Server.MapPath("~//Files//");
                emploiFile.SaveAs(filepath + filename);

                emploi.FileName = filename;
                emploi.FilePath = "~//Files//";
                var groupe = dbContext.Groupes.FirstOrDefault(g => g.Id == id);
                emploi.Groupe = groupe;
                var saison = dbContext.Saisons.FirstOrDefault(g => g.Id == 1);
                emploi.Saison = saison;

                dbContext.Emplois.Add(emploi);
                try
                {
                    dbContext.SaveChanges();
                }
                catch (DbEntityValidationException dbEx)
                {
                    var error = "";
                    foreach (var validationErrors in dbEx.EntityValidationErrors)
                    {
                        foreach (var validationError in validationErrors.ValidationErrors)
                        {
                            error += "Property:   " + validationError.PropertyName + " Error:  " + validationError.ErrorMessage + "\n";
                            return(Content(error));
                        }
                    }
                }
            }
            return(View());
        }
Пример #8
0
        //Modifier Emplois
        protected void Button1_Click(object sender, EventArgs e)
        {
            Emploi ep = new Emploi();

            ep.dateCreation = DateTime.Now;
            ep.titre        = Titre_ann.Text;
            ep.descrip      = Description.Text;
            ep.domain       = DropDownList1.SelectedItem.ToString();
            ep.ville        = ville.Text;
            ep.nbPostes     = int.Parse(nbPost.Text);
            ep.IdContrat    = int.Parse(DropDownList2.SelectedValue);
            ep.IdProfession = int.Parse(DropDownList3.SelectedValue);
            ep.Salaire      = float.Parse(salaire.Text);
            ep.idEntreprise = int.Parse(Session["idUser"].ToString());;
            ep.dateEcheance = DateTime.Parse(dateEch.Text);
            ep.emploiEtat   = true;
            db.Emploi.InsertOnSubmit(ep);
            db.SubmitChanges();

            reset(this);

            Listjob_ServerClick(sender, e);
        }
Пример #9
0
 public Coffrier(Emploi emploi, int salaire, Goblin collegue, Goblin superieur, Goblin employe)
 {
     super(emploi, salaire, collegue, superieur, employe);
 }
Пример #10
0
 public void setEmploi(Emploi emploi)
 {
     this.emploi = emploi;
 }
Пример #11
0
 public Receptionniste(Emploi emploi, int salaire, Goblin collegue, Goblin superieur, Goblin employe)
 {
     super(emploi, salaire, collegue, superieur, employe);
 }
Пример #12
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            Emploi ge = new Emploi();

            ge.Show();
        }
Пример #13
0
        private void label8_Click(object sender, EventArgs e)
        {
            Emploi ge = new Emploi();

            ge.Show();
        }