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")); }
public ActionResult Create() { List <School> sc = SchoolManager.GetSchools(); CreateSchoolWrapperModel model = new CreateSchoolWrapperModel(new School(), sc); return(View(model)); }
// // GET: /Sinav/ public ActionResult Create() { var schools = SchoolManager.GetSchools(); var list = new SelectList(schools, "SchoolId", "Ad"); ViewBag.SchoolList = list; return(View()); }
private static void RestartManagers() { RoomManager.Restart(); SchoolManager.Restart(); GarageManager.Restart(); TManager.Restart(); DontDestroy.Restart(); Clearing(); }
public IEnumerable <School> ShcoolList() { var cm = new SchoolManager(); //不能把StudentManager变成静对象保证每次都NEW出来 //cm.GetList(); //cm.Delete(1); List <School> _list = cm.GetList(); return(_list); }
public ActionResult TeacherEditForIdari(int OgretmenId) { HttpCookie myCookie = new HttpCookie("LoginCookie"); myCookie = Request.Cookies["LoginCookie"]; Int64 tcno = Convert.ToInt64(myCookie.Value.Split('=')[1].ToString()); School sch = SchoolManager.GetSchoolByTCNo(tcno); List <School> schList = new List <School>(); schList.Add(sch); var list = new SelectList(schList, "SchoolId", "Ad"); ViewBag.SchoolList = list; if (myCookie != null) { ViewBag.School = sch.Ad; ViewBag.SchoolId = sch.SchoolId; } 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, sch); return(View(model)); }
private void ShowMenu() { List <string> menu = SchoolManager.GetMainMenu(); Console.WriteLine("MAIN MENU"); foreach (string option in menu) { Console.WriteLine(option); } Console.WriteLine(); }
public FrmTeacherList() { try { InitializeComponent(); schoolMan = new SchoolManager(); LoadListToGrid(); } catch (Exception ex) { Logger.LogException(ex); } }
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")); }
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")); }
public FrmStudent(int Id) { try { InitializeComponent(); schoolMan = new SchoolManager(); _student = new Student(); _id = Id; } catch (Exception ex) { Logger.LogException(ex); _student = new Student(); } }
public dynamic AddShcool([FromBody] SchoolViewModel model) { var cm = new SchoolManager(); model.Id = Guid.NewGuid().ToString(); try { cm.Insert(model); } catch (Exception ex) { throw; } return(Ok()); }
public static void Main(string[] args) { var pupils = new List <Pupil>(); var schools = new List <School>(); using (var sr = new StreamReader("schools.txt")) { int pupilsNumber = int.Parse(sr.ReadLine()); while (pupilsNumber-- > 0) { pupils.Add(GetPupil(sr.ReadLine().Split())); } int schoolsNumber = int.Parse(sr.ReadLine()); while (schoolsNumber-- > 0) { schools.Add(GetSchool(sr.ReadLine().Split("; "), pupils)); } int commandsNumber = int.Parse(sr.ReadLine()); while (commandsNumber-- > 0) { string[] command = sr.ReadLine().Split(); switch (command[0]) { case "mv": SchoolManager.TransferPupil(pupils, schools, pupilId: int.Parse(command[1]), newSchoolNumber: command[2]); break; case "union": var schoolsNumbers = command.Skip(1).ToList(); SchoolManager.UniteSchools(schools, schoolsNumbers); break; case "close": SchoolManager.CloseSchool(schools, schoolNumber: command[1], newSchoolNumber: command[2]); break; } } } using (var sw = new StreamWriter("schools_after_reform.txt")) { schools.ForEach(sw.WriteLine); } }
public ActionResult SinavListeForIdari() { HttpCookie myCookie = new HttpCookie("LoginCookie"); myCookie = Request.Cookies["LoginCookie"]; Int64 tcno = Convert.ToInt64(myCookie.Value.Split('=')[1].ToString()); School sch = SchoolManager.GetSchoolByTCNo(tcno); ViewBag.SchoolId = sch.SchoolId; var oturumlar = new List <SinavOturum>(); oturumlar = SinavManager.SinavListe((int)SG_DAL.Enums.EnumSinavDurum.OnaylanmisSinav); var sinavlist = new SinavListeWrapperModel(new List <Sinav>(), oturumlar, SettingManager.GetSettings(), new List <SinavOturum>(), new List <SinavOturum>()); return(View(sinavlist)); }
public ActionResult TeacherListForIdari() { HttpCookie myCookie = new HttpCookie("LoginCookie"); myCookie = Request.Cookies["LoginCookie"]; Int64 tcno = Convert.ToInt64(myCookie.Value.Split('=')[1].ToString()); School sch = SchoolManager.GetSchoolByTCNo(tcno); List <Teacher> teacher = TeacherManager.GetTeacherListBySchoolId(sch.SchoolId); //ResourceManager rm = new ResourceManager("SinavGorevlendirme.Resources.Genel", typeof(TeacherController).Assembly); //foreach (var tch in teacher) //{ // tch.Unvan = rm.GetString((SG_DAL.Enums.EnumUnvan)tch.Unvan); //} return(View(teacher)); }
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()); }
public ActionResult CreateTeacherForIdari() { HttpCookie myCookie = new HttpCookie("LoginCookie"); myCookie = Request.Cookies["LoginCookie"]; //Int64 tcno = Convert.ToInt64(myCookie.Value.Split('&')[0].Split('=')[1].ToString()); Int64 tcno = Convert.ToInt64(myCookie.Value.Split('=')[1].ToString()); School sch = SchoolManager.GetSchoolByTCNo(tcno); List <School> schList = new List <School>(); schList.Add(sch); var list = new SelectList(schList, "SchoolId", "Ad"); ViewBag.SchoolList = list; if (myCookie != null) { ViewBag.School = sch.Ad; ViewBag.SchoolId = sch.SchoolId; } 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()); }
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)); }
// Use this for initialization void Start() { GiggleSource.pitch = 1 * Random.RandomRange(.75F, 1.5F); int skin = Random.Range(0, Skins.Length - 1); for (int i = 0; i < Skins.Length; i++) { if (i == skin) { Skins[i].SetActive(true); } else { Skins[i].SetActive(false); } } RB = GetComponent <Rigidbody>(); Agent = GetComponent <NavMeshAgent>(); School = GameObject.FindObjectOfType <SchoolManager>(); CurrentState = States.Roam; thought = GetComponent <IdleThoughtSystem>(); }
public FrmStandard(int Id) { try { InitializeComponent(); schoolMan = new SchoolManager(); _standard = new Standard(); _id = Id; if (_id != -1) { _standard = schoolMan.GetStandardById(_id); txtName.Text = _standard.Name; } } catch (Exception ex) { Logger.LogException(ex); _standard = new Standard(); } finally { isFormLoaded = true; } }
public FrmTeacher(int Id) { try { InitializeComponent(); schoolMan = new SchoolManager(); _teacher = new Teacher(); _id = Id; if (_id != -1) { _teacher = schoolMan.GetTeacherById(_id); txtName.Text = _teacher.Name; } } catch (Exception ex) { Logger.LogException(ex); _teacher = new Teacher(); } finally { isFormLoaded = true; } }
public ActionResult SinavGorevlendirme(int SinavOturumId) { var setting = SettingManager.GetSettings(); string sortlist = string.Empty; var sinavokullar = SchoolManager.GetSinavOturumOkullari(SinavOturumId); var ogrt = new List <Teacher>(); var oturum = SinavManager.GetSinavOturum(SinavOturumId); var tumOturumlar = SinavManager.GetSinavOturumlari(oturum.Sinav.SinavId); // sınav DUrumları Ekleniyor var durumitems = new List <SinavDurumHelper>(); ResourceManager rm = new ResourceManager("SinavGorevlendirme.Resources.Genel", typeof(SinavController).Assembly); foreach (var enmDurum in Enum.GetValues(typeof(EnumSinavDurum))) { durumitems.Add(new SinavDurumHelper((int)enmDurum, rm.GetString(enmDurum.ToString() + "Kisa"), "")); } var durumlar = new SelectList(durumitems, "SinavDurumId", "Durum", oturum.SinavOturumDurumId); ViewBag.SinavDurumalar = durumlar; // end sınav durumları var items = new List <OturumHelper>(); foreach (var otr in tumOturumlar) { items.Add(new OturumHelper(otr.SinavOturumId, otr.OturumNo + ". Oturum")); } var oturumlist = new SelectList(items, "SinavOturumId", "Oturum", SinavOturumId); ViewBag.OturumList = oturumlist; var snvOtrOkl = SinavManager.GetSinavOturumOkullari(SinavOturumId); var gorevliler = new List <SinavGorevli>(); if (setting.GenelBasvuru) { ogrt = TeacherManager.GetTeacherListForGenelBasvuru(); } else { ogrt = TeacherManager.GetTeacherListForOzelBasvuru(SinavOturumId); } gorevliler = SinavManager.GetSinavGorevliler(SinavOturumId, (int)SG_DAL.Enums.EnumSinavGorev.Gozetmen); if (gorevliler.Count() > 0) { foreach (var item in ogrt) { var tekgorevli = SinavManager.GetSinavGorevli(SinavOturumId, item.TeacherId); if (tekgorevli == null) { tekgorevli = new SinavGorevli(); tekgorevli.SiraNo = 9999999; } item.SinavGorevli = tekgorevli; } ogrt = ogrt.OrderBy(d => d.SinavGorevli.SiraNo).ToList(); } else { if (setting.GozetmenSiralama1 != 0) { sortlist += "[" + setting.GozetmenSiralama1 + ",0], "; } if (setting.GozetmenSiralama2 != 0) { sortlist += "[" + setting.GozetmenSiralama2 + ",0], "; } if (setting.GozetmenSiralama3 != 0) { sortlist += "[" + setting.GozetmenSiralama3 + ",0], "; } if (sortlist != string.Empty) { sortlist = sortlist.Substring(0, sortlist.Length - 2); } } ViewBag.SortList = sortlist; var model = new SinavGorevlendirmeWrapperModel(ogrt, sinavokullar, oturum, setting, snvOtrOkl); return(View(model)); }
public ActionResult MultiCreateSchool(HttpPostedFileBase uploadfile) { TempData["EventResult"] = SchoolManager.addSchool(uploadfile); return(RedirectToAction("Create")); }
public ActionResult OkulSil(int OkulId) { TempData["EventResult"] = SchoolManager.deleteSchool(OkulId); return(RedirectToAction("Create", "School")); }
private void DoMainAction(MenuOptions MainOption) { bool AutoOrManualInput; switch (MainOption) { case MenuOptions.InputStudents: InsertStudents(); break; case MenuOptions.ShowStudents: StudentManager.ShowStudents(true); Console.ReadKey(); break; case MenuOptions.InputTrainers: AutoOrManualInput = ChooseInputType("trainers"); TrainerManager.InputTrainers(AutoOrManualInput); break; case MenuOptions.ShowTrainers: TrainerManager.ShowTrainers(true); Console.ReadKey(); break; case MenuOptions.InputAssignments: AutoOrManualInput = ChooseInputType("assignments"); AssignmentManager.InputAssignments(AutoOrManualInput); break; case MenuOptions.ShowAssignments: AssignmentManager.ShowAssignments(true); Console.ReadKey(); break; case MenuOptions.InputCourses: AutoOrManualInput = ChooseInputType("corses"); CourseManager.InputCourses(AutoOrManualInput); break; case MenuOptions.ShowCourses: CourseManager.ShowCourses(true); Console.ReadKey(); break; case MenuOptions.ManageConnections: int ConnectChoice; ConnectionMenuOptions connectOption; do { ConnectChoice = SchoolManager.ShowConnectionsMenuAndChoose(); connectOption = (ConnectionMenuOptions)ConnectChoice; SchoolManager.DoConnectionAction(connectOption); } while (connectOption != ConnectionMenuOptions.Exit); break; case MenuOptions.CheckDateForSubmissions: SchoolManager.CheckDateForSubmissions(); break; default: break; } }
private void ShowGreetMessage() { Console.WriteLine(SchoolManager.GetGreetMessage()); }
public SchoolManager Update(SchoolManager entity) { return(_corporationManagerDal.Update(entity)); }
public void Delete(SchoolManager entity) { _corporationManagerDal.Delete(entity); }
public SchoolManager Add(SchoolManager entity) { return(_corporationManagerDal.Add(entity)); }
static void Main(string [] args) { SchoolManager sm = new SchoolManager(); sm.sortStudByRollNo(); }