Example #1
0
 public LoginViewModel(ILoginView view, IBusinessLogic logic)
 {
     this._businessLogic = logic;
     this._view          = view;
     this._view.SetBindingContext(this);
     IsActive = true;
 }
Example #2
0
 public MyApplication(IBusinessLogic businessLogic, IWidgetRepository widgetRepository, IRepository <Gizmo> gizmoRepository, IPaymentService paymentService)
 {
     this.businessLogic    = businessLogic;
     this.widgetRepository = widgetRepository;
     this.gizmoRepository  = gizmoRepository;
     this.paymentService   = paymentService;
 }
        public bool AddObject <TEntity>(
            TEntity entity
            )
            where TEntity : class
        {
            GetMockObjectSet <TEntity>().AddObject(entity);
            if (ShouldDeferObjectManagement)
            {
                return(true);
            }
            IObjectManager objectManager = entity as IObjectManager;

            if (!ReferenceEquals(objectManager, null))
            {
                objectManager.ObjectFinishedLoading();
            }
            IBusinessLogic businessLogic = entity as IBusinessLogic;

            if (!ReferenceEquals(businessLogic, null))
            {
                businessLogic.OnAddObject(this);
            }

            return(true);
        }
Example #4
0
        public void PresentationLogic_DefaultInitialisation_PropertyBusinessLogicIsInitialised()
        {
            IBusinessLogic mockBusinessLogic = Substitute.For <IBusinessLogic>();
            var            presentationLogic = CreatePresentationLogic(mockBusinessLogic);

            Assert.AreEqual(mockBusinessLogic, presentationLogic.BusinessLogic);
        }
Example #5
0
 public void Setup()
 {
     _storage   = new Storage();
     _shape     = new ShapeFactory();
     _jsonlogic = new JsonLogic();
     _bl        = new BusinessLogic(_storage, _shape, _jsonlogic);
 }
        /*********************************************************************/
        /// <summary>
        /// Konstruktor, Initialisierung der Komponenten
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            mBusinessLogic = CBusinessLogic.getInstance();
            mBusinessLogic.init();
            mBusinessLogic.registerWindow(this);

            mTableEntryList = mBusinessLogic.getAllTableData();

            graph.DataContext = this;
            mGraph = mBusinessLogic.getGraph();
            
                
            GraphSharp.Algorithms.Layout.Simple.Tree.SimpleTreeLayoutParameters layoutParameter = new GraphSharp.Algorithms.Layout.Simple.Tree.SimpleTreeLayoutParameters();
            layoutParameter.LayerGap = 50;
            layoutParameter.VertexGap = 50;
            layoutParameter.Direction = LayoutDirection.TopToBottom;
                   
            LayoutAlgorithmType = "LinLog";
            graph.LayoutParameters = layoutParameter;
               
            DataContext = this;

            setTreeViewsEnabled(false);
            setViewVisibility(E_VIEW.E_TABLE_VIEW);
        }
 public HomeController(ILogger <HomeController> logger, IBusinessLogic BusinessLogic, IUpdateItem updateItem, IManufactureItem manufactureItem)
 {
     _logger          = logger;
     _businessLogic   = BusinessLogic;
     _updateItem      = updateItem;
     _manufactureItem = manufactureItem;
 }
Example #8
0
 public TUI(IBusinessLogic fachkonzept)
 {
     this.fachkonzept = fachkonzept;
     Hauptmenue intro = new Hauptmenue(fachkonzept);
     intro.Intro();
     //Console.ReadLine();
 }
Example #9
0
 public GUI(IBusinessLogic fachkonzept)
 {
     Form azd = new AZD(fachkonzept);
     //System.Console.WriteLine("Hello");
     Application.Run(azd);
     this.fachkonzept = fachkonzept;
 }
        public AW_Dialog(IUnitOfWork unitOfWork, IBusinessLogic businessLogic)
        {
            _unitOfWork = unitOfWork;

            _businessLogic = businessLogic;
            InitializeComponent();
        }
Example #11
0
 public RequestClosingViewModel(IRequestClosingView view, IBusinessLogic logic, Request selectedRequest, Employee currentUser)
 {
     this._businessLogic = logic;
     this._view          = view;
     this._view.SetViewModel(this);
     TagsList             = new List <TagPunch>();
     this.SelectedRequest = selectedRequest;
     this.CurrentUser     = currentUser;
     foreach (var item in SelectedRequest.TagsRequests)
     {
         TagsList.Add(new TagPunch()
         {
             tag = item.Tag, IsRequiredPunch = false
         });
     }
     if (SelectedRequest.Status is null)
     {
         ClosedVisibility = Visibility.Visible;
         ResultVisibility = Visibility.Collapsed;
     }
     else
     {
         ClosedVisibility = Visibility.Collapsed;
         ResultVisibility = Visibility.Visible;
     }
     RequestNo = $"{CurrentUser.User.Discipline.Code} - {_businessLogic.GetNextRequestNo()}";
 }
Example #12
0
 public MainViewModel(IMainView view, IBusinessLogic logic, Employee currentUser)
 {
     this._view = view;
     this._view.SetBindingContext(this);
     this._businessLogic = logic;
     this.CurrentUser    = currentUser;
 }
Example #13
0
 public ProgramMailViewModel(IProgramMailView view, IBusinessLogic logic)
 {
     this._businessLogic = logic;
     this._view          = view;
     this._view.SetViewModel(this);
     this.IsActive = false;
     try
     {
         MailAddress = _businessLogic.GetProgramMail();
     }
     catch (Exception ex)
     {
         _view.Alert(ex.Message, "Error");
     }
     if (MailAddress is null)
     {
         CreateButtonVisibility = Visibility.Visible;
         EditButtonVisibility   = Visibility.Collapsed;
     }
     else
     {
         this.Address           = MailAddress.Address;
         CreateButtonVisibility = Visibility.Collapsed;
         EditButtonVisibility   = Visibility.Visible;
     }
     PasswordVisibility = Visibility.Collapsed;
 }
		public SpectacledayViewModel(Spectacleday spectacleday, IBusinessLogic bl, IBusinessLogicAsync blAsync) {
			this.spectacleDay = spectacleday;
			this.blAsync = blAsync;
			this.bl = bl;

			Areas = new ObservableCollection<ScheduleAreaViewModel>();
		}
Example #15
0
 public MainWindow(IBusinessLogic businessLogic)
 {
     this.businessLogic = businessLogic;
     InitializeComponent();
     InitButtons();
     Loaded += OnLoaded;
 }
 public VisitManagerController(//ILogger<VisitManagerController> logger,
     IMapper mapper, ICMSDataHelper cmsDataHelper,
     IOptions <AppOptionsConfiguration> cmsOptions, IDBManager dBManager, IOptions <DatabaseOptions> connectionString)
 {
     _logger        = NullLogger <VisitManagerController> .Instance;//logger;
     _businessLogic = new BusinessLogic(mapper, cmsDataHelper, cmsOptions.Value, dBManager, connectionString.Value);
 }
Example #17
0
        static ControllerHelper()
        {
            var mockPrincipal = new Mock <IBusinessLogicPrincipal>();

            mockPrincipal.Setup(x => x.IsAllowed).Returns(true);
            mockPrincipal.Setup(x => x.IsAdmin).Returns(true);
            mockPrincipal.Setup(x => x.IsVerwalter).Returns(true);
            mockPrincipal.Setup(x => x.CurrentUid).Returns("if15b032");
            _abl  = new AccessoryBusinessLogic(_dal, mockPrincipal.Object);
            _cbl  = new CustomFieldsBusinessLogic(_dal, mockPrincipal.Object);
            _dbl  = new DamageBusinessLogic(_dal, mockPrincipal.Object);
            _debl = new DeviceBusinessLogic(_dal, mockPrincipal.Object);
            _blbl = new BusinessLogic.BusinessLogic(_dal, mockPrincipal.Object);
            _obl  = new OrderBusinessLogic(_dal, mockPrincipal.Object);
            _sbl  = new SettingBusinessLogic(_dal, mockPrincipal.Object);
            _ubl  = new UserBusinessLogic(_dal, mockPrincipal.Object);
            _bl   = new BusinessLogicFacade(_dal, _blbl, _abl, _cbl, _dbl, _debl, _obl, _sbl, _ubl);

            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            var subject = new ClaimsIdentity("Federation", ClaimTypes.Name, ClaimTypes.Role);

            subject.AddClaim(new Claim(ClaimTypes.Role, "Admin", ClaimValueTypes.String));
            subject.AddClaim(new Claim(ClaimTypes.Name, "if15b032", ClaimValueTypes.String));
            Thread.CurrentPrincipal = new ClaimsPrincipal(subject);
        }
 public ChangePasswordViewModel(IChangePasswordView view, IBusinessLogic logic, Employee currentUser)
 {
     this._businessLogic = logic;
     this._view          = view;
     this._view.SetViewModel(this);
     this.CurrentUser = currentUser;
     this.IsActive    = true;
 }
Example #19
0
        public DockableWindowGeoCalculator(object hook, IBusinessLogic businessLogic)
        {
            InitializeComponent();
            this.Hook      = hook;
            _businessLogic = businessLogic ?? throw new ArgumentNullException(nameof(businessLogic));

            LocalizeComponents();
        }
Example #20
0
 public ValuesController(ILoggerFactory log, ICoreConfiguration config, Settings settings, IBusinessLogic logic, ITest test)
 {
     _log      = log.CreateLogger <ValuesController>();
     _config   = config;
     _settings = settings;
     _logic    = logic;
     _test     = test;
 }
 public AppointmentWindow(string _date, string _time)
 {
     businessLogic = kernel.Get <IBusinessLogic>();
     InitializeComponent();
     Date           = _date;
     Time           = _time;
     dateLabel.Text = _date;
     timeLabel.Text = _time;
 }
Example #22
0
 public AppointmentMenuWindow(string dateOfAppointment, string timeOfAppointment)
 {
     businessLogic = kernel.Get <IBusinessLogic>();
     InitializeComponent();
     label1.Text = dateOfAppointment;
     label2.Text = timeOfAppointment;
     date        = dateOfAppointment;
     time        = timeOfAppointment;
 }
 public ForgotPasswordViewModel(IForgotPasswordView view, IBusinessLogic logic, int verificationCodeCorrect, Employee currentUser)
 {
     this._businessLogic = logic;
     this._view          = view;
     this.CurrentUser    = currentUser;
     this._view.SetViewModel(this);
     PasswordVisibility           = Visibility.Collapsed;
     this.verificationCodeCorrect = verificationCodeCorrect;
     this.attemptLeft             = 3;
 }
Example #24
0
        public ServiceContract(IBusinessLogic businessLogic)
        {
            EventLog
                tmpEventLog = new EventLog();

            tmpEventLog.Source = "Test WCF";
            tmpEventLog.WriteEntry("ServiceContract.ServiceContract()", EventLogEntryType.Information);

            _businessLogic = businessLogic;
        }
Example #25
0
 public MainPresenter(IApplicationController controller, IBusinessLogic service, IMainForm _View) : base(controller, _View)
 {
     logic                    = service;
     View.ButtonClick        += new EventHandler(Add_ButtonCopyClick);
     View.ButtonCutClick     += new EventHandler(Add_ButtonCutClick);
     View.ImageDialogClick   += new EventHandler(Add_ImageDialogClick);
     View.ImageDialogClick1  += new EventHandler(Add_ImageDialogClick1);
     View.LinkSiteClick      += new EventHandler(Add_LinkSiteClick);
     View.ImageSettingsClick += new EventHandler(Add_ImageSettingsClick);
 }
 public StudentService(IBusinessLogic <Student> studentBO)
 {
     if (studentBO == null)
     {
         string message = "studentBO is null";
         //log.Error(message);
         throw new ArgumentNullException(message);
     }
     this.studentBO = studentBO;
 }
Example #27
0
        public StockDataViewModel(IBusinessLogic businessLogic, string fileName = null, IConfigReader confreader = null, IDispatcherWrapper dispatcherWrapper = null)
        {
            path = path + fileName;
            _dispatcherWrapper = dispatcherWrapper ?? new DispatcherWrapper(Application.Current.Dispatcher);
            bizLogic           = businessLogic;
            AllCompanies       = bizLogic.GetAllCompanies();
            confReader         = confreader;
            ShowDefinedStocks(confReader);

            InitTimer();
        }
 public CreationWindow(IBusinessLogic businessLogic)
 {
     Input              = new InputModel();
     Errors             = new List <string>();
     this.businessLogic = businessLogic;
     InitializeComponent();
     InitButtons();
     DataContext          = this;
     isNewRecord          = true;
     CreateResBtn.Content = "Dodaj rezerwacjÄ™";
 }
Example #29
0
 public AppointmentModifyWindow(string date, string time, string forename, string surname, string telephone, string appointmentDuration /*string service, string serviceLength*/)
 {
     businessLogic = kernel.Get <IBusinessLogic>();
     InitializeComponent();
     dateTextBox.Text         = date;
     timeTextBox.Text         = time;
     forenameTextBox.Text     = forename;
     surnameTextBox.Text      = surname;
     telephoneTextBox.Text    = telephone;
     existAppointmentDuration = appointmentDuration;
 }
Example #30
0
 public AgendaWindow()
 {
     userStatus     = kernelUserManager.Get <IUserStatus>();
     accountManager = kernelUserManager.Get <IAccountManager>();
     InitializeComponent();
     businessLogic = kernel.Get <IBusinessLogic>();
     SetDateOnStart(businessLogic.CurrentDateSet()); // inicjalizacja dat
     SectionSetToDefaultMulti();                     //ustaw labele na default
     SectionFillMulti();                             // wypelnij wszystkie
     SetUserName();
 }
Example #31
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Display"/> class.
        /// </summary>
        public Display()
        {
            LogicFactory lf = new LogicFactory();

            this.accLogic       = lf.GetAccountLogic();
            this.carLogic       = lf.GetCarLogic();
            this.licenseLogic   = lf.GetLicenseLogic();
            this.rentLogic      = lf.GetRentLogic();
            this.complaintLogic = lf.GetComplaintLogic();
            this.businessLogic  = lf.GetBusinessLogic();
        }
        public StudentWebService(IBusinessLogic <Student> studentBusinesObject)
        {
            log.Debug("dentro del StudentWebService");

            if (studentBusinesObject == null)
            {
                string message = "businessObject is null";
                log.Error(message);
                throw new NullReferenceException(message);
            }
            this.studentBusinessObject = studentBusinesObject;
        }
        public void Setup()
        {
            mock = AutoMock.GetLoose();

            mock.Mock <IBusinessLogic <Student> >().Setup(x => x.Add(It.IsAny <Student>())).Returns <Student>(x => x);
            mock.Mock <IBusinessLogic <Student> >().Setup(x => x.GetById(It.IsAny <Int32>())).Returns(new Student());
            mock.Mock <IBusinessLogic <Student> >().Setup(x => x.GetAll()).Returns(new List <Student>());
            mock.Mock <IBusinessLogic <Student> >().Setup(x => x.Update(It.IsAny <Student>())).Returns(new Student());
            mock.Mock <IBusinessLogic <Student> >().Setup(x => x.Delete(It.IsAny <Int32>())).Returns(new Student());

            mockObject = mock.Create <IBusinessLogic <Student> >();
        }
Example #34
0
        static void Main(string[] args)
        {
            IContainer container = ContainerConfig.Configure();

            using (ILifetimeScope scope = container.BeginLifetimeScope())
            {
                IBusinessLogic businessLogic = scope.Resolve <IBusinessLogic>();
                businessLogic.ProcessData();
            }

            Console.ReadLine();
        }
Example #35
0
        private static void TestMailService(System.Collections.Specialized.NameValueCollection appSettings, IBusinessLogic bl, byte[] file)
        {
            var smtpServer = appSettings["smtpServer"];
            var mailAddress = new MailAddress(appSettings["mailAddress"], appSettings["sender"]);
            var user = appSettings["user"];
            var pwd = appSettings["pwd"];
            var port = int.Parse(appSettings["port"]);
            var mailClient = new MailService(smtpServer, port, user, pwd, mailAddress);
            var pdfPath = appSettings["pdfPath"];
            var pdfName = appSettings["pdfName"];

            IEnumerable<Artist> artists = bl.GetArtistsForCategory(new Category() { Id = 1 });
            var days = new List<Spectacleday>(bl.GetSpectacleDays());
            mailClient.MailToArtists(artists, days[0], file);
        }
 public Arbeitszeiten(IBusinessLogic fachkonzept)
 {
     this.fachkonzept = fachkonzept;
 }
Example #37
0
 public ValuesController(IBusinessLogic logic)
 {
     this.logic = logic;
 }
Example #38
0
 public CategoryViewModel(Category category)
 {
     this.Category = category;
     bl = BusinessLogicFactory.GetBusinessLogic();
 }
 public ExampleService(IBusinessLogic<Example> exampleBL)
 {
     this._exampleBL = exampleBL;
 }
Example #40
0
 public Projekte(IBusinessLogic fachkonzept)
 {
     this.fachkonzept = fachkonzept;
 }
 public Hauptmenue(IBusinessLogic fachkonzept)
 {
     this.fachkonzept = fachkonzept;
 }
 public AbstractBusinessLogicDecorator(IStorage storage)
 {
     BusinessLogic = new BusinessLogic.Proxy(storage);
 }
 public AbstractBusinessLogicDecorator(IBusinessLogic businessLogic)
 {
     BusinessLogic = businessLogic;
 }
Example #44
0
 public UFO()
 {
     bl = BusinessLogicFactory.GetBusinessLogic();
 }
 public Mitarbeiter(IBusinessLogic fachkonzept)
 {
     this.fachkonzept = fachkonzept;
 }
Example #46
0
 public LoginViewModel()
 {
     bl = BusinessLogicFactory.GetBusinessLogic();
 }
Example #47
0
 private static byte[] TestPdfMaker(NameValueCollection appSettings, IBusinessLogic bl)
 {
     List<Spectacleday> days = new List<Spectacleday>(bl.GetSpectacleDays());
     return bl.CreatePdfScheduleForSpectacleDay(days[1]);
 }
 public SortedBusinessLogic(IBusinessLogic businessLogic)
     : base(businessLogic)
 {
 }
Example #49
0
 public static IBusinessLogic GetInstance()
 {
     if (BL == null)
       {
     BL = new BusinessLogic();
       }
       return BL;
 }
Example #50
0
 public AZD(IBusinessLogic a)
 {
     InitializeComponent();
     fachkonzept = a;
 }