示例#1
0
        public CResult ProcessAdminLogin(CUserInfo inUserInfo)
        {
            CResult oNewResult = new CResult();

            try
            {
                CUserManager oManager = new CUserManager();



                CResult oResult = oManager.LoginAdminUser(inUserInfo);



                if (oResult.IsSuccess && oResult.Data != null)
                {
                    CUserInfo oUser = (CUserInfo)oResult.Data;

                    CResult oResult2 = oManager.GetUserAccess(oUser);

                    if (oResult2.IsSuccess && oResult2.Data != null)
                    {
                        CUserAccess oUserAccess = (CUserAccess)oResult2.Data;

                        oUser.UserAccess = oUserAccess;

                        CUserLogin oUserLogin = new CUserLogin();

                        oUserLogin.UserInfo = oUser;

                        CDalConfig oTempDal = ConfigManager.GetConfig <CDalConfig>();



                        String tempConnStr = oTempDal.ConnectionString;

                        oUserLogin.ConnectionStr = tempConnStr;



                        oNewResult.Data = oUserLogin;

                        oNewResult.IsSuccess = true;
                    }
                }
            }
            catch (Exception ex)
            {
            }



            return(oNewResult);
        }