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()); }
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); }
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); }
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); }
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); }
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); }
protected override OrganizationRoleUser GetOrganizationRoleUser() { var organizationRoleUserRepository = new OrganizationRoleUserRepository(); return(organizationRoleUserRepository.GetOrganizationRoleUser(IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId)); }
private static OrganizationRoleUser GetOrganizationRoleUser() { var organizationRoleUserRepository = new OrganizationRoleUserRepository(); return(organizationRoleUserRepository.GetOrganizationRoleUser(IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId)); }