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() }); }
protected override Organization Parse() { return(new Organization { Id = ToInt(OrganizationID), Name = OrganizationName.ToString(), About = About.ToString(), LastUpdate = ToDateTime(LastUpdate), Address = CompleteAddress.ToString(), StreetName = StreetName.ToString(), StreetNumber = ToInt(StreetNo), Barangay = Barangay.ToString(), City = CityOrMunicipality.ToString(), State = StateOrProvince.ToString(), Country = Country.ToString(), DateEstablished = DateEstablished.ToString(), ParentOrganization = ParentOrganization.ToString(), Preacher = FeastBuilderOrPreacher.ToString(), Branch = BranchOrLocation.ToString(), ContactNumber = ContactNo.ToString(), Email = EmailAddress.ToString(), Website = Website.ToString(), Longitude = (float)Convert.ToDouble(Longitude), Latitude = (float)Convert.ToDouble(Latitude), RetreatSchedule = RetreatSchedule.ToString(), RecollectionSchedule = RecollectionSchedule.ToString(), TalkSchedule = TalkSchedule.ToString(), CampSchedule = CampSchedule.ToString(), VolunteerSchedule = VolunteerSchedule.ToString(), OrgMasking = MaskingData.ToString() }); }
public async Task <ActionResult <CompleteAddress> > PostCompleteAddress(CompleteAddress completeAddress) { _context.CompleteAddresses.Add(completeAddress); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCompleteAddress", new { id = completeAddress.CompleteAddress_Id }, completeAddress)); }
public async Task <IActionResult> PutCompleteAddress(int id, CompleteAddress completeAddress) { if (id != completeAddress.CompleteAddress_Id) { return(BadRequest()); } _context.Entry(completeAddress).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompleteAddressExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public Schema() : base() { InstanceType = typeof(__SingleFr__); Properties.ClearExposed(); Html = Add <__TString__>("Html"); Html.DefaultValue = "/Noman/SingleFranchiseeView.html"; Html.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__Html__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__Html__ = (System.String)_v_; }, false); Name = Add <__TString__>("Name$"); Name.DefaultValue = ""; Name.Editable = true; Name.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__Name__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__Name__ = (System.String)_v_; }, false); Houses = Add <__TArray__>("Houses"); Houses.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__Houses__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__Houses__ = (__Arr__)_v_; }, false); House_No = Add <__TString__>("House_No$"); House_No.DefaultValue = ""; House_No.Editable = true; House_No.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__House_No__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__House_No__ = (System.String)_v_; }, false); Street = Add <__TString__>("Street$"); Street.DefaultValue = ""; Street.Editable = true; Street.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__Street__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__Street__ = (System.String)_v_; }, false); ZipCode = Add <__TString__>("ZipCode$"); ZipCode.DefaultValue = ""; ZipCode.Editable = true; ZipCode.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__ZipCode__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__ZipCode__ = (System.String)_v_; }, false); City = Add <__TString__>("City$"); City.DefaultValue = ""; City.Editable = true; City.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__City__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__City__ = (System.String)_v_; }, false); State = Add <__TString__>("State$"); State.DefaultValue = ""; State.Editable = true; State.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__State__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__State__ = (System.String)_v_; }, false); Country = Add <__TString__>("Country$"); Country.DefaultValue = ""; Country.Editable = true; Country.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__Country__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__Country__ = (System.String)_v_; }, false); CompleteAddress = Add <__TString__>("CompleteAddress", bind: "CompleteAddress"); CompleteAddress.DefaultValue = ""; CompleteAddress.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__CompleteAddress__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__CompleteAddress__ = (System.String)_v_; }, false); CreateNewHouse = Add <__TLong__>("CreateNewHouse$"); CreateNewHouse.DefaultValue = 0L; CreateNewHouse.Editable = true; CreateNewHouse.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__CreateNewHouse__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__CreateNewHouse__ = (System.Int64)_v_; }, false); CreateNewHouse.AddHandler((Json pup, Property <Int64> prop, Int64 value) => { return(new Input.CreateNewHouse() { App = (SingleFranchiseeView)pup, Template = (TLong)prop, Value = value }); }, (Json pup, Starcounter.Input <Int64> input) => { ((SingleFranchiseeView)pup).Handle((Input.CreateNewHouse)input); }); SaveCurrentFranchiseeInfo = Add <__TLong__>("SaveCurrentFranchiseeInfo$"); SaveCurrentFranchiseeInfo.DefaultValue = 0L; SaveCurrentFranchiseeInfo.Editable = true; SaveCurrentFranchiseeInfo.SetCustomAccessors((_p_) => { return(((__SingleFr__)_p_).__bf__SaveCurrentFranchiseeInfo__); }, (_p_, _v_) => { ((__SingleFr__)_p_).__bf__SaveCurrentFranchiseeInfo__ = (System.Int64)_v_; }, false); SaveCurrentFranchiseeInfo.AddHandler((Json pup, Property <Int64> prop, Int64 value) => { return(new Input.SaveCurrentFranchiseeInfo() { App = (SingleFranchiseeView)pup, Template = (TLong)prop, Value = value }); }, (Json pup, Starcounter.Input <Int64> input) => { ((SingleFranchiseeView)pup).Handle((Input.SaveCurrentFranchiseeInfo)input); }); }
public string ToOneLineString() { if (!string.IsNullOrWhiteSpace(CompleteAddress)) { return(CompleteAddress.Replace("\r\n", " ").Replace('\r', ' ').Replace('\n', ' ')); } return(string.Join(" ", new[] { Name, Street, ZipCode, City, CountryCode }.Where(s => s.Length > 0))); }
private static CompleteAddress ParseSingleAddress(Node address) { var newAddress = new CompleteAddress(); newAddress.City = address.Tag.Find(t => t.Key == "addr:city")?.Value; newAddress.HouseNumber = address.Tag.Find(t => t.Key == "addr:housenumber")?.Value; newAddress.PostCode = address.Tag.Find(t => t.Key == "addr:postcode")?.Value; newAddress.State = address.Tag.Find(t => t.Key == "addr:state")?.Value; newAddress.Street = address.Tag.Find(t => t.Key == "addr:street")?.Value; newAddress.Latitude = address.Latitude; newAddress.Longitude = address.Longitude; return(newAddress); }
public void CopyPropertiesTest2() { var address = new CompleteAddress() { Id = 0, City = "Rennes", Street = "rue de la paix", State = 33, Country = "France" }; var email1 = "*****@*****.**"; var email2 = "*****@*****.**"; var emails = new List <string>() { email1, email2 }; var objOrigin = new Customer { Id = 0, Address = address, Emails = emails }; var objDestination = new Employee(); CopyUtils.CopyProperties(objDestination, objOrigin); Assert.IsTrue(objDestination.Id.Equals(objOrigin.Id)); Assert.IsNull(objDestination.Name); Assert.IsTrue(objDestination.Address.Equals(objOrigin.Address)); }
public Schema() : base() { InstanceType = typeof(__HousesVi__); Properties.ClearExposed(); Html = Add <__TString__>("Html"); Html.DefaultValue = "/Noman/HousesView.html"; Html.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__Html__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__Html__ = (System.String)_v_; }, false); url = Add <__TString__>("url", bind: "url"); url.DefaultValue = ""; url.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__url__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__url__ = (System.String)_v_; }, false); House_No = Add <__TString__>("House_No$"); House_No.DefaultValue = ""; House_No.Editable = true; House_No.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__House_No__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__House_No__ = (System.String)_v_; }, false); Street = Add <__TString__>("Street$"); Street.DefaultValue = ""; Street.Editable = true; Street.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__Street__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__Street__ = (System.String)_v_; }, false); ZipCode = Add <__TString__>("ZipCode$"); ZipCode.DefaultValue = ""; ZipCode.Editable = true; ZipCode.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__ZipCode__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__ZipCode__ = (System.String)_v_; }, false); City = Add <__TString__>("City$"); City.DefaultValue = ""; City.Editable = true; City.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__City__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__City__ = (System.String)_v_; }, false); State = Add <__TString__>("State$"); State.DefaultValue = ""; State.Editable = true; State.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__State__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__State__ = (System.String)_v_; }, false); Country = Add <__TString__>("Country$"); Country.DefaultValue = ""; Country.Editable = true; Country.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__Country__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__Country__ = (System.String)_v_; }, false); TransactionTime = Add <__TString__>("TransactionTime$"); TransactionTime.DefaultValue = ""; TransactionTime.Editable = true; TransactionTime.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__TransactionTime__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__TransactionTime__ = (System.String)_v_; }, false); SalePrice = Add <__TLong__>("SalePrice$"); SalePrice.DefaultValue = 0L; SalePrice.Editable = true; SalePrice.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__SalePrice__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__SalePrice__ = (System.Int64)_v_; }, false); Commision = Add <__TLong__>("Commision$"); Commision.DefaultValue = 0L; Commision.Editable = true; Commision.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__Commision__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__Commision__ = (System.Int64)_v_; }, false); CompleteAddress = Add <__TString__>("CompleteAddress", bind: "CompleteAddress"); CompleteAddress.DefaultValue = ""; CompleteAddress.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__CompleteAddress__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__CompleteAddress__ = (System.String)_v_; }, false); Longitude = Add <__TString__>("Longitude$"); Longitude.DefaultValue = ""; Longitude.Editable = true; Longitude.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__Longitude__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__Longitude__ = (System.String)_v_; }, false); Latitude = Add <__TString__>("Latitude$"); Latitude.DefaultValue = ""; Latitude.Editable = true; Latitude.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__Latitude__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__Latitude__ = (System.String)_v_; }, false); latitude = Add <__TLong__>("latitude", bind: "latitude"); latitude.DefaultValue = 0L; latitude.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__latitude__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__latitude__ = (System.Int64)_v_; }, false); longitude = Add <__TLong__>("longitude", bind: "longitude"); longitude.DefaultValue = 0L; longitude.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__longitude__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__longitude__ = (System.Int64)_v_; }, false); RegisterHouse = Add <__TLong__>("RegisterHouse$"); RegisterHouse.DefaultValue = 0L; RegisterHouse.Editable = true; RegisterHouse.SetCustomAccessors((_p_) => { return(((__HousesVi__)_p_).__bf__RegisterHouse__); }, (_p_, _v_) => { ((__HousesVi__)_p_).__bf__RegisterHouse__ = (System.Int64)_v_; }, false); RegisterHouse.AddHandler((Json pup, Property <Int64> prop, Int64 value) => { return(new Input.RegisterHouse() { App = (HousesView)pup, Template = (TLong)prop, Value = value }); }, (Json pup, Starcounter.Input <Int64> input) => { ((HousesView)pup).Handle((Input.RegisterHouse)input); }); }