public LoginViewModel(ILoginView view, IBusinessLogic logic) { this._businessLogic = logic; this._view = view; this._view.SetBindingContext(this); IsActive = true; }
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); }
public void PresentationLogic_DefaultInitialisation_PropertyBusinessLogicIsInitialised() { IBusinessLogic mockBusinessLogic = Substitute.For <IBusinessLogic>(); var presentationLogic = CreatePresentationLogic(mockBusinessLogic); Assert.AreEqual(mockBusinessLogic, presentationLogic.BusinessLogic); }
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; }
public TUI(IBusinessLogic fachkonzept) { this.fachkonzept = fachkonzept; Hauptmenue intro = new Hauptmenue(fachkonzept); intro.Intro(); //Console.ReadLine(); }
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(); }
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()}"; }
public MainViewModel(IMainView view, IBusinessLogic logic, Employee currentUser) { this._view = view; this._view.SetBindingContext(this); this._businessLogic = logic; this.CurrentUser = currentUser; }
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>(); }
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); }
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; }
public DockableWindowGeoCalculator(object hook, IBusinessLogic businessLogic) { InitializeComponent(); this.Hook = hook; _businessLogic = businessLogic ?? throw new ArgumentNullException(nameof(businessLogic)); LocalizeComponents(); }
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; }
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; }
public ServiceContract(IBusinessLogic businessLogic) { EventLog tmpEventLog = new EventLog(); tmpEventLog.Source = "Test WCF"; tmpEventLog.WriteEntry("ServiceContract.ServiceContract()", EventLogEntryType.Information); _businessLogic = businessLogic; }
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; }
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ę"; }
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; }
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(); }
/// <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> >(); }
static void Main(string[] args) { IContainer container = ContainerConfig.Configure(); using (ILifetimeScope scope = container.BeginLifetimeScope()) { IBusinessLogic businessLogic = scope.Resolve <IBusinessLogic>(); businessLogic.ProcessData(); } Console.ReadLine(); }
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; }
public ValuesController(IBusinessLogic logic) { this.logic = logic; }
public CategoryViewModel(Category category) { this.Category = category; bl = BusinessLogicFactory.GetBusinessLogic(); }
public ExampleService(IBusinessLogic<Example> exampleBL) { this._exampleBL = exampleBL; }
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; }
public UFO() { bl = BusinessLogicFactory.GetBusinessLogic(); }
public Mitarbeiter(IBusinessLogic fachkonzept) { this.fachkonzept = fachkonzept; }
public LoginViewModel() { bl = BusinessLogicFactory.GetBusinessLogic(); }
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) { }
public static IBusinessLogic GetInstance() { if (BL == null) { BL = new BusinessLogic(); } return BL; }
public AZD(IBusinessLogic a) { InitializeComponent(); fachkonzept = a; }