Пример #1
0
        private void loadTrail()
        {
            try
            {
                #region "Trial"
                if (mConnectionBLL.checkConnection())
                {
                    mCurretnConnection = new CurrentConnection(Application.StartupPath);
                    bindGlobalConnection();
                    bindGlobalOrganization();
                    mLogin = new ProLogin(mLoginUserBLL.readLoginUser(), Application.StartupPath);
                    mLogin.ShowDialog();
                    if (mLogin.DialogResult == DialogResult.OK)
                    {
                        bindGlobalLoginUser();
                        bindGlobalPC();
                        bindGlobalControl();


                        Dictionary <string, string> dic = new Dictionary <string, string>();
                        dic.Add("@UserID", ApplicationMember.mLoginID);
                        DataTable tbl = mMasterBLL.executeSelectProcedure("CS_SP_SELECT_USER_MENU", dic);
                        mUtility.loadMenu(ref ribbon, ref tcHR, tbl);
                        mUtility.loadHome(ref tcHR);
                    }
                    else
                    {
                        this.Dispose();
                        this.Close();
                    }
                }
                else
                {
                    mDBController = new SetDBController(Application.StartupPath, 1);
                    if (mDBController.ShowDialog() == DialogResult.OK)
                    {
                        MessageBox.Show("System will restart");
                        Application.Restart();
                    }
                    else
                    {
                        //MessageBox.Show(mLogin.ShowDialog().ToString());
                        //this.Close();
                    }
                }
                #endregion
            }
            catch
            {
            }
        }