Exemplo n.º 1
0
        public ActionResult Delete(string id)
        {
            MajorList majorList = new MajorList();

            majorList.DeleteMajorByCode(id);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        // GET: Major
        public ActionResult Index(string id, string name)
        {
            MajorList majorList = new MajorList();
            var       obj       = majorList.getData(id, name);

            return(View(obj));
        }
Exemplo n.º 3
0
        protected override void InitVM()
        {
            var ss = DC.Set <School>().ToList();

            TransferItmes = DC.Set <School>().GetSelectListItems(null, null, y => y.SchoolName);

            MajorList.CopyContext(this);
        }
Exemplo n.º 4
0
    // 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);
    }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 6
0
    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
    }
Exemplo n.º 7
0
        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();
            //}
        }
Exemplo n.º 8
0
        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();
            //}
        }