예제 #1
0
        public ActionResult AllocateUID(CitizenViewModel citizenModel)
        {
            var admin = new ASTIAdmin();

            //Right now not clear about what allocate uid is supposed to do, just making IsPending as false
            admin.AllocateUserId(citizenModel.ApplicationNumber);

            ViewBag.IsUIDAllocated = true;

            return(View("UIDAllocation"));
        }
예제 #2
0
        public ActionResult ProcessPendingApplication()
        {
            ASTIAdmin admin = new ASTIAdmin();

            var pendingApplications = admin.GetAllPendingApplications();

            var applicationModel = new ApplicationViewModel()
            {
                PendingApplications   = pendingApplications,
                SelectedApplicationId = 1
            };

            return(View(applicationModel));
        }
예제 #3
0
        public ActionResult RegisterStaff(StaffViewModel staffModel)
        {
            ASTIAdmin admin = new ASTIAdmin();

            var staffId = admin.GetNewStaffId(staffModel.AadharStaff);

            if (staffId > 0)
            {
                staffModel.AadharStaff.StaffId = staffId;
                return(View("RegistrationSuccessful", staffModel));
            }
            else
            {
                return(View("Error"));
            }
        }
예제 #4
0
        public ActionResult RegisterPincode(PincodeViewModel pincodeModel)
        {
            var admin   = new ASTIAdmin();
            var pinCode = new PincodeRegistration();

            pinCode.Area        = pincodeModel.Area;
            pinCode.Incharge    = pincodeModel.Incharge;
            pinCode.Location    = pincodeModel.Location;
            pinCode.Password    = pincodeModel.Password;
            pinCode.Pincode     = pincodeModel.Pincode;
            pinCode.StationName = pincodeModel.StationName;
            pinCode.StationType = pincodeModel.StationType;

            var pinCodeId = admin.RegisterPinCode(pinCode);

            ViewBag.IsPincodeRegistered = true;
            return(View());
        }
예제 #5
0
        public ActionResult ProcessCitizen(CitizenViewModel citizenModel)
        {
            if (citizenModel.SelectedProcess == "Accept")
            {
                var admin   = new ASTIAdmin();
                var citizen = new Citizen();

                citizen = admin.GetAadharInformation(citizenModel.ApplicationNumber);

                citizenModel.AadharNumber   = citizen.AadharNumber;
                citizenModel.AadharPassword = citizen.AadharPassword;

                return(View("UIDAllocation", citizenModel));
            }
            else
            {
                return(View("Rejected"));
            }
        }
예제 #6
0
        public ActionResult ProcessPendingApplication(ApplicationViewModel appModel)
        {
            var selectedApplicationNumber = appModel.SelectedApplicationId;
            var citizenModel = new CitizenViewModel();
            var admin        = new ASTIAdmin();

            var pendingCitizen = admin.GetPendingCitizen(selectedApplicationNumber);

            citizenModel.Name               = pendingCitizen.Name;
            citizenModel.Address            = pendingCitizen.Address;
            citizenModel.Contact            = pendingCitizen.Contact;
            citizenModel.DateOfBirth        = pendingCitizen.DateOfBirth;
            citizenModel.FatherName         = pendingCitizen.FatherName;
            citizenModel.Gender             = pendingCitizen.Gender;
            citizenModel.Occupation         = pendingCitizen.Occupation;
            citizenModel.ImagePath          = pendingCitizen.ImagePath;
            citizenModel.PinCode            = pendingCitizen.PinCode;
            citizenModel.SurveyorName       = pendingCitizen.SurveyorName;       //Should be recieved from DB
            citizenModel.ApplicationNumber  = selectedApplicationNumber;
            citizenModel.DateOfRegistration = pendingCitizen.DateOfRegistration; //Should be recieved from DB
            citizenModel.IsPending          = pendingCitizen.IsPending;

            return(View("ProcessCitizen", citizenModel));
        }