Ejemplo n.º 1
0
        // GET: Academic/Delete/5
        public ActionResult Delete(int id)
        {
            var studentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId;

            AcademicMasterBAL.DeleteAcademic(studentId.ToString(), id);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
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));
            }
        }
        // GET: ManageProfile/Create
        public ActionResult Create()
        {
            var model = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name);

            model.CollageList = CollageMasterBAL.GetCollageList();
            model.GenderList  = UserProfileMasterBAL.BindGender();
            return(View(model));
        }
Ejemplo n.º 4
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));
        }
Ejemplo n.º 5
0
 public ActionResult Edit(int id, AcadamicMasterModel model)
 {
     try
     {
         // TODO: Add update logic here
         var studentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId;
         AcademicMasterBAL.UpdateAcademic(model, studentId.ToString(), id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Create(UserProfileMasterModel model)
        {
            model.StudentId   = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId;
            model.CollageList = CollageMasterBAL.GetCollageList();
            model.GenderList  = UserProfileMasterBAL.BindGender();

            if (ModelState.IsValid)
            {
                UserProfileMasterBAL.CreateProfile(model);
                return(RedirectToAction("Create"));
            }
            else
            {
                return(View(model));
            }
        }