Ejemplo n.º 1
0
        //private Guid UserGuid { get; set; }

        /// <summary>
        /// LeadController constructor with dependencies (params) shown below
        /// </summary>
        /// <param name="leadService"></param>
        /// <param name="loggingInstance"></param>
        /// <param name="loghandler"></param>
        public LeadController(ILeadService leadService, ILog loggingInstance,
                              LoggingCommandHandlerDecorator <LogCommand> loghandler)
        {
            _leadService     = leadService;
            _loggingInstance = loggingInstance;
            _logHandler      = loghandler;
        }
Ejemplo n.º 2
0
        internal IFacadeUpdateResult <LeadData> SaveLead(LeadDto dto)
        {
            ArgumentValidator.IsNotNull("dto", dto);

            FacadeUpdateResult <LeadData> result = new FacadeUpdateResult <LeadData>();
            ILeadService service  = UnitOfWork.GetService <ILeadService>();
            Lead         instance = RetrieveOrNew <LeadData, Lead, ILeadService>(result.ValidationResult, dto.Id);

            if (result.IsSuccessful)
            {
                instance.FullName     = dto.FullName;
                instance.FamilyName   = dto.FamilyName;
                instance.Gender       = dto.Gender;
                instance.AddressLine1 = dto.AddressLine1;
                instance.AddressLine2 = dto.AddressLine2;
                instance.Country      = dto.Country;
                instance.CountryState = dto.CountryState;
                instance.City         = dto.City;
                instance.ZipCode      = dto.ZipCode;
                instance.Phone        = dto.Phone;
                instance.Fax          = dto.Fax;
                instance.Email        = dto.Email;

                var saveQuery = service.Save(instance);

                result.AttachResult(instance.RetrieveData <LeadData>());
                result.Merge(saveQuery);
            }

            return(result);
        }
Ejemplo n.º 3
0
 public SearchController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ITaskService taskService,
     ViewDataHelper viewdataHelper,
     ICampaignService campaignService,
     ITagService tagService)
 {
     _leadService       = LeadService;
     _contactService    = contactService;
     _membershipService = membershipService;
     _roleService       = roleService;
     _noteService       = noteService;
     _activityService   = activityService;
     _saleService       = saleService;
     _taskService       = taskService;
     _viewdataHelper    = viewdataHelper;
     _campaignService   = campaignService;
     _tagService        = tagService;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Create a Service Lead
        /// </summary>
        /// <param name="ownerPartyId"></param>
        /// <param name="orgExternalRef"></param>
        /// <param name="contactExternalRef"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public long?CreateServiceLead(long?ownerPartyId, long?orgExternalRef, long?contactExternalRef, string name)
        {
            ILeadService service = LeadService.GetService();
            LeadModel    model   = new LeadModel();

            model.Name = name;

            if (orgExternalRef != null)
            {
                model.CustomerId          = (long)orgExternalRef;
                model.CustomerIdSpecified = true;
            }

            model.OwnerId                   = (long)ownerPartyId;
            model.OwnerIdSpecified          = true;
            model.PrimaryContactId          = (long)contactExternalRef;
            model.PrimaryContactIdSpecified = true;

            LeadModel result = service.CreateServiceLead(model);

            if (result != null && result.LeadId != null)
            {
                return(result.LeadId);
            }
            return(null);
        }
Ejemplo n.º 5
0
 public LeadController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ITaskService taskService,
     ViewDataHelper viewdataHelper,
     ICampaignService campaignService,
     ITagService tagService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _taskService = taskService;
     _viewdataHelper = viewdataHelper;
     _campaignService = campaignService;
     _tagService = tagService;
 }
Ejemplo n.º 6
0
 public UsersController(IUserScrubService _userScrubService, IUserService _userService, ILeadService _leadService, IUserCreditLogsService _userCreditLogsService, ICreditPackageService _creditPackageService)
 {
     userScrubService      = _userScrubService;
     userService           = _userService;
     leadService           = _leadService;
     userCreditLogsService = _userCreditLogsService;
     creditPackageService  = _creditPackageService;
 }
Ejemplo n.º 7
0
 public AdminController(IUserService _userService, ILeadService _leadService, IUserScrubService userScrubService, ICreditPackageService creditPackageService, IUserCreditLogsService _userCreditLogsService)
 {
     this.userService           = _userService;
     this.leadService           = _leadService;
     this.userScrubService      = userScrubService;
     this.creditPackageService  = creditPackageService;
     this.userCreditLogsService = _userCreditLogsService;
 }
Ejemplo n.º 8
0
 public LeadController(ILeadService leadService, IGroupService groupService, IUserService userService, IAccountService accountService, IContactService contactService, IPotentialService potentialService)
 {
     this.leadService = leadService;
     this.groupService = groupService;
     this.userService = userService;
     this.accountService = accountService;
     this.contactService = contactService;
     this.potentialService = potentialService;
 }
 public ProductController(IProductService productService,  IContactService contactService,IVendorService vendorService,ILeadService leadService, IPotentialService potentialService, IAccountService accountService)
 {
     this.productService = productService;
     this.contactService = contactService;
     this.vendorService = vendorService;
     this.leadService = leadService;
     this.potentialService = potentialService;
     this.accountService = accountService;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpportunityService" /> class.
 /// </summary>
 /// <param name="vTigerService">the vtiger service</param>
 /// <param name="loggerService">the logger service</param>
 /// <param name="youfferLeadService">The youffer lead service.</param>
 /// <param name="youfferContactService">The youffer contact service.</param>
 /// <param name="leadService"> The lead service.</param>
 /// <param name="userReviewService">The user review service.</param>
 public OpportunityService(IVTigerService vTigerService, ILoggerService loggerService, IYoufferLeadService youfferLeadService, IYoufferContactService youfferContactService, ILeadService leadService, IUserReviewService userReviewService)
 {
     this.vTigerService = vTigerService;
     this.LoggerService = loggerService;
     this.youfferLeadService = youfferLeadService;
     this.youfferContactService = youfferContactService;
     this.leadService = leadService;
     this.userReviewService = userReviewService;
 }
 public LeadsUnassignedHandler(
     ILeadService leadService,
     IDepartmentService departmentService,
     IEmailSender emailSender)
 {
     _leadService       = leadService;
     _departmentService = departmentService;
     _emailSender       = emailSender;
 }
Ejemplo n.º 12
0
 public LeadController(
     ICommentService commentService,
     ILeadService leadService, IOrganizationAccountManager accountManager,
     IServiceProvider serviceProvider) : base(serviceProvider)
 {
     _commentService = commentService;
     _accountManager = accountManager;
     _leadService    = leadService;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context"></param>
 /// <param name="identity"></param>
 /// <param name="userManager"></param>
 /// <param name="leadService"></param>
 public TaskManager(ITaskManagerContext context,
                    IUserManager <GearUser> identity,
                    IUserManager <GearUser> userManager,
                    ILeadService <Lead> leadService)
 {
     _context     = context;
     _userManager = userManager;
     _notify      = new TaskManagerNotificationService(identity);
     _leadService = leadService;
 }
Ejemplo n.º 14
0
 public CrmCommonController(ICrmService crmService,
                            ICrmOrganizationService organizationService,
                            ILeadService <Lead> leadService,
                            IMapper mapper)
 {
     _crmService          = crmService;
     _organizationService = organizationService;
     _leadService         = leadService;
     _mapper = mapper;
 }
Ejemplo n.º 15
0
 public LeadsController(ILeadService leadService, ICountryService countryService, ISectorService sectorService, ICityService cityService, IRegionService regionService, ILeadSourceService leadSourceService, ILeadStatusService leadStatusService)
 {
     this._leadService       = leadService;
     this._cityService       = cityService;
     this._leadSourceService = leadSourceService;
     this._leadStatusService = leadStatusService;
     this._regionService     = regionService;
     this._sectorService     = sectorService;
     this._countryService    = countryService;
 }
Ejemplo n.º 16
0
        public LeadGroupGraphType(ILeadService leadService)
        {
            Name = "Lead";

            Field <ListGraphType <LeadType> >("leads", resolve: (context) =>
            {
                var a = leadService.GetLeads();
                return(a.Leads);
            });
        }
Ejemplo n.º 17
0
 public LeadController(ILeadService leadService,
                       ILeadMatrixService leadMatrixService,
                       IOrganizationMarketer marketer,
                       ICommentService commentService,
                       IServiceProvider provider) : base(provider)
 {
     _marketer          = marketer;
     _commentService    = commentService;
     _leadService       = leadService;
     _leadMatrixService = leadMatrixService;
 }
Ejemplo n.º 18
0
 public CreateLeadEndpoint(
     ILeadRepository leadRepo,
     ILeadService leadService,
     ILogger <CreateLeadEndpoint> logger,
     LinkGenerator linkGenerator)
 {
     _leadRepo      = leadRepo ?? throw new ArgumentNullException();
     _leadService   = leadService ?? throw new ArgumentNullException();
     _logger        = logger ?? throw new ArgumentNullException();
     _linkGenerator = linkGenerator ?? throw new ArgumentNullException();
 }
 public AdminController(IAdminOperationService adminService,
                        ILeadService leadservice,
                        ITeam teamservice,
                        IMapper mapper,
                        ILogger <AdminController> logger) : base()
 {
     this.m_adminOperationService = adminService;
     this._logger       = logger;
     this.m_leadService = leadservice;
     this.m_teamService = teamservice;
     this._mapper       = mapper;
 }
Ejemplo n.º 20
0
 public LeadController(
     ICommentService commentService,
     Lazy <IMarketingAgencyOwner> marketingAgencyOwner,
     ILeadService leadService,
     Lazy <IProviderAgencyOwner> agencyOwner,
     IServiceProvider provider) : base(provider)
 {
     _commentService       = commentService;
     _marketingAgencyOwner = marketingAgencyOwner;
     _leadService          = leadService;
     _agencyOwner          = agencyOwner;
 }
Ejemplo n.º 21
0
 public NoteController(
     INoteService NoteService, 
     IContactService contactService, 
     ILeadService leadService, 
     IQuoteService quoteService,
     IMembershipService membershipService)
 {
     _noteService = NoteService;
     _contactService = contactService;
     _leadService = leadService;
     _quoteService = quoteService;
     _membershipService = membershipService;
 }
Ejemplo n.º 22
0
 public NoteController(
     INoteService NoteService,
     IContactService contactService,
     ILeadService leadService,
     IQuoteService quoteService,
     IMembershipService membershipService)
 {
     _noteService       = NoteService;
     _contactService    = contactService;
     _leadService       = leadService;
     _quoteService      = quoteService;
     _membershipService = membershipService;
 }
Ejemplo n.º 23
0
        internal List <TDto> RetrieveAllLead <TDto>(IDataConverter <LeadData, TDto> converter)
            where TDto : class
        {
            ArgumentValidator.IsNotNull("converter", converter);
            ILeadService service = UnitOfWork.GetService <ILeadService>();

            var query = service.GetAll();

            if (query.HasResult)
            {
                return(query.DataToDtoList(converter).ToList());
            }

            return(null);
        }
Ejemplo n.º 24
0
        internal IList <BindingListItem> GetBindingList()
        {
            List <BindingListItem> dataSource = new List <BindingListItem>();
            ILeadService           service    = UnitOfWork.GetService <ILeadService>();
            var query = service.GetAll();

            if (query.HasResult)
            {
                foreach (LeadData data in query.DataList)
                {
                    dataSource.Add(new BindingListItem(data.Id, string.Format("{0} {1}", data.FullName, data.FamilyName)));
                }
            }

            return(dataSource);
        }
Ejemplo n.º 25
0
 public ContactsController(
     INoteService noteService, 
     IContactService contactService, 
     ILeadService leadService, 
     IQuoteService quoteService,
     IMembershipService membershipService,
     IActivityService activityService,
     ViewDataHelper initHelper)
 {
     _noteService = noteService;
     _contactService = contactService;
     _leadService = leadService;
     _quoteService = quoteService;
     _membershipService = membershipService;
     _activityService = activityService;
     _initHelper = initHelper;
 }
Ejemplo n.º 26
0
        internal TDto RetrieveOrNewLead <TDto>(object instanceId, IDataConverter <LeadData, TDto> converter)
            where TDto : class
        {
            ArgumentValidator.IsNotNull("converter", converter);
            ILeadService service = UnitOfWork.GetService <ILeadService>();
            FacadeUpdateResult <LeadData> result = new FacadeUpdateResult <LeadData>();
            Lead instance = RetrieveOrNew <LeadData, Lead, ILeadService>(result.ValidationResult, instanceId);

            if (result.IsSuccessful)
            {
                return(converter.Convert(instance.RetrieveData <LeadData>()));
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 27
0
 public ContactsController(
     INoteService noteService,
     IContactService contactService,
     ILeadService leadService,
     IQuoteService quoteService,
     IMembershipService membershipService,
     IActivityService activityService,
     ViewDataHelper initHelper)
 {
     _noteService       = noteService;
     _contactService    = contactService;
     _leadService       = leadService;
     _quoteService      = quoteService;
     _membershipService = membershipService;
     _activityService   = activityService;
     _initHelper        = initHelper;
 }
Ejemplo n.º 28
0
 public QuotesController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IQuoteService quoteService,
     IInvoiceService invoiceService)
 {
     _leadService       = LeadService;
     _contactService    = contactService;
     _membershipService = membershipService;
     _roleService       = roleService;
     _noteService       = noteService;
     _activityService   = activityService;
     _quoteService      = quoteService;
     _invoiceService    = invoiceService;
 }
Ejemplo n.º 29
0
 public LeadsController(ILeadService baseService,
                        IUserService userService,
                        ILeadSourceService sourceService,
                        ILeadStatusService leadStatusService,
                        IWebHostEnvironment hostingEnvironment,
                        IPincodeService pincodeService,
                        ISubDistrictService subDistrictService,
                        ILocalityService localityService)
     : base(baseService)
 {
     this.service            = baseService;
     this.userService        = userService;
     this.sourceService      = sourceService;
     this.leadStatusService  = leadStatusService;
     this.hostingEnvironment = hostingEnvironment;
     this.pincodeService     = pincodeService;
     this.subDistrictService = subDistrictService;
     this.localityService    = localityService;
 }
Ejemplo n.º 30
0
 public HomeController(
     ILeadService leadService,
     ITaskService taskService, 
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     IActivityService activityService,
     ISaleService saleService,
     ViewDataHelper initHelper)
 {
     _leadService = leadService;
     _taskService = taskService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _activityService = activityService;
     _saleService = saleService;
     _initHelper = initHelper;
 }
Ejemplo n.º 31
0
 public HomeController(
     ILeadService leadService,
     ITaskService taskService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     IActivityService activityService,
     ISaleService saleService,
     ViewDataHelper initHelper)
 {
     _leadService       = leadService;
     _taskService       = taskService;
     _contactService    = contactService;
     _membershipService = membershipService;
     _roleService       = roleService;
     _activityService   = activityService;
     _saleService       = saleService;
     _initHelper        = initHelper;
 }
Ejemplo n.º 32
0
 public QuoteController(
     ILeadService LeadService, 
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IQuoteService quoteService,
     IInvoiceService invoiceService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _quoteService = quoteService;
     _invoiceService = invoiceService;
 }
Ejemplo n.º 33
0
        internal IFacadeUpdateResult <LeadData> DeleteLead(object instanceId)
        {
            ArgumentValidator.IsNotNull("instanceId", instanceId);

            FacadeUpdateResult <LeadData> result = new FacadeUpdateResult <LeadData>();
            ILeadService service = UnitOfWork.GetService <ILeadService>();
            var          query   = service.Retrieve(instanceId);

            if (query.HasResult)
            {
                Lead instance  = query.ToBo <Lead>();
                var  saveQuery = instance.Delete();
                result.Merge(saveQuery);
            }
            else
            {
                AddError(result.ValidationResult, "LeadCannotBeFound");
            }

            return(result);
        }
Ejemplo n.º 34
0
 public InvoiceController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IInvoiceService invoiceService,
     ISaleService saleService,
     ViewDataHelper initHelper)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _invoiceService = invoiceService;
     _initHelper = initHelper;
 }
Ejemplo n.º 35
0
 public InvoiceController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IInvoiceService invoiceService,
     ISaleService saleService,
     ViewDataHelper initHelper)
 {
     _leadService       = LeadService;
     _contactService    = contactService;
     _membershipService = membershipService;
     _roleService       = roleService;
     _noteService       = noteService;
     _activityService   = activityService;
     _saleService       = saleService;
     _invoiceService    = invoiceService;
     _initHelper        = initHelper;
 }
Ejemplo n.º 36
0
 public SaleController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ViewDataHelper initHelper,
     ITagService tagService)
 {
     _leadService       = LeadService;
     _contactService    = contactService;
     _membershipService = membershipService;
     _roleService       = roleService;
     _noteService       = noteService;
     _activityService   = activityService;
     _saleService       = saleService;
     _initHelper        = initHelper;
     _tagService        = tagService;
 }
Ejemplo n.º 37
0
 public SaleController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ViewDataHelper initHelper,
     ITagService tagService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _initHelper = initHelper;
     _tagService = tagService;
 }
Ejemplo n.º 38
0
 public LeadsController(ILeadService leadService)
 {
     _leadService = leadService;
 }
 public LeadController()
 {
     _leadService = new LeadService();
 }
Ejemplo n.º 40
0
 /// <summary>
 ///     default constructor
 /// </summary>
 /// <param name="leadService"></param>
 public LeadController(ILeadService leadService)
 {
     _leadService = leadService;
 }
Ejemplo n.º 41
0
 public LeadController()
 {
     _leadService = new LeadService();
 }
Ejemplo n.º 42
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="service"></param>
 /// <param name="leadService"></param>
 public PipeLineController(ICrmPipeLineService service, ILeadService <Lead> leadService)
 {
     _service     = service;
     _leadService = leadService;
 }