public AddressModel GetAddressModel(UserSessionModel admin, AddressModel model)
        {
            //mass upload change - turned this off
            var htmlService = new HtmlServices(this.Context);

            if (model != null && model.AddressId.HasValue)
            {
                var query =
                    from address in this.Db.GetAddressQueryByAddressId(model.AddressId)
                    select new AddressModel
                {
                    AddressId    = address.AddressId,
                    AddressLine1 = address.AddressLine1,
                    AddressLine2 = address.AddressLine2,
                    AddressLine3 = address.AddressLine3,
                    Location     = address.Location,
                    PostalCode   = address.PostalCode,
                    StateId      = address.StateId,
                    StateName    = address.State.Name,
                    CountryCode  = address.State.CountryCode
                };

                model = query.FirstOrDefault();
            }

            return(model ?? new AddressModel());
        }
 public OverviewServices(DPOContext context)
     : base(context)
 {
     this.projectService    = new ProjectServices(context);
     this.htmlService       = new HtmlServices(context);
     this.conversionService = new ConversionServices(context);
 }
 public OverviewServices()
     : base()
 {
     this.projectService    = new ProjectServices();
     this.htmlService       = new HtmlServices();
     this.conversionService = new ConversionServices();
 }
        public void FinaliseModel(AddressModel model)
        {
            //mass upload change - had to turn these off
            var htmlService = new HtmlServices(this.Context);

            model.Countries = htmlService.DropDownModelCountries(model);
            model.States    = htmlService.DropDownModelStates(model);
        }
Esempio n. 5
0
 public BusinessServices(DPOContext context)
     : base(context)
 {
     this.addressService      = new AddressServices(this.Context);
     this.contactService      = new ContactServices(this.Context);
     this.businessLinkService = new BusinessLinkServices(this.Context);
     this.htmlService         = new HtmlServices(this.Context);
 }
Esempio n. 6
0
 public UserServices(DPOContext context)
     : base(context)
 {
     permissionService = new PermissionServices(this.Context);
     addressService    = new AddressServices(this.Context);
     contactService    = new ContactServices(this.Context);
     businessService   = new BusinessServices(this.Context);
     htmlService       = new HtmlServices(this.Context);
 }
        public ContactModel GetContactModel(UserSessionModel admin, ContactModel model)
        {
            var htmlService = new HtmlServices(this.Context);

            if (model != null && model.ContactId.HasValue)
            {
                var query =
                    from contact in this.Db.GetContactQueryByContactId(model.ContactId)
                    select new ContactModel
                {
                    ContactId    = contact.ContactId,
                    MobileNumber = contact.Mobile,
                    OfficeNumber = contact.Phone,
                    WebAddress   = contact.Website,
                    ContactEmail = contact.ContactEmail
                };

                model = query.FirstOrDefault();
            }

            return(model ?? new ContactModel());
        }
 public OrderServices(DPOContext context)
     : base(context)
 {
     htmlService = new HtmlServices(context);
 }
 public OrderServices() : base()
 {
     htmlService = new HtmlServices(this.Context);
 }
 public SubmittalPackageServices() : base()
 {
     htmlService    = new HtmlServices();
     projectService = new ProjectServices();
     quoteService   = new QuoteServices();
 }