Ejemplo n.º 1
0
        public ActionResult Create(AcadamicMasterModel model)
        {
            var studentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId;

            model.CollageName  = CollageMasterBAL.GetCollage(studentId.ToString()).CollageName;
            model.SemesterList = AcademicMasterBAL.BindSamester();
            model.GradeList    = AcademicMasterBAL.BindGrade();
            if (ModelState.IsValid)
            {
                try
                {
                    // TODO: Add insert logic here
                    AcademicMasterBAL.CreateProfile(model, studentId.ToString());
                    return(RedirectToAction("Index"));
                }
                catch (Exception Ex)
                {
                    return(View(Ex));
                }
            }
            else
            {
                return(View(model));
            }
        }
Ejemplo n.º 2
0
        // GET: Academic/Edit/5
        public ActionResult Edit(int id)
        {
            var studentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId;
            var model     = AcademicMasterBAL.Acadamic(User.Identity.Name, id);

            model.CollageName  = CollageMasterBAL.GetCollage(studentId.ToString()).CollageName;
            model.SemesterList = AcademicMasterBAL.BindSamester();
            model.GradeList    = AcademicMasterBAL.BindGrade();
            return(View(model));
        }