예제 #1
0
        IShowWindowService showWindow; //for show messages in mvvm pattern order

        public MainViewModel(Window mainWindow, DefaultShowWindowService showWindow, int userId)
        {
            Records = new ObservableCollection <Records>();

            showWindow    = new DefaultShowWindowService();
            dialogService = new DefaultDialogService();

            Usver = FindeUser(userId);
            if (Usver == null)
            {
                dialogService.ShowMessage("Проблема с авторизацией подвязкой пользователя к оформлению заказа");
                return;
            }
            UsrOps     = new UserOps(userId, 0);
            PersoneOps = new PersoneOps();

            EndDateReception   = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 0, 0);
            StartDateReception = EndDateReception.AddDays(-10);

            _Filters                 = new _Filters();
            _Filters.DateParam1      = EndDateReception;
            _Filters.StartDateparam  = StartDateReception;
            _Filters.StartDateparam2 = StartDateReception;
            _Filters.StartDateparam3 = StartDateReception;
            _Filters.EndtDateparam   = EndDateReception;
            _Filters.EndtDateparam2  = EndDateReception;
            _Filters.EndtDateparam3  = EndDateReception;

            //EndDateReception = DateTime.Now;
            LoadData();
            this.mainWindow = mainWindow;
            this.showWindow = showWindow;
        }
예제 #2
0
 public _WorkType()
 {
     WorkType         = new WorkType();
     WorkTypesRecords = new ObservableCollection <WorkType>();
     LoadWorkTypesData();
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }
예제 #3
0
 public _Status()
 {
     Status        = new Status();
     StatusRecords = new ObservableCollection <Status>();
     LoadStatusData();
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }
예제 #4
0
 public _University()
 {
     University        = new University();
     UniversityRecords = new ObservableCollection <University>();
     LoadUniversityData();
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }
예제 #5
0
 public _AuthorStatus()
 {
     AuthorStatus         = new AuthorStatus();
     SelectedAuthorStatus = new AuthorStatus();
     AuthorStatusRecords  = new ObservableCollection <AuthorStatus>();
     LoadData();
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }
예제 #6
0
        public _Source()
        {
            Source = new Source();

            SourcesRecords = new ObservableCollection <Source>();

            LoadSourcesData();
            showWindow    = new DefaultShowWindowService();
            dialogService = new DefaultDialogService();
        }
예제 #7
0
 public _Subject()
 {
     Subj           = new Subject();
     SelectedSubj   = new Subject();
     SelectedSubj2  = new Subject();
     SubjRecords    = new ObservableCollection <Subject>();
     AuthorSubjects = new ObservableCollection <Subject>();
     LoadSubjectsData();
     showWindow    = new DefaultShowWindowService();
     dialogService = new  DefaultDialogService();
 }
예제 #8
0
 public _Direction()
 {
     Dir              = new Direction();
     SelectedDir      = new Direction();
     SelectedDir2     = new Direction();
     DirRecords       = new ObservableCollection <Direction>();
     AuthorDirections = new ObservableCollection <Direction>();
     LoadDirectionsData();
     showWindow    = new DefaultShowWindowService();
     dialogService = new  DefaultDialogService();
 }
예제 #9
0
 public Contacts()
 {
     this.Phone1   = "+380";
     this.Phone2   = "---";
     this.Phone3   = "---";
     this.Email1   = "---";
     this.Email2   = "---";
     this.Adress   = "---";
     this.Skype    = "---";
     this.VK       = "---";
     this.FaceBook = "---";
     this.Persone  = new ObservableCollection <Persone>();
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }