public DashBoardController(IMutationsVacationService mutvacService, IVacationRequestService vacreqService, IApplicationUserService userService, IManagerService manService)
 {
     _mutvacService = mutvacService;
     _vacreqService = vacreqService;
     _userService   = userService;
     _manService    = manService;
 }
Exemple #2
0
 public MemberController(IManagerService iManagerService, IMemberService iMemberService, IRegionService iRegionService, IMemberLabelService iMemberLabelService)
 {
     _iManagerService     = iManagerService;
     _iMemberService      = iMemberService;
     _iRegionService      = iRegionService;
     _iMemberLabelService = iMemberLabelService;
 }
Exemple #3
0
 public ManagerController(IManagerService managerService, IAgentService agentService, IEquipmentService equipmentService, IEquipmentDistributionService equipmentDistributionService)
 {
     _managerService               = managerService;
     _agentService                 = agentService;
     _equipmentService             = equipmentService;
     _equipmentDistributionService = equipmentDistributionService;
 }
        public SettingsViewModel(ISettingsView view, IShellService shellService, ICrawlerService crawlerService, IManagerService managerService, ILoginService loginService, IFolderBrowserDialog folderBrowserDialog, IFileDialogService fileDialogService, ExportFactory <AuthenticateViewModel> authenticateViewModelFactory)
            : base(view)
        {
            _folderBrowserDialog           = folderBrowserDialog;
            _fileDialogService             = fileDialogService;
            ShellService                   = shellService;
            _settings                      = ShellService.Settings;
            CrawlerService                 = crawlerService;
            ManagerService                 = managerService;
            LoginService                   = loginService;
            _authenticateViewModelFactory  = authenticateViewModelFactory;
            _browseDownloadLocationCommand = new DelegateCommand(BrowseDownloadLocation);
            _browseExportLocationCommand   = new DelegateCommand(BrowseExportLocation);
            _authenticateCommand           = new AsyncDelegateCommand(Authenticate);
            _tumblrLoginCommand            = new AsyncDelegateCommand(TumblrLogin);
            _tumblrLogoutCommand           = new AsyncDelegateCommand(TumblrLogout);
            _tumblrSubmitTfaCommand        = new AsyncDelegateCommand(TumblrSubmitTfa);
            _saveCommand                   = new AsyncDelegateCommand(Save);
            _enableAutoDownloadCommand     = new DelegateCommand(EnableAutoDownload);
            _exportCommand                 = new DelegateCommand(ExportBlogs);
            _bloglistExportFileType        = new FileType(Resources.Textfile, SupportedFileTypes.BloglistExportFileType);

            Task loadSettingsTask = Load();

            view.Closed += ViewClosed;
        }
Exemple #5
0
 public SaleService()
 {
     _saleRepository = new SaleRepository(new SalesInfoContext());
     _clientService  = new ClientService();
     _managerService = new ManagerService();
     _productService = new ProductService();
 }
Exemple #6
0
 public ManagerController(IShellService shellService, ISelectionService selectionService, ICrawlerService crawlerService,
                          ISettingsService settingsService, IClipboardService clipboardService, IManagerService managerService,
                          ICrawlerFactory crawlerFactory, IBlogFactory blogFactory, ITumblrBlogDetector tumblrBlogDetector,
                          IMessageService messageService, Lazy <ManagerViewModel> managerViewModel)
 {
     _shellService                    = shellService;
     _selectionService                = selectionService;
     _clipboardService                = clipboardService;
     _crawlerService                  = crawlerService;
     _managerService                  = managerService;
     _managerViewModel                = managerViewModel;
     _settingsService                 = settingsService;
     _messageService                  = messageService;
     _crawlerFactory                  = crawlerFactory;
     _blogFactory                     = blogFactory;
     _tumblrBlogDetector              = tumblrBlogDetector;
     _importBlogsCommand              = new AsyncDelegateCommand(ImportBlogs);
     _addBlogCommand                  = new AsyncDelegateCommand(AddBlog, CanAddBlog);
     _removeBlogCommand               = new DelegateCommand(RemoveBlog, CanRemoveBlog);
     _showFilesCommand                = new DelegateCommand(ShowFiles, CanShowFiles);
     _visitBlogCommand                = new DelegateCommand(VisitBlog, CanVisitBlog);
     _visitBlogOnTumbexCommand        = new DelegateCommand(VisitBlogOnTumbex, CanVisitBlog);
     _enqueueSelectedCommand          = new DelegateCommand(EnqueueSelected, CanEnqueueSelected);
     _loadLibraryCommand              = new AsyncDelegateCommand(LoadLibraryAsync, CanLoadLibrary);
     _loadAllDatabasesCommand         = new AsyncDelegateCommand(LoadAllDatabasesAsync, CanLoadAllDatbases);
     _checkIfDatabasesCompleteCommand = new DelegateCommand(CheckIfDatabasesComplete, CanCheckIfDatabasesComplete);
     _listenClipboardCommand          = new DelegateCommand(ListenClipboard);
     _autoDownloadCommand             = new DelegateCommand(EnqueueAutoDownload, CanEnqueueAutoDownload);
     _showDetailsCommand              = new DelegateCommand(ShowDetailsCommand);
     _copyUrlCommand                  = new DelegateCommand(CopyUrl, CanCopyUrl);
     _checkStatusCommand              = new AsyncDelegateCommand(CheckStatusAsync, CanCheckStatus);
 }
        public ManagerProfile ShowHandlerDialog(IManagerService managerService)
        {
            _managerService = managerService;

            Visibility = Visibility.Visible;

            _parent.IsEnabled = false;

            _hideRequest = false;
            while (!_hideRequest)
            {
                // HACK: Stop the thread if the application is about to close
                if (Dispatcher.HasShutdownStarted ||
                    Dispatcher.HasShutdownFinished)
                {
                    break;
                }

                // HACK: Simulate "DoEvents"
                Dispatcher.Invoke(
                    DispatcherPriority.Background,
                    new ThreadStart(delegate { }));
                Thread.Sleep(20);
            }

            return _result;
        }
Exemple #8
0
        public JsonResult List(int page, string keywords, int rows, bool?status = null)
        {
            long            shopId         = base.CurrentSellerManager.ShopId;
            long            id             = base.CurrentSellerManager.Id;
            long            roleId         = base.CurrentSellerManager.RoleId;
            IManagerService managerService = ServiceHelper.Create <IManagerService>();
            ManagerQuery    managerQuery   = new ManagerQuery()
            {
                PageNo   = page,
                PageSize = rows,
                ShopID   = shopId,
                userID   = id,
                roleID   = roleId
            };
            PageModel <ManagerInfo> sellerManagers = managerService.GetSellerManagers(managerQuery);

            //List<RoleInfo> list = ServiceHelper.Create<IPrivilegesService>().GetSellerRoles(shopId).ToList();
            var collection =
                from item in sellerManagers.Models.ToList()
                select new
            {
                Id         = item.Id,
                UserName   = item.UserName,
                CreateDate = item.CreateDate.ToString("yyyy-MM-dd HH:mm"),
                RoleName   = item.RoleName,
                RoleId     = item.RoleId,
                realName   = item.RealName,
                Emails     = item.Email,
                reMark     = item.Remark
            };

            return(Json(new { rows = collection, total = sellerManagers.Total }));
        }
Exemple #9
0
 public HomeController()
 {
     _orderService   = new OrderService(WebConstants.ConnectionString);
     _managerService = new ManagerService(WebConstants.ConnectionString);
     _clientService  = new ClientService(WebConstants.ConnectionString);
     _productService = new ProductService(WebConstants.ConnectionString);
 }
Exemple #10
0
        //Thêm sản phẩm nhập
        private void InsertDGVDetailIn()
        {
            int     check = 0;
            string  NameProduct;
            int     Quality = int.Parse(txtQualityProductIn.Text);
            decimal?Price;
            string  MaSP = cboIDProductofDetailIn.SelectedItem.ToString();

            using (IManagerService service = DataFactory.getManagerService(ModelState, Information.PersistanceStrategy))
            {
                NameProduct = service.GetProduct(MaSP).TenSP;
                Price       = service.GetProduct(MaSP).DonGia;
            }
            for (int row = 0; row < dgvDetailIn.Rows.Count; row++)
            {
                if (MaSP.Equals(dgvDetailIn.Rows[row].Cells[0].Value.ToString()))
                {
                    Quality = Convert.ToInt32(txtQualityProductIn.Text) + Convert.ToInt32(dgvDetailIn.Rows[row].Cells[2].Value);
                    dgvDetailIn.Rows[row].Cells[2].Value = Quality.ToString();
                    dgvDetailIn.Rows[row].Cells[3].Value = Price;
                    check = 1;
                    break;
                }
            }
            if (check == 0)
            {
                dgvDetailIn.Rows.Add(
                    MaSP,
                    NameProduct,
                    Quality,
                    Price);
            }
            txtTotalDetailIn.Text = String.Format("{0:#,0 vnđ}", CalculatorTotal(dgvDetailIn));
        }
Exemple #11
0
        public EditEmployeeViewModel(EditEmployee editEmployeeView, tblEmployee employeeLogedIn)
        {
            view           = editEmployeeView;
            qualifications = new List <string>()
            {
                "I", "II", "III", "IV", "V", "VI", "VII"
            };

            userService     = new UserService();
            sectorService   = new SectorService();
            employeeService = new EmployeeService();
            positionService = new PositionService();
            managerService  = new ManagerService();
            requestService  = new RequestService();

            User           = new tblUser();
            EmployeeToEdit = employeeService.GetvwEmployeeByEmployeeId(employeeLogedIn.EmployeeID);
            //Employee = new tblEmployee();
            SectorList   = sectorService.GetSectors();
            PositionList = positionService.GetPositions();
            //MessageBox.Show(employeeLogedIn.EmployeeID.ToString());
            oldEmployee = employeeLogedIn;

            oldUserName = EmployeeToEdit.Username;
            oldJMBG     = EmployeeToEdit.JMBG;
        }
 public ManagerController(IUserService userService, IManagerService managerService, IDepartmantService departmantService, IPersonalService personalService)
 {
     _userService       = userService;
     _managerService    = managerService;
     _departmantService = departmantService;
     _personalService   = personalService;
 }
Exemple #13
0
 public ManagerController(IShellService shellService, ISelectionService selectionService, ICrawlerService crawlerService, ISettingsService settingsService, IClipboardService clipboardService,
                          IManagerService managerService, ICrawlerFactory crawlerFactory, IBlogFactory blogFactory, ITumblrBlogDetector tumblrBlogDetector, IMessageService messageService, Lazy <ManagerViewModel> managerViewModel)
 {
     this.shellService       = shellService;
     this.selectionService   = selectionService;
     this.clipboardService   = clipboardService;
     this.crawlerService     = crawlerService;
     this.managerService     = managerService;
     this.managerViewModel   = managerViewModel;
     this.settingsService    = settingsService;
     this.messageService     = messageService;
     CrawlerFactory          = crawlerFactory;
     BlogFactory             = blogFactory;
     TumblrBlogDetector      = tumblrBlogDetector;
     addBlogCommand          = new AsyncDelegateCommand(AddBlog, CanAddBlog);
     removeBlogCommand       = new DelegateCommand(RemoveBlog, CanRemoveBlog);
     showFilesCommand        = new DelegateCommand(ShowFiles, CanShowFiles);
     visitBlogCommand        = new DelegateCommand(VisitBlog, CanVisitBlog);
     enqueueSelectedCommand  = new DelegateCommand(EnqueueSelected, CanEnqueueSelected);
     loadLibraryCommand      = new AsyncDelegateCommand(LoadLibrary, CanLoadLibrary);
     loadAllDatabasesCommand = new AsyncDelegateCommand(LoadAllDatabases, CanLoadAllDatbases);
     listenClipboardCommand  = new DelegateCommand(ListenClipboard);
     autoDownloadCommand     = new DelegateCommand(EnqueueAutoDownload, CanEnqueueAutoDownload);
     showDetailsCommand      = new DelegateCommand(ShowDetailsCommand);
     copyUrlCommand          = new DelegateCommand(CopyUrl, CanCopyUrl);
 }
        public MainWindow(IManagerService managerService)
        {
            _managerService = managerService;

            InitializeComponent();
            ModalDialog.SetParent(ModalDialogParent);
            MessageBoxDialog.SetParent(ModalDialogParent);
            ImportQuestionDialog.SetParent(ModalDialogParent);

            Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() =>
            {
                while (_managerProfile == null && !_formClosing)
                {
                    _managerProfile = ModalDialog.ShowHandlerDialog(_managerService);
                    if (_managerProfile != null)
                        //Hack: Javad Rasouli >> Uncomment This
                        TxbUserFullName.Text = /*_managerProfile.FullNameWithSexTitle;*/ "جواد رسولی";
                    else if (!_formClosing)
                    {
                        MessageBoxDialog.ShowHandlerDialog(new MessageDialogBox
                        {
                            MessageHeader = "اعتبار سنجی ورود",
                            MessageBody = "نام کاربری یا کلمه عبور اشتباه است",
                            Buttons = new List<EMessageDialogButton> { EMessageDialogButton.Ok},
                        });
                    }
                }
            }));
        }
Exemple #15
0
        /// <summary>
        /// 获取管理员列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="keywords"></param>
        /// <param name="rows"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        //[UnAuthorize]
        public JsonResult List(int page, string keywords, int rows, bool?status = null)
        {
            IManagerService managerService = this._iManagerService;
            ManagerQuery    managerQuery   = new ManagerQuery()
            {
                PageNo   = page,
                PageSize = rows
            };
            PageModel <ManagerInfo> platformManagers = managerService.GetPlatformManagers(managerQuery);
            List <RoleInfo>         list             = this._iPrivilegesService.GetPlatformRoles().ToList <RoleInfo>();
            var collection =
                from item in platformManagers.Models.ToList <ManagerInfo>()
                select new
            {
                Id         = item.Id,
                UserName   = item.UserName,
                CreateDate = item.CreateDate.ToString("yyyy-MM-dd HH:mm"),
                RoleName   = (item.RoleId == (long)0 ? "系统管理员" : (
                                  from a in list
                                  where a.Id == item.RoleId
                                  select a).FirstOrDefault <RoleInfo>().RoleName),
                RoleId = item.RoleId
            };
            var variable = new { rows = collection, total = platformManagers.Total };

            return(base.Json(variable));
        }
Exemple #16
0
        public void Async <TResult>(Func <IManagerService, TResult> func, Action <TResult> OnResult = null, Action <IManagerService, Exception> OnException = null)
        {
            IManagerService client = Client;

            if (this.channelFactory.State != CommunicationState.Opened)
            {
                return;
            }

            try
            {
                Task t = new Task(delegate
                {
                    try
                    {
                        var result = func(client);

                        OnResult(result);
                    }
                    catch (Exception ex)
                    {
                        if (OnException != null)
                        {
                            OnException(Client, ex);
                        }
                    }
                });

                t.Start();
            }
            catch
            {
            }
        }
Exemple #17
0
        public TResult TryCatch <TResult>(Func <IManagerService, TResult> func, Action <IManagerService, Exception> OnException = null)
        {
            IManagerService client = Client;

            if (this.channelFactory.State != CommunicationState.Opened)
            {
                return(default(TResult));
            }

            TResult output = default(TResult);

            try
            {
                output = func(client);
            }
            catch (CommunicationObjectFaultedException ex)
            {
                if (OnException != null)
                {
                    OnException(client, ex);
                }
            }
            catch (Exception ex)
            {
                if (OnException != null)
                {
                    OnException(client, ex);
                }
            }
            return(output);
        }
Exemple #18
0
        public void TryCatch(Action <IManagerService> func, Action <IManagerService, Exception> OnException = null)
        {
            IManagerService client = Client;

            if (this.channelFactory.State != CommunicationState.Opened)
            {
                return;
            }

            try
            {
                func(client);
            }
            catch (CommunicationObjectFaultedException ex)
            {
                if (OnException != null)
                {
                    OnException(client, ex);
                }
            }
            catch (Exception ex)
            {
                if (OnException != null)
                {
                    OnException(client, ex);
                }
            }
        }
Exemple #19
0
        public override void OnRemovedFromManager(IManagerService manager)
        {
            base.OnRemovedFromManager(manager);

            if (manager.ManagerType == typeof (IObjectManager))
                SessionManager.CurrentSession.RemovePlayerAgent(this);
        }
Exemple #20
0
        public EmployeeRegisterViewModel(EmployeeRegisterView employeeRegisterView)
        {
            view           = employeeRegisterView;
            qualifications = new List <string>()
            {
                "I", "II", "III", "IV", "V", "VI", "VII"
            };

            userService     = new UserService();
            sectorService   = new SectorService();
            employeeService = new EmployeeService();
            positionService = new PositionService();
            managerService  = new ManagerService();

            User         = new tblUser();
            Employee     = new tblEmployee();
            SectorList   = sectorService.GetSectors();
            PositionList = positionService.GetPositions();

            //if (SectorList.Count==0)
            //{
            //    ViewNoSectorMessage = Visibility.Visible;

            //}
            //else
            //{
            //    ViewNoSectorMessage = Visibility.Hidden;

            //}
        }
Exemple #21
0
 public SquadManagersController(IMapper mapper,
                                ISquadService squadService,
                                IManagerService managerService)
 {
     _mapper         = mapper;
     _squadService   = squadService;
     _managerService = managerService;
 }
 public UserController(IApplicationUserService userService, IManagerService manService, IMutationsVacationService mutvacService, IVacationRequestService vacreqService, IDepartmentService depService)
 {
     _userService   = userService;
     _manService    = manService;
     _mutvacService = mutvacService;
     _vacreqService = vacreqService;
     _depService    = depService;
 }
Exemple #23
0
 private IFiles LoadFiles(IBlog blog, IManagerService managerService)
 {
     if (settings.LoadAllDatabases)
     {
         return(managerService.Databases.Where(file => file.Name.Equals(blog.Name) && file.BlogType.Equals(blog.BlogType)).FirstOrDefault());
     }
     return(new Files().Load(blog.ChildId));
 }
        public ManagerController(IManagerService managerService, IMapper mapper)
        {
            _managerService = managerService;

            _mapper = mapper;

            _pageSize = int.Parse(ConfigurationManager.AppSettings["itemsPerPage"]);
        }
Exemple #25
0
        public AIManagerService(ITeamService teamService, ICyclistService cyclistService, IManagerService managerService)
        {
            _teamService    = teamService;
            _cyclistService = cyclistService;
            _managerService = managerService;

            AtEndOfSeason(Configuration.UserTeamId);
        }
Exemple #26
0
 public ManagerController(IManagerService managerService,
                          IClientService clientService,
                          IMyCallsAPIService myCallsApiService)
 {
     _managerService    = managerService;
     _myCallsApiService = myCallsApiService;
     _clientService     = clientService;
 }
 /// <summary>
 /// Create services and mappers for work.
 /// </summary>
 /// <param name="managerService">Manager service</param>
 /// <param name="rentMapper">Rent mapper</param>
 /// <param name="log">Log service</param>
 /// <param name="identityMapperDM">Identity mapper</param>
 public ManagerController(IManagerService managerService, IRentMapperDM rentMapper,
                          ILogWriter log, IIdentityMapperDM identityMapperDM)
 {
     _managerService   = managerService;
     _rentMapperDM     = rentMapper;
     _logWriter        = log;
     _identityMapperDM = identityMapperDM;
 }
Exemple #28
0
 public OrderService(OrdersBDContext context, IProductService productService, IClientService clientService,
                     IManagerService managerService)
 {
     _context        = context;
     _productService = productService;
     _clientService  = clientService;
     _managerService = managerService;
 }
 public ManagersController(
     IManagerService userService,
     IMapper mapper,
     IOptions <AppSettings> appSettings)
 {
     _userService = userService;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
Exemple #30
0
 public Account_UI()
 {
     InitializeComponent();
     if (_service == null)
     {
         _service = DataFactory.getManagerService(ModelState, Information.PersistanceStrategy);
     }
     InitData();
 }
 internal CrawlerFactory(ICrawlerService crawlerService, IManagerService managerService, ShellService shellService,
                         ISharedCookieService cookieService)
 {
     this.crawlerService = crawlerService;
     this.managerService = managerService;
     this.shellService   = shellService;
     this.cookieService  = cookieService;
     settings            = shellService.Settings;
 }
Exemple #32
0
 public DetailsController(IShellService shellService, ISelectionService selectionService, IManagerService managerService,
                          Lazy <DetailsViewModel> detailsViewModel)
 {
     this.shellService     = shellService;
     this.selectionService = selectionService;
     this.managerService   = managerService;
     this.detailsViewModel = detailsViewModel;
     blogsToSave           = new HashSet <IBlog>();
 }
Exemple #33
0
        public override void OnRemovedFromManager(IManagerService manager)
        {
            base.OnRemovedFromManager(manager);

            if (manager.ManagerType == typeof(IObjectManager))
            {
                SessionManager.CurrentSession.RemoveNonPlayerAgent(this);
            }
        }
 public AdminController(IPersonService personService, IManagerService managerService)
 {
     _personService = personService;
     _managerService = managerService;
 }
Exemple #35
0
        /// <summary>
        /// Notifies the remote manager about successful initialization.
        /// </summary>
        private static void NotifyManagerInitialization()
        {
            Output.WriteLine("... Notifying remote manager [initialization]");

            Uri address = new Uri("http://localhost:8000/manager/");

            var binding = new WSHttpBinding();
            var endpoint = new EndpointAddress(address);

            Container.Channel = ChannelFactory<IManagerService>.CreateChannel(binding, endpoint);
            Container.Channel.NotifyInitialized(Configuration.ContainerId);
        }
 public ManagersController(IManagerService managerService)
 {
     _managerService = managerService;
 }
        /// <summary>
        /// Called when the parent object is submitted to a manager.
        /// </summary>
        /// <param name="manager"/>
        public virtual void OnSubmittedToManager(IManagerService manager)
        {
            if (manager.ManagerType == typeof(IObjectManager))
                if (ParentObject.CollisionMove == this)
                {
                    if (!IsInitialized)
                        Initialize();

                    Enable();
                }
        }
 /// <summary>
 /// Called when the parent object is removed from a manager.
 /// </summary>
 /// <param name="manager"/>
 public virtual void OnRemovedFromManager(IManagerService manager)
 {
     if (manager.ManagerType == typeof(IObjectManager))
         if (ParentObject.CollisionMove == this)
         {
             if (IsInitialized)
                 Disable();
         }
 }