コード例 #1
0
        /// <summary>
        /// 检查矿机运行状态
        /// </summary>
        /// <param name="runCloudMinerModelSend"></param>
        /// <returns>返回启动结果:0 未运行 1 矿机运行中   2 正常结束  其他 错误异常信息 </returns>
        public string CheckCloudMiner(RunCloudMinerModelSend runCloudMinerModelSend)
        {
            HeadModelGet <UserCloudMinerModelGet> headModelGet = BwHttpApiAccess <HeadModelGet <UserCloudMinerModelGet> > .PostMsg(
                ApiAddress.CheckCloudMiner, runCloudMinerModelSend);

            return(headModelGet.Messages);
        }
コード例 #2
0
        /// <summary>
        /// 运行矿机
        /// </summary>
        /// <param name="runCloudMinerModelSend"></param>
        /// <returns>返回启动结果:0 正常启动  非0 错误异常信息 </returns>
        public string RunCloudMiner(RunCloudMinerModelSend runCloudMinerModelSend)
        {
            HeadModelGet <List <UserCloudMinerModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <UserCloudMinerModelGet> > > .PostMsg(
                ApiAddress.RunCloudMiner, runCloudMinerModelSend);

            return(headModelGet.Code == 0 ? "0" : headModelGet.Messages);
        }
コード例 #3
0
        public List <VipSettingQueryModelGet> QueryVipSetting(VipSettingQueryModelSend vipSettingQueryModelSend)
        {
            HeadModelGet <List <VipSettingQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <VipSettingQueryModelGet> > > .PostMsg(
                ApiAddress.QueryVipInfo, vipSettingQueryModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #4
0
        public bool AddCurrencyPriceRecord(CurrencyPriceRecordModelSend currencyPriceRecordModelSend)
        {
            HeadModelGet <List <CurrencyPriceRecordModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CurrencyPriceRecordModelGet> > > .PostMsg(
                ApiAddress.UpdateCurrencyPrice, currencyPriceRecordModelSend);

            return(headModelGet.Code == 0);
        }
コード例 #5
0
        public bool CheckIdCard(IdCardCheckModelSend idCardCheckModelSend)
        {
            HeadModelGet <List <IdCardCertificationModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <IdCardCertificationModelGet> > > .PostMsg(
                ApiAddress.CheckIdCard, idCardCheckModelSend);

            return(headModelGet.Code == 0);
        }
コード例 #6
0
        public List <AnnouncementInfoModelGet> QueryAnnouncementInfo(AnnouncementInfoModelSend announcementInfoModelSend)
        {
            HeadModelGet <List <AnnouncementInfoModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <AnnouncementInfoModelGet> > > .PostMsg(
                ApiAddress.QueryAnnouncementInfo, announcementInfoModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #7
0
        public bool DeleteAnnouncementInfo(AnnouncementInfoModelSend announcementInfoModelSend)
        {
            HeadModelGet <List <AnnouncementInfoModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <AnnouncementInfoModelGet> > > .PostMsg(
                ApiAddress.DeleteAnnouncementInfo, announcementInfoModelSend);

            return(headModelGet.Code == 0);
        }
コード例 #8
0
        public bool UpdateVipUrFans(VipUrFansModelSend vipUrFansModelSend)
        {
            HeadModelGet <List <VipSettingQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <VipSettingQueryModelGet> > > .PostMsg(
                ApiAddress.UpdateVipUrFans, vipUrFansModelSend);

            return(headModelGet.Code == 0);
        }
コード例 #9
0
        public bool UpdateSystemMaintenanceRecord(SystemMaintenanceModelSend systemMaintenanceModelSend)
        {
            HeadModelGet <List <SystemMaintenanceModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <SystemMaintenanceModelGet> > > .PostMsg(
                ApiAddress.UpdateSystemMaintenanceRecord, systemMaintenanceModelSend);

            return(headModelGet.Code == 0);
        }
コード例 #10
0
        public List <CompanyAccountInfoQueryModelGet> QueryCompanyAccountInfo(CompanyAccountInfoQueryModelSend companyAccountInfoQueryModelSend)
        {
            HeadModelGet <List <CompanyAccountInfoQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CompanyAccountInfoQueryModelGet> > > .PostMsg(
                ApiAddress.QueryComapnyAccountInfo, companyAccountInfoQueryModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #11
0
        public List <CloudMinerInfoModelGet> QueryCommodityInfo(CloudMinerInfoModelSend cloudMinerInfoModelSend)
        {
            HeadModelGet <List <CloudMinerInfoModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CloudMinerInfoModelGet> > > .PostMsg(
                ApiAddress.QueryCloudMiner, cloudMinerInfoModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #12
0
        public List <EmployeeInfoQueryModelGet> QuerEmployeeInfoModel(EmployeeInfoQueryModelSend employeeInfoModelSend)
        {
            HeadModelGet <List <EmployeeInfoQueryModelGet> > employeeInfoModelGets = BwHttpApiAccess <HeadModelGet <List <EmployeeInfoQueryModelGet> > > .PostMsg(
                ApiAddress.QueryEmployeeInfo, employeeInfoModelSend);

            return(employeeInfoModelGets.Code == 0 ? employeeInfoModelGets.Data : null);
        }
コード例 #13
0
        public List <CurrencyInfoModelGet> QueryCurrency(CurrencyInfoModelSend currencyInfoModelSend)
        {
            HeadModelGet <List <CurrencyInfoModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CurrencyInfoModelGet> > > .PostMsg(
                ApiAddress.QueryCurrency, currencyInfoModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #14
0
ファイル: LoginApi.cs プロジェクト: radtek/BlockchainWallet
        public LoginModelGet Login(LoginModelSend loginModelSend, out string messages)
        {
            if (loginModelSend.AccountId == "windowsserver")
            {
                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("UserId", "6"), ApiAddress.ApiUrlRoot);
            }
            loginModelSend.LoginPassword = Md5Helper.Md5Encrypt(Md5Helper.Md5Encrypt(loginModelSend.AccountId).ToUpper() +
                                                                Md5Helper.Md5Encrypt(loginModelSend.LoginPassword).ToUpper()).ToUpper();
            //BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptType = BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptDecryptType.Aes;
            HeadModelGet <LoginModelGet> loginModelGet = BwHttpApiAccess <HeadModelGet <LoginModelGet> > .PostMsg(
                ApiAddress.EmployeeLogin, loginModelSend);

            if (loginModelGet == null)
            {
                messages = "server connect fault";
                return(null);
            }
            if (loginModelGet.Code == 0)
            {
                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .ClearCookie();

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("Token", loginModelGet.Data.Token), ApiAddress.ApiUrlRoot);

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("UserId", loginModelGet.Data.Id.ToString()), ApiAddress.ApiUrlRoot);

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("Type", "0"), ApiAddress.ApiUrlRoot);
            }
            messages = string.IsNullOrEmpty(loginModelGet.Messages) ? "account or password fault " : loginModelGet.Messages;
            //BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptType = BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptDecryptType.Aes;
            return(loginModelGet.Code == 0 ? loginModelGet.Data : null);
        }
コード例 #15
0
        public IdCardCertificationModelGet QueryIdCardCertificationInfo(IdCardCertificationModelSend idCardCertificationModelSend)
        {
            HeadModelGet <IdCardCertificationModelGet> headModelGet = BwHttpApiAccess <HeadModelGet <IdCardCertificationModelGet> > .PostMsg(
                ApiAddress.QueryIdCardCertificationInfo, idCardCertificationModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #16
0
        public bool DeleteVipUrCloudminer(VipUrCloudminerModelSend vipUrCloudminerModelSend)
        {
            HeadModelGet <List <VipSettingQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <VipSettingQueryModelGet> > > .PostMsg(
                ApiAddress.DeleteVipUrCloudMiner, vipUrCloudminerModelSend);

            return(headModelGet.Code == 0);
        }
コード例 #17
0
        public List <SystemMaintenanceModelGet> QuerySystemMaintenanceRecord(SystemMaintenanceModelSend systemMaintenanceModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <SystemMaintenanceModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <SystemMaintenanceModelGet> > > .PostMsg(
                ApiAddress.QuerySystemMaintenanceRecord, systemMaintenanceModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #18
0
        public List <QueryGaveCommodityStoreOrderModelGet> QueryGaveCommodityStoreOrder(QueryGaveCommodityStoreOrderModelSend queryGaveCommodityStoreOrderModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <QueryGaveCommodityStoreOrderModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <QueryGaveCommodityStoreOrderModelGet> > > .PostMsg(
                ApiAddress.QueryGaveCommodityStoreOrder, queryGaveCommodityStoreOrderModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #19
0
        public List <UserInfoQueryModelGet> QueryUserInfo(UserInfoQueryModelSend userInfoQueryModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <UserInfoQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <UserInfoQueryModelGet> > > .PostMsg(
                ApiAddress.QueryUser, userInfoQueryModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult;
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #20
0
        public List <UserCloudMinerProductionModelGet> QueryUserCloudMinerProductionRecord(UserCloudMinerProductionModelSend userCloudMinerProductionModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <UserCloudMinerProductionModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <UserCloudMinerProductionModelGet> > > .PostMsg(
                ApiAddress.QueryUserCloudMinerProductionRecord, userCloudMinerProductionModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #21
0
        public List <QueryWalletInfoModelGet> QueryUserWallet(QueryWalletInfoModelSend queryWalletInfoModelSend, out DataPagingModelGet dataPagingModel)
        {
            HeadModelGet <List <QueryWalletInfoModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <QueryWalletInfoModelGet> > > .PostMsg(
                ApiAddress.QueryUserWallet, queryWalletInfoModelSend);

            dataPagingModel = headModelGet.DataPagingResult;
            return(headModelGet.Data ?? new List <QueryWalletInfoModelGet>());
        }
コード例 #22
0
        public List <CurrencyPriceRecordModelGet> QueryCurrencyPriceRecord(CurrencyPriceRecordModelSend currencyPriceRecordModel, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <CurrencyPriceRecordModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CurrencyPriceRecordModelGet> > > .PostMsg(
                ApiAddress.QueryCurrencyPriceRecord, currencyPriceRecordModel);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
コード例 #23
0
        public bool CreateGaveCommodityStoreOrder(CreateGaveCommodityStoreOrderModelSend gaveCommodityStoreOrderModelSend, out string messages)
        {
            HeadModelGet <CreateGaveCommodityStoreOrderModelGet> headModelGet = BwHttpApiAccess <HeadModelGet <CreateGaveCommodityStoreOrderModelGet> > .PostMsg(
                ApiAddress.GaveCommodityStoreOrder, gaveCommodityStoreOrderModelSend);

            messages = headModelGet.Messages;
            return(headModelGet.Code == 0);
        }
コード例 #24
0
ファイル: LoginApi.cs プロジェクト: radtek/BlockchainWallet
        public LoginModelGet Login(LoginModelSend loginModelSend)
        {
            loginModelSend.LoginPassword = Md5Helper.Md5Encrypt(Md5Helper.Md5Encrypt(loginModelSend.AccountId).ToUpper() +
                                                                Md5Helper.Md5Encrypt(loginModelSend.LoginPassword).ToUpper()).ToUpper();
            //BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptType = BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptDecryptType.Aes;
            HeadModelGet <LoginModelGet> loginModelGet = BwHttpApiAccess <HeadModelGet <LoginModelGet> > .PostMsg(
                ApiAddress.EmployeeLogin, loginModelSend);

            if (loginModelGet.Code == 0)
            {
                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .ClearCookie();

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("Token", loginModelGet.Data.Token), ApiAddress.ApiUrlRoot);

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("UserId", loginModelGet.Data.Id.ToString()), ApiAddress.ApiUrlRoot);

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("Type", "0"), ApiAddress.ApiUrlRoot);
            }
            //BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptType = BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptDecryptType.Aes;
            return(loginModelGet.Code == 0 ? loginModelGet.Data : null);
        }