Esempio n. 1
0
        public bool TestConnection(byte[] validationTicket)
        {
            bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

            //检查校验码成功,有效的登录请求.
            if (pass)
            {
                return(new dalCommon(null).TestConnection());
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        public string GetSQLServerDbListString(byte[] validationTicket, string sServerName, string sUser, string sPwd)
        {
            bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

            //检查校验码成功,有效的登录请求.
            if (pass)
            {
                return(new dalCommon(null).GetSQLServerDbListString(sServerName, sUser, sPwd));
            }
            else
            {
                return("");
            }
        }
Esempio n. 3
0
        public bool TestConnectionD(byte[] validationTicket, string dbType, string Server, string database, string user, string password)
        {
            bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

            //检查校验码成功,有效的登录请求.
            if (pass)
            {
                return(new dalCommon(null).TestConnection(dbType, Server, database, user, password));
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
    public byte[] U_GetUserDirect(byte[] validationTicket, string account, string DBName)
    {
        bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

        //检查校验码成功,有效的登录请求.
        if (pass)
        {
            DataTable dt = new dalUser(null).GetUserDirect(account, DBName);
            return(ZipTools.CompressionDataSet(ServerLibrary.TableToDataSet(dt)));
        }
        else
        {
            return(null);
        }
    }
Esempio n. 5
0
    public byte[] GetSystemDataSet(byte[] validationTicket)
    {
        bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

        //检查校验码成功,有效的登录请求.
        if (pass)
        {
            DataTable data = new dalCommon(null).GetSystemDataSet();
            return(ZipTools.CompressionDataSet(ServerLibrary.TableToDataSet(data)));
        }
        else
        {
            return(null);
        }
    }
Esempio n. 6
0
        public byte[] GetSystemDataSetByOrg(byte[] validationTicket, string sOrgID)
        {
            bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

            //检查校验码成功,有效的登录请求.
            if (pass)
            {
                DataTable data = new dalCommon(null).GetSystemDataSetByOrg(sOrgID);
                return(ZipTools.CompressionDataSet(DataConverter.TableToDataSet(data)));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 7
0
    public byte[] U_Login(byte[] validationTicket, byte[] loginUser, char LoginUserType)
    {
        bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

        //检查校验码成功,有效的登录请求.
        if (pass)
        {
            LoginUser userInfo = ZipTools.DecompressionObject(loginUser) as LoginUser;
            DataTable dt       = new dalUser(null).Login(userInfo, LoginUserType);
            return(ZipTools.CompressionDataSet(ServerLibrary.TableToDataSet(dt)));
        }
        else
        {
            return(null);
        }
    }
Esempio n. 8
0
    public bool TestConnection(byte[] validationTicket)
    {
        bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

        //检查校验码成功,有效的登录请求.
        if (pass)
        {
            IWriteSQLConfigValue cfgWebConfig = new WebConfigCfg();

            //设置连接系统数据库的参数,重要!
            SqlConfiguration.SetSQLConfig(cfgWebConfig);

            return(new dalCommon(null).TestConnection());
        }
        else
        {
            return(false);
        }
    }
Esempio n. 9
0
        public byte[] U_LoginByCard(byte[] validationTicket, byte[] loginUser, char LoginUserType)
        {
            bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

            //检查校验码成功,有效的登录请求.
            if (pass)
            {
                LoginUser userInfo = ZipTools.DecompressionObject(loginUser) as LoginUser;
                Loginer   lg       = new Loginer();
                lg.DbType = userInfo.DbType;
                lg.DBName = userInfo.DBName;
                DataTable dt = new dalUser(lg).LoginByCard(userInfo, LoginUserType);
                return(ZipTools.CompressionDataSet(DataConverter.TableToDataSet(dt)));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 10
0
    public bool U_ModifyPwdDirect(byte[] validationTicket, string account, string pwd, string DBName)
    {
        try
        {
            bool pass = WebServiceSecurity.ValidateLoginIdentity(validationTicket);

            //检查校验码成功,有效的登录请求.
            if (pass)
            {
                return(new dalUser(null).ModifyPwdDirect(account, pwd, DBName));
            }
            else
            {
                return(false);
            }
        }
        catch (Exception ex)
        {
            throw new FaultException(ex.Message);
        }
    }