示例#1
0
        public AccesoSucursal_ViewModel()
        {
            Accesos = new AccesoSucursal_BusinessObject();
            Accesos.AccesoSucursalChanged += new EventHandler(Acceso_AccesoSucursalChanged);

            NombreSucursal = "";
        }
示例#2
0
        public Main_ViewModel()
        {
            Login   = new Login_BusinessObject();
            Accesos = new AccesoSucursal_BusinessObject();

            _AccesosSucursales = new ObservableCollection <AccesoSucursal_Model>(Accesos.GetAccesos());
            _SucursalesActivas = new ObservableCollection <DataRow[]>();

            lblSucursal_MouseLeftButtonDown = new RelayCommand(_lblSucursal_MouseLeftButtonDown);
            myMediaElement_MediaOpened      = new RelayCommand(_myMediaElement_MediaOpened);
            WindowState         = new RelayCommand(_WindowState);
            btnSucursal_Click   = new RelayCommand(_btnSucursal_Click);
            btnSubItem_Click    = new RelayCommand(_btnSubItem_Click);
            btnCloseUserControl = new RelayCommand(_btnCloseUserControl);
            btnClosing_Click    = new RelayCommand(_btnClosing_Click);
            btnMaximizar        = new RelayCommand(_btnMaximizar);
            btnMinimizar        = new RelayCommand(_btnMinimizar);
            btnSideBar_Click    = new RelayCommand(_btnSideBar_Click);

            UserName          = Login_ViewModel.Username;
            Password          = Login_ViewModel.Password;
            _WidthSideBar     = "0";
            _WindowVisibility = true;
            _ImgStates        = Application.Current.FindResource("Img_BtnMaximizar");
        }