コード例 #1
0
        public LoginViewModel(LoginView view)
        {
            try
            {
                this.view = view;
                this.ConfirmPasswordVisible = Visibility.Collapsed;

                CommandBinding cmdAccept = new CommandBinding(
                    AcceptCommand,
                    (s, e) => Accept(),
                    (s, e) =>
                    {
                        e.CanExecute =
                            !String.IsNullOrEmpty(Username) &&
                            !String.IsNullOrEmpty(Password);
                    });
                CommandBinding cmdCancel = new CommandBinding(
                    CancelCommand,
                    (s, e) => Cancel(),
                    (s, e) =>
                    {
                        e.CanExecute = true;
                    });

                view.CommandBindings.Add(cmdAccept);
                view.CommandBindings.Add(cmdCancel);
            }
            catch (Exception ex)
            {
                ex.ShowMessageBox();
            }
        }
コード例 #2
0
        public ActionResult Login(LoginView m)
        {
            m.Messages = DataAccess.GetActiveLoginMesssages();
            if (!ModelState.IsValid) return View(m);

            var user = DataAccess.Authenticate(m.UserName, m.Password);

            if (user != null)
            {

                var cookie = Request.Cookies["rephidim_user"];
                if (cookie == null)
                {
                    cookie = new HttpCookie("rephidim_user");
                }
                cookie["rephidim_user"] = m.UserName;
                cookie.Expires = DateTime.Now.AddMonths(12);
                Response.Cookies.Add(cookie);

                var ticket = new FormsAuthenticationTicket(1, user.Name, DateTime.Now, DateTime.Now.AddDays(30), false, user.Rights);
                var encTicket = FormsAuthentication.Encrypt(ticket);

                var authCookie = FormsAuthentication.GetAuthCookie(FormsAuthentication.FormsCookieName, false);
                authCookie.Value = encTicket;
                Response.SetCookie(authCookie);

                if (!string.IsNullOrEmpty(m.ReturnUrl)) return Redirect(m.ReturnUrl);
                else return this.RedirectToAction<HomeController>(x => x.Home()); ;
            }
            else
            {
                ModelState.AddModelError("Error", "Authentication Failed.");
                return View(m);
            }
        }
コード例 #3
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            string val = e.Parameter as string;
            model = new LoginView();

            //

            i = model.getCourseId(val);
           // string me = i.insitution;
            //int id = i.Id;
            string name = i.course;


           // messageBox(me + "");
           list = model.getPossibleCareer(name);
            // list = model.getCourses(2);
            foreach (var inst in list)
            {
                listView.Items.Add(inst.Name);

            }

            base.OnNavigatedTo(e);

        }
コード例 #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            string val = e.Parameter as string;
            model = new LoginView();

            

            i = model.getSubOfferId(val);
            // string me = i.insitution;
            //int id = i.Id;
            string name = i.course;
            //string subname = i.subjectName ;
            //string code = i.code;
            //double price = i.price;


            // messageBox(me + "");
            list = model.getSubjectsOffered(name);
            // list = model.getCourses(2);
            foreach (var inst in list)
            {
                listView.Items.Add(inst.SubjectName + " " + inst.Code + " " + inst.Price );

            }
            
            //messageBox(val);
            base.OnNavigatedTo(e);

        }
コード例 #5
0
 private void btnSair_Click(object sender, EventArgs e)
 {
     LoginView loginView = new LoginView();
     this.Hide();
     loginView.Closed += (s, args) => this.Close();
     loginView.Show();
 }
コード例 #6
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     model = new LoginView();
     list = model.getAllInstitution();
     foreach (var inst in list)
     { 
         listView.Items.Add(inst.Name);
     }
     
     base.OnNavigatedTo(e);
 }
コード例 #7
0
		public override void LoadView ()
		{
			base.LoadView ();
			View.AddSubview (scrollView = new UIScrollView (View.Bounds));
			if (ShouldShowInstructions) {
				scrollView.Add (ContentView = new PrefillXamarinAccountInstructionsView ());
			} else {
				LoginView = new LoginView (XamarinAccountEmail);
				LoginView.UserDidLogin += _ => Login (XamarinAccountEmail, LoginView.PasswordField.Text);
				scrollView.Add (ContentView = LoginView);
			}
		}
コード例 #8
0
        public MainViewModel()
        {
            User = new SystemMenagerService.LoginUser { RealName = "" };
            #region MyRegion
            //Messenger.Default.Send<GenericMessage<string>>(new GenericMessage<string>("登录"), "startToLogin");
            //System.Windows.MessageBox.Show("startToLogin");

            //this.IconPath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"..\..\Resources\anjilogo.ico"; 
            #endregion
            this._formTitle = "查询平台管理客户端";

            lv = new LoginView();
            _user = new SystemMenagerService.LoginUser();
            _isEnable = false;

            #region init spans
            this.keepSpan = int.Parse(System.Configuration.ConfigurationManager.AppSettings["keepSpan"]);
            this.checkCancelSpan = int.Parse(System.Configuration.ConfigurationManager.AppSettings["checkCancelSpan"]);
            this.checkSafeSpan = int.Parse(System.Configuration.ConfigurationManager.AppSettings["checkSafeSpan"]);

            this.syncBlack = int.Parse(System.Configuration.ConfigurationManager.AppSettings["SyacBlackNoteSpan"]);
            this.syncWhite = int.Parse(System.Configuration.ConfigurationManager.AppSettings["SyncWhiteNoteSpan"]);

            //初始化重置timeSpan间隔
            this.clearSpan = GetMinGongBeiShu(new List<int> { this.keepSpan, this.checkCancelSpan, this.checkSafeSpan, this.syncWhite, this.syncBlack });

            #endregion

            #region init
            this.IsPhoneOnline = true;
            this.IsWebOnline = true;
            this.IsWeinxinOnline = true;
            this.IsSmOnline = true;

            this.TotalTime = new DateTime(0);
            #endregion
            //init the timer
            timer.Interval = new TimeSpan(0, 0, 1);
            timer.Tick += timer_Tick;
            timer.Start();

            #region register msg

            Messenger.Default.Register<GenericMessage<bool>>("CheckWebSatus", msg => this.IsWebOnline = msg.Content);
            Messenger.Default.Register<GenericMessage<bool>>("CheckWeixinSatus", msg => this.IsWeinxinOnline = msg.Content);
            Messenger.Default.Register<GenericMessage<bool>>("CheckPhoneSatus", msg => this.IsPhoneOnline = msg.Content);
            #endregion
        }
コード例 #9
0
        public ActionResult Login(string returnUrl)
        {
            var cookie = Request.Cookies["rephidim_user"];
            string lastUser = "******";
            if (cookie != null)
            {
                lastUser = cookie["rephidim_user"];
            }

            var m = new LoginView();
            m.UserName = lastUser;
            m.ReturnUrl = returnUrl;
            m.Messages = DataAccess.GetActiveLoginMesssages();

            return View("Login", m);
        }
コード例 #10
0
ファイル: Program.cs プロジェクト: njmube/SIQPOS
 public static void Main()
 {
     bool otherEPOSIsNotRunning = false;
     AppMutex = new Mutex(false, APPLICATION_NAME, out otherEPOSIsNotRunning);
     if (AppMutex.WaitOne(0, false))
     {
         LoginView loginView = new LoginView();
         loginView.ShowDialog();
         if (loginView.DialogResult.Equals(true))
         {
             loginView.Close();
             App app = new App();
             app.InitializeComponent();
             app.Run();
         }
     }
 }
コード例 #11
0
ファイル: AuthController.cs プロジェクト: soxfmr/CourseSystem
        public string OnLogin(string email, string pass, int mode)
        {
            LoginView view = new LoginView();
            Validator validator = new Validator();

            // Validate the user input here.
            if (!validator.MatchRule(email, "email", "email") )
            {
                return view.Error(validator.GetDetail());
            }

            UserRepository userRepo = new UserRepository();
            if (userRepo.Login(email, pass, mode))
            {
                return view.Show(userRepo.SessionId);
            }

            return view.Error();
        }
コード例 #12
0
        private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            view = new LoginView();
            string email = txtUsername.Text;
            string pass = txtPassword.Text;
            if (txtPassword.Text != "" && txtUsername.Text != "")
            {
                if (view.getData(email, pass) != null)
                {
                    this.Frame.Navigate(typeof(InstitutionPage));
                }
                else
                {
                    messageBox("You have entered wrong password");
                }
            }
            else
            {
                messageBox("please enter values");

            }
        }
コード例 #13
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            i = new HowTheyWork();
            string val = e.Parameter as string;
            model = new LoginView();

            i = model.getWorkId(val); 

            string name = i.course;
         

            list = model.getHowTheyWork(name);
           // Image imageControl = new Image();

          
            //pic.Add(imageControl);


           
        
           // messageBox(val + pic.FindName("Assets/it.jpg"));
            foreach (var inst in list)
            {
                if (name.Equals("Information Technology"))
                {
                    pic.Source = new BitmapImage(new Uri(
                              "ms-appx:///Assets/it.jpg", UriKind.Absolute));
                }
                if (name.Equals("Policing"))
                {
                    pic.Source = new BitmapImage(new Uri(
                              "ms-appx:///Assets/download.jpg", UriKind.Absolute));
                }

            }

            base.OnNavigatedTo(e);
        }
	// This function will be called when scene loaded:
	void Awake () {   
		loginView = new LoginView();
		// Setup of login view:
		loginView.guiSkin = guiSkin;
		loginView.header1Style = header1Style;
		loginView.header2Style = header2Style;
		loginView.header2ErrorStyle = header2ErrorStyle;
		loginView.formFieldStyle = formFieldStyle;
		
		// Handler of registration button click:
		//loginView.openRegistrationHandler = function() {
			// Clear reistration fields:
		//	registrationView.data.clear();
			// Set active view to registration:
		//	activeViewName = RegistrationView.NAME;
		//};
		
		// Setup of login view:
/*		registrationView.guiSkin = guiSkin;
		registrationView.header2Style = header2Style;
		registrationView.formFieldStyle = formFieldStyle;
		registrationView.errorMessageStyle = errorMessageStyle;
*/		
		// Handler of cancel button click:
		/*registrationView.cancelHandler = function() {
			// Clear reistration fields:
			loginView.data.clear();
			// Set active view to registration:
			activeViewName = LoginView.NAME;
		};*/
		
		viewByName = new Hashtable();
		
		// Adding login view to views by name map:
		viewByName.Add(LoginView.NAME, loginView);
		//viewByName[RegistrationView.NAME] = registrationView;
	}
コード例 #15
0
        public OfficeHourController(IOfficeHourRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.OfficeHourRepository = repository;
        }
コード例 #16
0
 private void Canvas_Loaded(object sender, RoutedEventArgs e)
 {
     LoginView dialog = new LoginView();
         dialog.Show();
 }
コード例 #17
0
    // This function will be called when scene loaded:
    void Start()
    {
        //init components
        viewByName = new Hashtable ();
        loginService = (LoginService)gameObject.AddComponent("LoginService");
        registrationService = (RegistrationService)gameObject.AddComponent("RegistrationService");
        loginView = (LoginView)gameObject.AddComponent("LoginView");
        registrationView = (RegistrationView)gameObject.AddComponent("RegistrationView");

        // Setup of login view:
        loginView.guiSkin = guiSkin;
        loginView.header1Style = header1Style;
        loginView.header2Style = header2Style;
        loginView.header2ErrorStyle = header2ErrorStyle;
        loginView.formFieldStyle = formFieldStyle;

        // Handler of registration button click:
        loginView.registrationHandler = delegate(){
            // Clear reistration fields:
            registrationView.data.clear();
            // Set active view to registration:
            activeViewName = RegistrationView.NAME;
        };

        // Setup of login view:
        registrationView.guiSkin = guiSkin;
        registrationView.header2Style = header2Style;
        registrationView.formFieldStyle = formFieldStyle;
        registrationView.errorMessageStyle = errorMessageStyle;

        // Handler of cancel button click:
        registrationView.cancelHandler = delegate() {
            // Clear reistration fields:
            loginView.data.clear();
            // Set active view to registration:
            activeViewName = LoginView.NAME;
        };

        viewByName = new Hashtable();

        // Adding views to views by name map:
        viewByName[LoginView.NAME] = loginView;
        viewByName[RegistrationView.NAME] = registrationView;

        loginView.loginHandler = delegate() {
            blockUI = true;
            // Sending login request:
            loginService.sendLoginData(loginView.data, loginResponseHandler);
        };

        // Handler of Register button:
        registrationView.registrationHandler = delegate() {
            blockUI = true;
            // Sending registration request:
            registrationService.sendRegistrationData(registrationView.data, registrationResponseHandler);
        };
    }
コード例 #18
0
        public LateFeeAccountSelectorViewController(ILateFeeAccountSelectorViewRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.LateFeeAccountSelectorViewRepository = repository;
        }
コード例 #19
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     LoginView wnd = new LoginView();
     wnd.ShowDialog();
 }
コード例 #20
0
ファイル: WebAuth.cs プロジェクト: bradtwurst/lokad-cqrs
 static AuthenticationResult ViewToResult(UserId id, LoginView view)
 {
     var auth = new AuthInfo(id, view.Token);
     var result =
         new AuthenticationResult(new SessionIdentity(id, view.Security, view.Display, auth.ToCookieString(),
             view.Permissions, view.Token));
     return result;
 }
コード例 #21
0
        public MainWindow()
        {
            dbContext = new CinemaContext();
            //List<Session> list = dbContext.Sessions.ToList();
            //for (int i = 0; i < list.Count(); i++)
            //{
            //    dbContext.Tickets.RemoveRange(list[i].Tickets);
            //    list[i].GenerateTickets(dbContext);
            //}
            //dbContext.Sessions.RemoveRange(dbContext.Sessions);
            //dbContext.SaveChanges();
            //dbContext.s
            //foreach (var session in dbContext.Sessions)
            //{
            //    session.GenerateTickets();
            //}
            //var loginviewmodel = LoginView.DataContext;
            //UserRole AdminRole = new UserRole() { Name = "Admin" };
            //UserRole CashierRole = new UserRole() { Name = "Cashier" };
            //dbContext.UserRoles.Add(AdminRole);
            //dbContext.UserRoles.Add(CashierRole);
            //dbContext.SaveChanges();
            //User AdminUser = new User() { Login = "******", Name = "Admin", Surname = "Admin", Password = "******", UserRole = dbContext.UserRoles.First(), UserRoleId = 0, DateOfBirth = Convert.ToDateTime(new DateTime(1997, 3, 12)).Date };
            //dbContext.Users.Add(AdminUser);
            //////dbContext.Users.Remove(dbContext.Users.First());
            //ShowLoginView();
            //Binding loginviewBinding = new Binding();
            //loginviewBinding.Source = loginviewmodel;
            //loginviewBinding.Mode = BindingMode.TwoWay;
            //loginviewBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            //loginviewBinding.Path = new PropertyPath("LoginViewVisibility");

            //this.LoginView.SetBinding(VisibilityProperty, loginviewBinding);
            //dbContext.Sessions.Add(new Session()
            //{
            //    DateTime = new DateTime(2017, 9, 1, 15, 30, 0),
            //    Film = dbContext.Films.FirstOrDefault(i => i.Name.ToLower() == "Inception"),
            //    Hall = dbContext.Halls.FirstOrDefault(h => h.Number == 1),
            //    Price = 50
            //});
            //dbContext.Sessions.Add(new Session()
            //{
            //    DateTime = new DateTime(2017, 9, 6, 15, 30, 0),
            //    Film = dbContext.Films.FirstOrDefault(i => i.Name.ToLower() == "Dark Knight"),
            //    Hall = dbContext.Halls.FirstOrDefault(h => h.Number == 3),
            //    Price = 50
            //});
            //dbContext.Sessions.Add(new Session()
            //{
            //    DateTime = new DateTime(2017, 9, 7, 17, 30, 0),
            //    Film = dbContext.Films.FirstOrDefault(i => i.Name.ToLower() == "Dark Knight"),
            //    Hall = dbContext.Halls.FirstOrDefault(h => h.Number == 1),
            //    Price = 50
            //});
            //dbContext.Sessions.Add(new Session()
            //{
            //    DateTime = new DateTime(2017, 9, 7, 15, 30, 0),
            //    Film = dbContext.Films.FirstOrDefault(i => i.Name.ToLower() == "Dark Knight"),
            //    Hall = dbContext.Halls.FirstOrDefault(h => h.Number == 2),
            //    Price = 50
            //});
            //dbContext.Sessions.Add(new Session()
            //{
            //    DateTime = new DateTime(2017, 9, 5, 15, 30, 0),
            //    Film = dbContext.Films.FirstOrDefault(i => i.Name.ToLower() == "Lord of the Rings"),
            //    Hall = dbContext.Halls.FirstOrDefault(h => h.Number == 3),
            //    Price = 50
            //});

            if (dbContext.UserRoles.First() == null)
            {
                UserRole AdminRole = new UserRole()
                {
                    Name = "Admin"
                };
                UserRole CashierRole = new UserRole()
                {
                    Name = "Cashier"
                };
                dbContext.UserRoles.Add(AdminRole);
                dbContext.UserRoles.Add(CashierRole);
                dbContext.SaveChanges();

                User AdminUser = new User()
                {
                    Login = "******", Name = "Admin", Surname = "Admin", Password = "******", UserRole = dbContext.UserRoles.First(), UserRoleId = 0, DateOfBirth = Convert.ToDateTime(new DateTime(1997, 3, 12)).Date
                };
                dbContext.Users.Add(AdminUser);

                dbContext.SaveChanges();
            }

            dbContext.SaveChanges();

            loginView            = new LoginView();
            mainView             = new MainView();
            loginView.Visibility = Visibility.Visible;

            //loginView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            this.DataContext = new MainWindowViewModel(this);
            mainView.SetBinding(VisibilityProperty,
                                new Binding("MainViewVisibility")
            {
                Source = this.DataContext, Mode = BindingMode.OneWay
            });
            loginView.SetBinding(VisibilityProperty,
                                 new Binding("LoginViewVisibility")
            {
                Source = this.DataContext, Mode = BindingMode.OneWay
            });
            this.Visibility = Visibility.Hidden;
            //InitializeComponent();

            //this.Width = 300;
            //this.Height = 400;
            loginviewmodel = loginView.DataContext as LoginViewModel;
            if (loginviewmodel != null)
            {
                loginviewmodel.ParentMainWindowViewModel = this.DataContext as MainWindowViewModel;
            }

            MainViewViewModel = mainView.DataContext as MainViewViewModel;
            if (MainViewViewModel != null)
            {
                MainViewViewModel.ParentMainWindowViewModel = this.DataContext as MainWindowViewModel;
            }
            //ShowMainView(dbContext.Users.FirstOrDefault(i => i.Login.ToLower() == "Admin"));
        }
コード例 #22
0
        public ScholorshipTypeDetailController(IScholorshipTypeDetailRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.To <long>();
            this._UserId   = view.UserId.To <int>();
            this._OfficeId = view.OfficeId.To <int>();
            this._Catalog  = catalog;

            this.ScholorshipTypeDetailRepository = repository;
        }
コード例 #23
0
ファイル: WebAuth.cs プロジェクト: bradtwurst/lokad-cqrs
 void ReportLoginSuccess(UserId id, LoginView view)
 {
     // we are good. Now, report success, if needed, to update all the views
     var time = DateTime.UtcNow;
     string host = HttpContext.Current.Request.UserHostAddress;
     if ((view.LastLoginUtc == DateTime.MinValue) || ((time - view.LastLoginUtc) > view.LoginTrackingThreshold))
     {
         _webEndpoint.SendOne(new ReportUserLoginSuccess(id, time, host));
     }
 }
        public GetFrequencySetupStartDateByFrequencySetupIdController(IGetFrequencySetupStartDateByFrequencySetupIdRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.repository = repository;
        }
コード例 #25
0
        public CompoundItemDetailController(ICompoundItemDetailRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.CompoundItemDetailRepository = repository;
        }
コード例 #26
0
        public CreateCultureController(ICreateCultureRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.repository = repository;
        }
コード例 #27
0
 internal void Login()
 {
     try
     {
         if (LoginText == IniciarSesion)
         {
             LoginView login = new LoginView();
             if (login.ShowDialog() == true)
             {
                 this.Username = UserService.LoggedInUser.ToString();
                 this.LoginText = CerrarSesion;
             }
         }
         else
         {
             UserService.LoggedInUser = UserService.GetNullUser();
             this.Username = UserService.LoggedInUser.ToString();
             this.LoginText = IniciarSesion;
         }
     }
     catch (Exception ex)
     {
         ex.ShowMessageBox();
     }
 }
コード例 #28
0
        public void EnterClick()
        {
            LoginView newWindow = new LoginView();

            newWindow.Show();
        }
コード例 #29
0
        public override void Run(bool runWithDefaultConfiguration)
        {
            AccessBehavior.Provider = new AccessLevelProvider();

            if (Debugger.IsAttached)
            {
                BindingListener.SetTrace();
            }

            Application.Current.DispatcherUnhandledException +=
                new DispatcherUnhandledExceptionEventHandler(
                    this.OnAppDispatcherUnhandledException);

            Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            // Authenticate the current user and set the default principal
            LoginView auth = new LoginView();
            auth.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bool? dialogResult = auth.ShowDialog();

            // deal with the results
            if (dialogResult.HasValue && dialogResult.Value)
            {
                //AppDomain.CurrentDomain.SetThreadPrincipal(auth.NewPrincipal);
                base.Run(runWithDefaultConfiguration);
                Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
            }
            else
            {
                Application.Current.Shutdown(-1);
            }
        }
コード例 #30
0
        public GetMenuIdByMenuCodeController(IGetMenuIdByMenuCodeRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.repository = repository;
        }
コード例 #31
0
ファイル: BaseController.cs プロジェクト: kevinassen1992/KBS2
 // Method that starts the application
 public void start()
 {
     if (user == null)
     {
         bv = new BaseView(this);
         lv = new LoginView(this);
         //this.user = new User(1, "docent", "meneer", "*****@*****.**", "test", true);
         Application.Run(lv);
     }
     else
     {
         lv.Hide();
         bv.Show();
     }
 }
コード例 #32
0
        public PartySalesChartViewController(IPartySalesChartViewRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.PartySalesChartViewRepository = repository;
        }
コード例 #33
0
        public AttachmentFactoryController(IAttachmentFactoryRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.AttachmentFactoryRepository = repository;
        }
コード例 #34
0
 static void Main(string[] args)
 {
     LoginView loginView = new LoginView();
     loginView.Show();
 }
コード例 #35
0
ファイル: LoginModal.cs プロジェクト: lingxiao20170713/liuyun
 public override void Destroy()
 {
     base.Destroy();
     loginView.Destroy();
     loginView = null;
 }
コード例 #36
0
 public LoginViewModel(LoginView owner)
 {
     this.owner   = owner;
     LoginCommand = DelegateCommand.Create(OnLogin);
 }
コード例 #37
0
        public FrequencySelectorViewController(IFrequencySelectorViewRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.FrequencySelectorViewRepository = repository;
        }
コード例 #38
0
 public LoginViewModel(LoginView loginView)
 {
     _loginView   = loginView;
     CmdLogin     = new DelegateCommand(OnCmdLogin, OnCanLogin);
     CmdAbbrechen = new DelegateCommand(OnCmdAbbrechen);
 }
コード例 #39
0
 private void Login_Click(object sender, RoutedEventArgs e)
 {
     LoginView wnd = new LoginView();
     wnd.ShowDialog();
 }
コード例 #40
0
 public LoginViewModel(LoginView lv)
 {
     AuthorizationCommand = new RelayCommand(Login);
     _lv = lv;
 }
 public void Login_View_Test()
 {
     LoginView Validate = new LoginView();
 }
コード例 #42
0
 public LoginViewModel(LoginView loginpage)
 {
     loginPage = loginpage;
 }
コード例 #43
0
        public TerminationVerificationScrudViewController(ITerminationVerificationScrudViewRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.TerminationVerificationScrudViewRepository = repository;
        }
コード例 #44
0
        public static async Task WithdrawAsync(string tenant, string reason, long tranId, LoginView meta)
        {
            bool isRestrictedTransactionMode = await IsRestrictedTransactionModeAsync(tenant, meta.OfficeId).ConfigureAwait(false);

            if (isRestrictedTransactionMode)
            {
                throw new JournalWithdrawalException(I18N.CannotWithdrawTransactionDuringRestrictedTransactionMode);
            }

            var status = await Verifications.GetVerificationStatusAsync(tenant, tranId, meta.OfficeId).ConfigureAwait(false);

            if (status.UserId != meta.UserId)
            {
                throw new JournalWithdrawalException(I18N.AccessDeniedCannotWithdrawSomeoneElseTransaction);
            }

            if (
                status.VerificationStatusId.Equals(0) //Awaiting verification
                ||
                status.VerificationStatusId.Equals(1) //Automatically Approved by Workflow
                )
            {
                await TransactionPostings.WithdrawAsync(tenant, reason, meta.UserId, tranId, meta.OfficeId).ConfigureAwait(false);

                return;
            }

            throw new JournalWithdrawalException(I18N.AccessIsDenied);
        }
コード例 #45
0
        public MaritalStatusController(IMaritalStatusRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.MaritalStatusRepository = repository;
        }
コード例 #46
0
ファイル: WebAuth.cs プロジェクト: bradtwurst/lokad-cqrs
        static string ComposeLockoutMessage(LoginView view)
        {
            var lockoutTill = view.LockedOutTillUtc;

            var message = view.LockoutMessage;
            var current = DateTime.UtcNow;
            if (lockoutTill.Year - current.Year > 1)
            {
                // this is a really long lockout
                return message;
            }
            var diff = lockoutTill - current;
            string timer;
            if (diff.TotalHours > 1)
            {
                timer = string.Format("Account locked out till {0:yyyy-MM-dd HH:mm}", lockoutTill);
            }
            else
            {
                timer = string.Format("Account locked out for {0} minutes", Math.Ceiling(diff.TotalMinutes));
            }

            if (!string.IsNullOrEmpty(message))
                timer += ". " + message;
            return timer;
        }
コード例 #47
0
        public CustomFieldSetupController(ICustomFieldSetupRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.CustomFieldSetupRepository = repository;
        }
コード例 #48
0
 protected override void OnElementChanged(ElementChangedEventArgs <Page> e)
 {
     base.OnElementChanged(e);
     _page = e.NewElement as LoginView;
 }
コード例 #49
0
 public LoginViewModel(LoginView view)
     : base(view.Dispatcher)
 {
 }
コード例 #50
0
        public StorePolicyController(IStorePolicyRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.StorePolicyRepository = repository;
        }
コード例 #51
0
ファイル: AuthController.cs プロジェクト: kevinassen1992/KBS2
 //Sets loginview
 public void setView()
 {
     LoginView view = new LoginView(bc);
 }
コード例 #52
0
        public GetPriceTypeNameByPriceTypeIdController(IGetPriceTypeNameByPriceTypeIdRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.repository = repository;
        }
コード例 #53
0
        public ItemSellingPriceController(IItemSellingPriceRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.ItemSellingPriceRepository = repository;
        }
コード例 #54
0
        public FbAccessTokenController(IFbAccessTokenRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.To <long>();
            this._UserId   = view.UserId.To <int>();
            this._OfficeId = view.OfficeId.To <int>();
            this._Catalog  = catalog;

            this.FbAccessTokenRepository = repository;
        }
コード例 #55
0
        public App()
        {
            InitializeComponent();

            MainPage = new LoginView();
        }
        public void LocUtil_View_Test()
        {
            LoginView login = new LoginView();

            LocUtil.SwitchLanguage(login, "en-US");
        }