Esempio n. 1
0
        private void DbLogin(object obj)
        {
            SqlHelper = new DbHelperSql(ServerName, DbName, DbLoginName, DbLoginPsd);
            SaveXmlDoc();
            if (!SqlHelper.IsConnect)
            {
                return;
            }
            IsDbLoginFailed = false;
            BasicInfoView view = new BasicInfoView();

            view.ShowDialog();
        }
Esempio n. 2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.layout_registration_basic, container, false);

            basicInfo = new BasicInfoView(view.FindViewById <ViewGroup> (Resource.Id.basicInfoFragment), this.Activity);

            if (coordinator.Person != null)
            {
                basicInfo.SetCustomerDetails(coordinator.Person);
            }

            basicInfo.CheckPerson += HandleCheckPerson;
            if (basicInfo.NextEventHandlerAlreadySet == false)
            {
                basicInfo.ValidProspect += ValidProspect;
            }
            basicInfo.Cancel += Cancel;

            coordinator.NavigableFragment = this;
            return(view);
        }
Esempio n. 3
0
        private void MainLogin(object obj)
        {
            if (!isLink)
            {
                MessageBox.Show("串口未连接", "JW8307A", MessageBoxButton.OK, MessageBoxImage.Asterisk);
                return;
            }

            if (Person.LoginName == MainLoginName && Person.LoginPsd == mainLoginPsd)
            {
                IsMainLoginFailed            = false;
                Person.IsBasicInfoViewEnable = true;
                Person.IsUserSetViewEnable   = true;

                //跳转到数据库登录界面
                var view = new DbLoginView();
                view.ShowDialog();
            }
            else
            {
                Person.SqlHelper = new DbHelperSql(Person.ServerName, Person.DbName, Person.DbLoginName, Person.DbLoginPsd);
                if (Person.SqlHelper.IsConnect)
                {
                    IsMainLoginFailed            = false;
                    Person.IsBasicInfoViewEnable = false;
                    Person.IsUserSetViewEnable   = false;
                    DbLoginViewModel.SqlHelper   = Person.SqlHelper;
                    var view = new BasicInfoView();
                    view.ShowDialog();
                }
                else
                {
                    MessageBox.Show("数据库登录失败,请联系管理员");
                }
            }
        }