Exemplo n.º 1
0
        private ShippingDetail GetShippingDetailData(long shippingOptionId, long shippingAddressId)
        {
            IOrganizationRoleUserRepository organizationRoleUserRepository = new OrganizationRoleUserRepository();
            var addressRepository = IoC.Resolve <IAddressRepository>();

            var shippingDetail = new ShippingDetail
            {
                ShippingOption       = new ShippingOption(),
                DataRecorderMetaData =
                    new DataRecorderMetaData
                {
                    DataRecorderCreator =
                        organizationRoleUserRepository.GetOrganizationRoleUser(IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId)
                    ,
                    DateCreated  = DateTime.Now,
                    DateModified = DateTime.Now
                },
                Status          = ShipmentStatus.Processing,
                ShippingAddress = addressRepository.GetAddress(shippingAddressId)
            };
            var shippingOptionRepository = IoC.Resolve <IShippingOptionRepository>();
            var shippingOption           = shippingOptionRepository.GetById(shippingOptionId);

            shippingDetail.ShippingOption.Id = shippingOption.Id;
            shippingDetail.ActualPrice       = shippingOption.Price;

            return(shippingDetail);
        }
Exemplo n.º 2
0
    public string[] GetSalesRepForFranchisee(string prefixText, int count, string contextKey)
    {
        List <string> items           = new List <string>();
        long          intFranchiseeID = 0;

        if (contextKey != null && contextKey != "")
        {
            intFranchiseeID = Convert.ToInt64(contextKey);
        }

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService objService = new HealthYes.Web.UI.FranchiseeFranchiseeUserService.FranchiseeFranchiseeUserService();
        // remove services references
        FranchiseeDAL franchiseeDAL = new FranchiseeDAL();

        //HealthYes.Web.UI.FranchiseeFranchiseeUserService.EUser[] objEUser = objService.GetSalesRepForFranchisee(prefixText, intFranchiseeID, true, 0, true);
        List <Falcon.Entity.Other.EUser> objEUser = franchiseeDAL.GetSalesRepForFranchisee(prefixText, intFranchiseeID, 0);

        try
        {
            string struser = string.Empty;
            IOrganizationRoleUserRepository orgRoleUserRepository = new OrganizationRoleUserRepository();

            foreach (Falcon.Entity.Other.EUser objUser in objEUser)
            {
                var orgRoleUser = orgRoleUserRepository.GetOrganizationRoleUser(objUser.UserID, Falcon.App.Core.Enum.Roles.SalesRep, intFranchiseeID);
                struser = objUser.FirstName + " [" + orgRoleUser.Id.ToString() + "]";
                items.Add(struser);
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }
        return(items.ToArray());
    }
Exemplo n.º 3
0
        private void GetCustomer(OrderDetail activeOrderDetail)
        {
            IOrganizationRoleUserRepository organizationRoleUserRepository = new OrganizationRoleUserRepository();
            var forOrganizationRoleUser =
                organizationRoleUserRepository.GetOrganizationRoleUser(activeOrderDetail.ForOrganizationRoleUserId);
            ICustomerRepository customerRepository = new CustomerRepository();

            Customer   = customerRepository.GetCustomerByUserId(forOrganizationRoleUser.UserId);
            CustomerId = Customer.CustomerId;
        }
        public void ParsePrintOrderShippingPsv()
        {
            var          organizationRoleUserRepository = new OrganizationRoleUserRepository();
            var          statusUpdatedBy = organizationRoleUserRepository.GetOrganizationRoleUser(1);
            const string filePath        = @"C:\Documents and Settings\nitint\Desktop\EmpoweredReport.csv";
            Int32        successRecordCount;
            var          repository = new PrintOrderRepository();

            repository.ParsePrintOrderShippingCsv(filePath, statusUpdatedBy, out successRecordCount);
        }
        public void ConfirmPrintOrderItemStatusByHsc()
        {
            var repository = new PrintOrderItemRepository();

            const string confirmeByName   = "Ram lal";
            DateTime     confirmationDate = DateTime.Now;
            const string sourceCode       = "F1547A";
            var          organizationRoleUserRepository = new OrganizationRoleUserRepository();
            var          statusUpdatedBy = organizationRoleUserRepository.GetOrganizationRoleUser(1);

            repository.ConfirmPrintOrderItemStatusByHsc(confirmeByName, confirmationDate, sourceCode, statusUpdatedBy);
        }
Exemplo n.º 6
0
        private OrganizationRoleUser GetOrganizationRoleUsers(DomainObjectBase customer, long organizationRoleUserId, out OrganizationRoleUser forOrganizationRoleUser)
        {
            var organizationRoleUserRepository = new OrganizationRoleUserRepository();
            var creatorOrganizationRoleUser    = organizationRoleUserRepository.GetOrganizationRoleUser(organizationRoleUserId);

            forOrganizationRoleUser = null;
            var orgRoleUsers = organizationRoleUserRepository.GetOrganizationRoleUserCollectionforaUser(customer.Id);

            if (!orgRoleUsers.IsNullOrEmpty())
            {
                forOrganizationRoleUser = orgRoleUsers.Where(org => org.RoleId == (long)Roles.Customer).FirstOrDefault();
            }

            return(creatorOrganizationRoleUser);
        }
Exemplo n.º 7
0
        protected void SaveButton_Click(object sender, EventArgs e)
        {
            IHostFacilityRankingService _hostFacilityRankingService = new HostFacilityRankingService();
            var hostFacilityViability = new HostFacilityViability();

            hostFacilityViability.HostId    = HostId;
            hostFacilityViability.Notes     = CommentsTextBox.Text;
            hostFacilityViability.Ranking   = HostViabilityRanking.HostRankings.Find(ranking => ranking.PersistenceLayerId == Convert.ToInt32(HostRankingDropDown.SelectedItem.Value));
            hostFacilityViability.CreatedOn = DateTime.Now;

            var organizationRoleUser = new OrganizationRoleUserRepository().GetOrganizationRoleUser(IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId);

            hostFacilityViability.CreatedBy = organizationRoleUser;
            _hostFacilityRankingService.SaveHostFacilityRanking(hostFacilityViability);
            Response.RedirectUser(ViewState["UrlReferrer"].ToString());
        }
Exemplo n.º 8
0
        public EventMetricsViewData GetEventMetricsViewData(long eventId, long orgRoleUserId)
        {
            // TODO: This method really needs refactoring,
            // TODO: probably every different part of the view data needs to be handled in different factory.
            // TODO: Will revisit this after shopping cart is complete.
            var orders = _orderRepository.GetAllOrdersForEvent(eventId);

            var eventPackages  = _eventPackageRepository.GetPackagesForEvent(eventId);
            var eventTests     = _eventTestRepository.GetTestsForEvent(eventId);
            var eventCustomers = _eventCustomerRepository.GetEventCustomersbyEventId(eventId);

            IOrganizationRoleUserRepository organizationRoleUserRepository = new OrganizationRoleUserRepository();
            var organizationRoleUser = organizationRoleUserRepository.GetOrganizationRoleUser(orgRoleUserId);
            var eventMetricsViewData = _revenueStatisticsViewDataFactory.CreateEventMetricsViewData(orders, eventPackages, eventTests, organizationRoleUser, eventCustomers);

            eventMetricsViewData = _eventCustomerRepository.GetEventCustomerFlagMetrics(eventMetricsViewData, eventId);
            return(eventMetricsViewData);
        }
Exemplo n.º 9
0
        private string GetAddressVerifiedUser(long organizationRoleUserId)
        {
            string userName = string.Empty;

            if (organizationRoleUserId > 0)
            {
                IOrganizationRoleUserRepository organizationRoleUserRepository = new OrganizationRoleUserRepository();
                var organizationRoleUser = organizationRoleUserRepository.GetOrganizationRoleUser(organizationRoleUserId);
                if (organizationRoleUser != null)
                {
                    IUserRepository <Core.Users.Domain.Customer> userRepository = new UserRepository <Core.Users.Domain.Customer>();
                    var user = userRepository.GetUser(organizationRoleUser.UserId);
                    if (user != null)
                    {
                        userName = "******" + user.Name.FullName;
                    }
                }
            }
            return(userName);
        }
Exemplo n.º 10
0
        protected override OrganizationRoleUser GetOrganizationRoleUser()
        {
            var organizationRoleUserRepository = new OrganizationRoleUserRepository();

            return(organizationRoleUserRepository.GetOrganizationRoleUser(IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId));
        }
Exemplo n.º 11
0
        private static OrganizationRoleUser GetOrganizationRoleUser()
        {
            var organizationRoleUserRepository = new OrganizationRoleUserRepository();

            return(organizationRoleUserRepository.GetOrganizationRoleUser(IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId));
        }