Exemplo n.º 1
0
        //Calculating Marks on the basis of Checklist
        public ActionResult ChecklistCalculation(PrevisitProcess model)
        {
            if (!ModelState.IsValid)
                return RedirectToAction("ApplicationAdminDetail", "AffiliationAdminSide");
            int marks = calculate_marks(model);
            int gainedMarks = (marks * 100) / 16;
            int id = 0;
            var result = db.BI_pop_insertion_ID_from_Affi_Admin_Appli_Form_Result();
            foreach (var res in result)
            {
                id = Convert.ToInt16(res.Value.ToString());
                break;
            };
            for (int i = 1; i <= 16; i++)
            {
                db.BI_Affi_Insert_Admin_Appli_Form_Result_dtail(Convert.ToInt16(AffiliationAdminDetail.Application_id), id, Convert.ToInt16(AffiliationAdminDetail.Inst_Id_for_Admin), i, "Get Value From Table", Serial_result[i - 1]);
            }
            db.BI_Insert_affi_Admin_Appli_Form_marks_and_remarks(Convert.ToInt16(AffiliationAdminDetail.Application_id), gainedMarks, model.remarksApp);
            if (model.isAcceptedApp)
            {
                db.BI_Affi_Insert_Admin_Appli_Form_Result(Convert.ToInt16(AffiliationAdminDetail.Inst_Id_for_Admin), Convert.ToInt16(AffiliationAdminDetail.Application_id), true, true);
                //show accepetion message
            }
            else
            {
                db.BI_Affi_Insert_Admin_Appli_Form_Result(Convert.ToInt16(AffiliationAdminDetail.Inst_Id_for_Admin), Convert.ToInt16(AffiliationAdminDetail.Application_id), false, false);

            }

            return RedirectToAction("/ApplicationForm");
        }
Exemplo n.º 2
0
 // function for calculation of marks for application admin detail
 public int calculate_marks(PrevisitProcess model)
 {
     int count = 0;
     if (model.SubjectApplied == true)
     { Serial_result[0] = 1; count++; } 
     if (model.SubjectAlreadyAffiliated == true)
     { Serial_result[1] = 1; count++; }
     if (model.AffiliationWithBISE == true)
     { Serial_result[2] = 1; count++; }
     if (model.NOCFromGovt == true)
     { Serial_result[3] = 1; count++; }
     if (model.Prospectus == true)
     { Serial_result[4] = 1; count++; }
     if (model.Building == true)
     { Serial_result[5] = 1; count++; }
     if (model.StudentsHostel == true)
     { Serial_result[6] = 1; count++; }
     if (model.StaffResidence == true)
     { Serial_result[7] = 1; count++; }
     if (model.Finance == true)
     { Serial_result[8] = 1; count++; }
     if (model.SportFacility == true)
     { Serial_result[9] = 1; count++; }
     if (model.TeachingStaff == true)
     { Serial_result[10] = 1; count++; }
     if (model.NonTeaching == true)
     { Serial_result[11] = 1; count++; }
     if (model.Library == true)
     { Serial_result[12] = 1; count++; }
     if (model.Labortary == true)
     { Serial_result[13] = 1; count++; }
     if (model.OtherDetail == true)
     { Serial_result[14] = 1; count++; }
     if (model.DemandDraft == true)
     { Serial_result[15] = 1; count++; }
     return count;
 }