public ActionResult Delete(string id) { MajorList majorList = new MajorList(); majorList.DeleteMajorByCode(id); return(RedirectToAction("Index")); }
// GET: Major public ActionResult Index(string id, string name) { MajorList majorList = new MajorList(); var obj = majorList.getData(id, name); return(View(obj)); }
protected override void InitVM() { var ss = DC.Set <School>().ToList(); TransferItmes = DC.Set <School>().GetSelectListItems(null, null, y => y.SchoolName); MajorList.CopyContext(this); }
// Use this for initialization void Start() { MajorList AllMajors = Resources.Load("myMajorList") as MajorList; List <string> myNames = new List <string> (); AllMajors.MyMajors.ForEach(x => myNames.Add(x.name)); MyDropdown.ClearOptions(); MyDropdown.AddOptions(myNames); }
public ActionResult Edit(string id) { MajorList majorList = new MajorList(); major _majorList = majorList.GetMajorByCode(id); FacilityList facilityList = new FacilityList(); var obj = facilityList.ListAll(); ViewBag.facilityCode = new SelectList(obj, "code", "name", _majorList.facilitycode); return(View(_majorList)); }
public void characterCreation() { Debug.Log("Character Created"); mainChar.charName = namePicker.text; //set character object name to the text entered MajorList AllMajors = Resources.Load <MajorList>("myMajorList"); //Get a list of majors int ThisMajor = majorChoice.value; //find the major that was picked Major MyMajor = AllMajors.MyMajors [ThisMajor]; //retrieve the major mainChar.myTrans = TranscriptBuilder.Create(MyMajor); //create a transcript for that major }
public ActionResult Create(major cl) { FacilityList facilityList = new FacilityList(); //Khởi tạo biếm có giá trị là class được khai báo trong models/batch var obj = facilityList.ListAll(); //Gọi hàm listall khai báo trong class trong models lấy ra danh sách batch ViewBag.facilityCode = new SelectList(obj, "code", "name"); //Đưa viewBag vào view //try //{ // TODO: Add insert logic here MajorList majorList = new MajorList(); majorList.Insert(cl); //Gọi đến hàm addClass trong class ClassList trong models return(RedirectToAction("Index")); //} //catch //{ // return View(); //} }
public ActionResult Edit(string id, major cl) { FacilityList facilityList = new FacilityList(); var obj = facilityList.ListAll(); ViewBag.facilityCode = new SelectList(obj, "code", "name"); //try //{ // TODO: Add insert logic here MajorList majorList = new MajorList(); majorList.UpdateMajor(id, cl); //Gọi đến hàm addClass trong class ClassList trong models return(RedirectToAction("Index")); //} //catch //{ // return View(); //} }