public ActionResult BatchDetails(int id, Batch batchModel)
        {
            AdminBlLayer.AdminLogic adminLogic = new AdminBlLayer.AdminLogic();
            var userId = 0;

            Int32.TryParse(TempData["userId"].ToString(), out userId);
            var batch = adminLogic.GetBatchById(id);

            var status = adminLogic.UpdateBatch(batch, userId);

            if (status == "Exiest")
            {
                TempData["Msg"] = "User is Already Sent a Registration Request for this course";
                return(RedirectToAction("ELearning", "Employee"));
            }
            else if (status == "Success")
            {
                TempData["Msg"] = "Nomination Sent Successfully";
                return(RedirectToAction("ELearning", "Employee"));
            }
            else if (status == "Failed")
            {
                TempData["Msg"] = "Batch Full, please try next time";
                return(RedirectToAction("ELearning", "Employee"));
            }
            else
            {
                TempData["Msg"] = "Something went Wrong!, please try after some time";
                return(RedirectToAction("ELearning", "Employee"));
            }
        }
Exemple #2
0
        public ActionResult ApproveOrRejectBatch(int id, int signal)
        {
            AdminBlLayer.AdminLogic adminLogic = new AdminBlLayer.AdminLogic();
            var batch   = adminLogic.GetBatchById(id);
            var faculty = facultyLogic.GetFacultyDetailsById(batch.FacultyId);

            if (signal == 1)
            {
                string nominationStatus = "Accepted";
                int?   batchId          = id;
                if (faculty != null && batch != null)
                {
                    bool value = facultyLogic.EditFacultyNominationStatus(faculty, nominationStatus, batchId, batch);
                }
                return(RedirectToAction("BatchRegistration", "Faculty"));
            }
            else
            {
                string nominationStatus = "Rejected";
                int?   batchId          = null;
                if (faculty != null)
                {
                    bool value = facultyLogic.EditFacultyNominationStatus(faculty, nominationStatus, batchId, batch);
                }
                return(RedirectToAction("BatchRegistration", "Faculty"));
            }
        }
 public ActionResult BatchDetails(int id)
 {
     AdminBlLayer.AdminLogic adminLogic = new AdminBlLayer.AdminLogic();
     return(View(adminLogic.GetBatchById(id)));
 }