Exemple #1
0
 protected override Church Parse()
 {
     return(new Church
     {
         Id = ToInt(SimbahanID),
         StreetNumber = ToInt(StreetNo),
         StreetName = StreetName.ToString(),
         Barangay = Barangay.ToString(),
         StateProvince = StateOrProvince.ToString(),
         City = City.ToString(),
         ZipCode = ZipCode.ToString(),
         CompleteAddress = CompleteAddress.ToString(),
         Diocese = Diocese.ToString(),
         Parish = Parish.ToString(),
         Priest = ParishPriest.ToString(),
         Vicariate = Vicariate.ToString(),
         DateEstablished = DateEstablished.ToString(),
         LastUpdate = ToDateTime(LastUpdate),
         FeastDay = FeastDay.ToString(),
         ContactNo = ContactNo.ToString(),
         Latitude = ToDouble(Latitude),
         Longitude = ToDouble(Longitude),
         HasAdorationChapel = ToBoolean(HasAdorationChapel),
         ChurchHistory = ChurchHistory.ToString(),
         OfficeHours = OfficeHours.ToString(),
         ChurchTypeId = ToInt(ChurchTypeID),
         Website = Website.ToString(),
         EmailAddress = EmailAddress.ToString(),
         DevotionSchedule = DevotionSchedule.ToString(),
         LocationId = ToInt(LocationID),
         ChurchCode = ChurchCode.ToString()
     });
 }
Exemple #2
0
        public ActionResult GetView(string viewName, int churchId)
        {
            ModuleBase viewModel = null;
            var        viewPath  = "/Views/Church/";

            switch (viewName.ToLower())
            {
            case "attributes":
            {
                viewModel = new ChurchAttributes(churchId);
                viewPath += "_ChurchAttributes.cshtml";
                break;
            }

            case "communication":
            {
                viewModel = new ChurchCommunication(churchId);
                viewPath += "_ChurchCommunication.cshtml";
                break;
            }

            case "notes":
            {
                viewModel = new ChurchNotes(churchId);
                viewPath += "_ChurchNotes.cshtml";
                break;
            }

            case "history":
            {
                viewModel = new ChurchHistory(churchId);
                viewPath += "_ChurchHistory.cshtml";
                break;
            }

            case "teams":
            {
                viewModel = new ChurchTeams(churchId);
                viewPath += "_ChurchTeams.cshtml";
                break;
            }

            default:
            {
                viewModel = new ChurchProfile();
                viewPath += "_ChurchProfile.cshtml";
                break;
            }
            }

            //viewModel.Load();

            return(PartialView(viewPath, viewModel));
        }