コード例 #1
0
ファイル: Niveau.cs プロジェクト: Hogeschool-Leiden/MDLO
 public static Niveau FromCompetentie(Competentie competentie)
 {
     return(new Niveau(
                competentie.BeheersingsNiveau.ArchitectuurLaag.ArchitectuurLaagNaam,
                competentie.BeheersingsNiveau.Activiteit.ActiviteitNaam,
                competentie.BeheersingsNiveau.Niveau
                ));
 }
コード例 #2
0
 public void AddCompetentie(Competentie competentie)
 {
     CompetentiesLijst.Add(new VacatureCompetentie
     {
         Vacature      = this,
         VacatureId    = this.Id,
         Competentie   = competentie,
         CompetentieId = competentie.Id
     });
 }
コード例 #3
0
 public void AddCompetentie(Competentie competentie, Mogelijkheid geselecteerdeOptie)
 {
     CompetentiesLijst.Add(new VacatureCompetentie
     {
         Vacature           = this,
         VacatureId         = this.Id,
         Competentie        = competentie,
         CompetentieId      = competentie.Id,
         GeselecteerdeOptie = geselecteerdeOptie
     });
 }
コード例 #4
0
 public ActionResult Edit(Competentie entity)
 {
     try
     {
         var value = _unitOfWork.GetRepository <Competentie>().Edit(entity);
         return(value != null?Json(new { success = false, strError = value }) : Json(new { success = true }));
     }
     catch (Exception)
     {
         return(Json(new { success = false }));
     }
 }
コード例 #5
0
        /// <summary>
        /// Export name to a section in a document
        /// </summary>
        /// <param name="toExport">The data to export from</param>
        /// <param name="sect">The section to write on</param>
        /// <returns>The section with appended data</returns>
        public override Section Export(Competentie toExport, Section sect)
        {
            base.Export(toExport, sect);

            //custom code
            Paragraph p = sect.AddParagraph();

            p.Format.Font.Color = Colors.DarkGray;
            p.AddText("Code: " + (toExport.Code ?? ""));
            p.AddLineBreak();

            return(sect);
        }
コード例 #6
0
        /// <summary>
        /// Export name to a section in a document
        /// </summary>
        /// <param name="toExport">The data to export from</param>
        /// <param name="sect">The section to write on</param>
        /// <returns>The section with appended data</returns>
        public override Section Export(Competentie toExport, Section sect)
        {
            base.Export(toExport, sect);

            //custom code
            Paragraph p = sect.AddParagraph();

            p.AddFormattedText((toExport.Naam ?? "Data niet gevonden"), "Heading1");
            p.Format.OutlineLevel = OutlineLevel.Level1;
            p.AddBookmark((toExport.Naam ?? "Data niet gevonden"));
            p.AddLineBreak();

            return(sect);
        }
コード例 #7
0
        /// <summary>
        /// Export name to a section in a document
        /// </summary>
        /// <param name="toExport">The data to export from</param>
        /// <param name="sect">The section to write on</param>
        /// <returns>The section with appended data</returns>
        public override Section Export(Competentie toExport, Section sect)
        {
            base.Export(toExport, sect);

            //custom code
            Paragraph p = sect.AddParagraph("Over deze Competentie", "Heading2");

            p.AddLineBreak();

            p = sect.AddParagraph((toExport.Beschrijving ?? "").Replace("$$", "\n"));
            p.AddLineBreak();

            return(sect);
        }
コード例 #8
0
        public ActionResult Delete(string code, string schooljaar)
        {
            if (code == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Competentie competentie = _unitOfWork.GetRepository <Competentie>().GetOne(new object[] { code, schooljaar });

            if (competentie == null)
            {
                return(HttpNotFound());
            }

            return(PartialView("~/Views/Admin/Curriculum/Competentie/_Delete.cshtml", competentie));
        }
コード例 #9
0
        public ActionResult Create(Competentie entity)
        {
            try
            {
                var schooljaren = _unitOfWork.GetRepository <Schooljaar>().GetAll().ToArray();
                if (!schooljaren.Any())
                {
                    return(Json(new { success = false }));
                }
                var schooljaar = schooljaren.Last();

                entity.Schooljaar = schooljaar.JaarId;

                var value = _unitOfWork.GetRepository <Competentie>().Create(entity);
                return(value != null?Json(new { success = false, strError = value }) : Json(new { success = true }));
            }
            catch (Exception)
            {
                return(Json(new { success = false }));
            }
        }
コード例 #10
0
        public ActionResult Create()
        {
            var competentie = new Competentie();

            return(PartialView("~/Views/Admin/Curriculum/Competentie/_Add.cshtml", competentie));
        }