Example #1
0
        public ActionResult Create()
        {
            List <School>            sc    = SchoolManager.GetSchools();
            CreateSchoolWrapperModel model = new CreateSchoolWrapperModel(new School(), sc);

            return(View(model));
        }
Example #2
0
        public ActionResult CreateTeacherForIdari(User user, Teacher teacher)
        {
            TempData["EventResult"] = TeacherManager.addTeacher(user, teacher);
            if (((SG_BLL.Tools.Result)TempData["EventResult"]).Status.Equals("error"))
            {
                var schools = SchoolManager.GetSchools();
                var list    = new SelectList(schools, "SchoolId", "Ad");
                ViewBag.SchoolList = list;

                var             items = new List <UnvanHelper>();
                ResourceManager rm    = new ResourceManager("SinavGorevlendirme.Resources.Genel", typeof(TeacherController).Assembly);

                foreach (var unv in Enum.GetValues(typeof(EnumUnvan)))
                {
                    items.Add(new UnvanHelper((int)unv, rm.GetString(unv.ToString())));
                }

                var unvanList = new SelectList(items, "UnvanId", "Unvan");

                ViewBag.UnvanList = unvanList;
                return(View());
            }

            return(RedirectToAction("CreateTeacherForIdari"));
        }
        //
        // GET: /Sinav/

        public ActionResult Create()
        {
            var schools = SchoolManager.GetSchools();
            var list    = new SelectList(schools, "SchoolId", "Ad");

            ViewBag.SchoolList = list;

            return(View());
        }
        public ActionResult Create(Sinav sinav, SinavOturum oturum, FormCollection collection)
        {
            TempData["EventResult"] = SinavManager.SinavOlustur(sinav, collection);

            if (((SG_BLL.Tools.Result)TempData["EventResult"]).Status.Equals("error"))
            {
                var schools = SchoolManager.GetSchools();
                var list    = new SelectList(schools, "SchoolId", "Ad");
                ViewBag.SchoolList = list;
                return(View());
            }

            return(RedirectToAction("Create"));
        }
Example #5
0
        public ActionResult MultiCreateTeacher(HttpPostedFileBase uploadfile)
        {
            TempData["EventResult"] = TeacherManager.addTeacher(uploadfile);

            if (((SG_BLL.Tools.Result)TempData["EventResult"]).Status.Equals("error"))
            {
                var schools = SchoolManager.GetSchools();
                var list    = new SelectList(schools, "SchoolId", "Ad");
                ViewBag.SchoolList = list;
                return(View());
            }

            return(RedirectToAction("CreateTeacher"));
        }
Example #6
0
        public ActionResult CreateTeacher()
        {
            var schools = SchoolManager.GetSchools();
            var list    = new SelectList(schools, "SchoolId", "Ad");

            ViewBag.SchoolList = list;

            var             items = new List <UnvanHelper>();
            ResourceManager rm    = new ResourceManager("SinavGorevlendirme.Resources.Genel", typeof(TeacherController).Assembly);

            foreach (var unv in Enum.GetValues(typeof(EnumUnvan)))
            {
                items.Add(new UnvanHelper((int)unv, rm.GetString(unv.ToString())));
            }

            var unvanList = new SelectList(items, "UnvanId", "Unvan");

            ViewBag.UnvanList = unvanList;
            return(View());
        }
Example #7
0
        public ActionResult TeacherEdit(int OgretmenId)
        {
            List <School> schList = SchoolManager.GetSchools();

            var list = new SelectList(schList, "SchoolId", "Ad");

            ViewBag.SchoolList = list;

            var             items = new List <UnvanHelper>();
            ResourceManager rm    = new ResourceManager("SinavGorevlendirme.Resources.Genel", typeof(TeacherController).Assembly);

            Teacher tch = TeacherManager.GetTeacher(OgretmenId);
            User    usr = UserManager.GetUserByTeacherId(OgretmenId);

            var Kidemler = new SelectList(new[]
            {
                new{ Text = "1", Value = "1" },
                new{ Text = "2", Value = "2" },
                new{ Text = "3", Value = "3" },
            },
                                          "Text", "Value", tch.Kidem);

            ViewBag.Kidemler = Kidemler;

            foreach (var unv in Enum.GetValues(typeof(EnumUnvan)))
            {
                items.Add(new UnvanHelper((int)unv, rm.GetString(unv.ToString())));
            }

            var unvanList = new SelectList(items, "UnvanId", "Unvan", tch.Unvan);

            ViewBag.UnvanList = unvanList;

            //School sch = SchoolManager.GetSchoolByTCNo(usr.TCKimlik);

            TeacherWrapperModel model = new TeacherWrapperModel(usr, tch, new School());

            return(View(model));
        }
Example #8
0
        public ActionResult SchoolList()
        {
            List <School> sc = SchoolManager.GetSchools();

            return(View(sc));
        }