Exemplo n.º 1
0
 public void Init(IDBQuery dbHelper, ILoginUser loginUser)
 {
     _dbHelper             = dbHelper;
     _rwm                  = new RoleWindowModel(_dbHelper);
     _loginUser            = loginUser;
     _departmentMatchModel = new DepartmentMatchModel(dbHelper);
 }
Exemplo n.º 2
0
        //static private void LoadAppTitle()
        //{
        //    try
        //    {
        //        Configuration ca = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
        //        bool hasKey = ca.AppSettings.Settings.AllKeys.Contains("apptitle");

        //        if (hasKey)
        //        {
        //            _appTitle = ca.AppSettings.Settings["apptitle"].Value;
        //        }
        //    }
        //    catch { }
        //}


        static private void ReadLayout(BizMainLayout bizWindow, ref string designKey, out string layoutFmt)
        {
            layoutFmt = "";

            if (_loginUser == null || _dbHelper == null)
            {
                return;
            }

            RoleWindowModel rwm = new RoleWindowModel(_dbHelper);

            WindowInfoData windowInfo = rwm.GetRoleMainWindowInfo(_loginUser.RoleId);

            if (windowInfo == null)
            {
                MessageBox.Show("窗体配置信息读取失败。", "提示");
                return;
            }

            designKey      = windowInfo.窗体ID;
            bizWindow.Name = "Win_" + windowInfo.窗体ID;
            layoutFmt      = windowInfo.窗体信息.布局配置;
        }