Ejemplo n.º 1
0
 private int FormatAndSetFormationDate(CtrlAttributesEnregistrer attEnregistrer, Formation formation1, int param_renseign)
 {
     DateTime date = new DateTime(attEnregistrer.param_f_formation1_date_debut_annee.Value, attEnregistrer.param_f_formation1_date_debut_mois.Value, 1);
     formation1.frmDateDebut=date;
     param_renseign++;
     return param_renseign;
 }
        public ActionResult Create(FormCollection collection)
        {
            try
            {

                AjoutFormationSvc controller = new AjoutFormationSvc();
                SessionContainer scc = new SessionContainer();

                CtrlAttributesEnregistrer attributes = new CtrlAttributesEnregistrer();
                attributes.param_f_formation1_diplome = collection["Diplome"];
                attributes.param_f_formation1_lieu = collection["Lieu"];
                attributes.param_f_niveau_formation = int.Parse(collection["Niveau"]);

                controller.DoEnregistrer(scc, attributes);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Ejemplo n.º 3
0
 private bool HasStartingMonthAndYear(CtrlAttributesEnregistrer attEnregistrer)
 {
     return attEnregistrer.param_f_formation1_date_debut_mois != null
            && attEnregistrer.param_f_formation1_date_debut_annee != null;
 }