Пример #1
0
        public _Evaluation()
        {
            Evaluation Evaluation = new Evaluation();
            Dates      date       = new Dates();

            date.AuthorDeadLine = date.ZeroDefaultDate(DateTime.Now).AddDays(1).AddHours(9);
            if (TMPStaticClass.CurrentOrder == null)
            {
                // EvaluationRecord = new EvaluationRecord();
                EvaluationRecord = new EvaluationRecord()
                {
                    DeadLine = date.AuthorDeadLine
                }
            }
            ;
            else
            {
                EvaluationRecord = new EvaluationRecord()
                {
                    DeadLine = TMPStaticClass.CurrentOrder.Dates.AuthorDeadLine
                }
            };
            FinalEvaluationRecord = new EvaluationRecord()
            {
                DeadLine            = EvaluationRecord.DeadLine,
                Price               = 0,
                EvaluateDescription = ""
            };
            //Order = new OrderLine();
            //LoadData();
            showWindow    = new DefaultShowWindowService();
            dialogService = new DefaultDialogService();
        }
Пример #2
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;
        }
Пример #3
0
 public PersoneOps()
 {
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
     ClientRecords = new ObservableCollection <ClientRecord>();
     Filters       = new _Filters();
 }
Пример #4
0
 public PersoneOps(int UserId)
 {
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
     this.UserId   = UserId;
     Filters       = new _Filters();
     ClientRecords = new ObservableCollection <ClientRecord>();
     LoadDataForClientOrdersListAsync();
 }
Пример #5
0
 public AuthorsVMClass(Author author)
 {
     edit = !edit;
     //Author = new Author();
     //Author =author;
     PersoneContactsData.Author = author;
     DefaultPhoto = "default_avatar.png";
     AuthorDafaultDataLoad(author);
     dialogService = new DefaultDialogService();
     showWindow    = new DefaultShowWindowService();
 }
Пример #6
0
 public _Contacts()
 {
     Contacts              = new Contacts();
     CurPersoneCompare     = new Persone();
     TmpContacts           = new Contacts();
     TmpContactsCompare    = new Contacts();
     TMPPersoneCompare     = new Persone();
     OldTmpContactsCompare = new Contacts();
     OldPersoneCompare     = new Persone();
     Persone       = new Persone();
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }
Пример #7
0
 //for redaction users info
 public UserOps(int UserId)
 {
     _Filters       = new _Filters();
     anyUsersInDB   = true;//here we show, that we have some user(s) in DB
     showWindow     = new DefaultShowWindowService();
     dialogService  = new DefaultDialogService();
     Records        = new ObservableCollection <UserRecord>();
     this.UserId    = UserId;
     AccessNameList = new ObservableCollection <string>()
     {
         "Админ", "Мастер-админ"
     };
     LoadDataForUsersList();
 }
Пример #8
0
        //for UserRegistration window
        public UserOps(object obj)
        {
            showWindow     = new DefaultShowWindowService();
            dialogService  = new DefaultDialogService();
            closeRegWindow = obj;
            // LoadPreviosData();
            _Filters = new _Filters();
            string error = CheckExistUser();

            if (error != null)
            {
                dialogService.ShowMessage(error);
                return;
            }
            DefaultDataLoad();
        }
Пример #9
0
        private void DefaultDataLoad()
        {
            DefaultPhoto = "default_avatar.png";
            //Author = new Author();
            _AuthorStatus = new _AuthorStatus();
            _Contacts     = new _Contacts();
            //Date = new Dates();
            _Dir = new _Direction();
            //Persone = new Persone();
            PersoneContactsData = new PersoneContactsData();

            //PersoneDescription = new PersoneDescription();
            _Subj         = new _Subject();
            dialogService = new DefaultDialogService();
            showWindow    = new DefaultShowWindowService();
        }
Пример #10
0
 //for UserInformationWindow
 public UserOps(int UserId, int tmp)
 {
     //notTheOne = true;
     anyUsersInDB  = true;//here we show, that we have some user(s) in DB
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
     _Filters      = new _Filters();
     if (tmp != 0)
     {
         this.UserId = tmp;
         editMode    = true;
         DefaultDataLoadForEditUser(tmp);
     }
     else
     {
         this.UserId = UserId;
         DefaultDataLoad();
     }
 }
Пример #11
0
 public PrintQuitance()
 {
     showWindow    = new DefaultShowWindowService();
     dialogService = new DefaultDialogService();
 }
Пример #12
0
 public MainWindowViewModel(IShowWindowService <ToDoItemViewModel> showWindowService)
 {
     this._showWindowService = showWindowService;
     this.ToDoList           = new ObservableCollection <ToDoItemViewModel>();
 }
Пример #13
0
 private void DefaultDataLoad()
 {
     User          = new User();
     dialogService = new DefaultDialogService();
     showWindow    = new DefaultShowWindowService();
 }