public CloudServiceClientBase( ILogger logger, IHttpClientFactory clientFactory, IHttpPlatformHelperService http_helper, IToast toast, IAuthHelper authHelper, ICloudServiceSettings settings, IModelValidator validator) : base(logger, http_helper, clientFactory) { this.authHelper = authHelper; this.toast = toast; this.settings = settings; ApiBaseUrl = string.IsNullOrWhiteSpace(settings.ApiBaseUrl) ? throw new ArgumentNullException(nameof(ApiBaseUrl)) : settings.ApiBaseUrl; connection = new ApiConnection(logger, this, http_helper, validator); #region SetClients Account = new AccountClient(connection); Manage = new ManageClient(connection); AuthMessage = new AuthMessageClient(connection); Version = new VersionClient(connection); ActiveUser = new ActiveUserClient(connection); Accelerate = new AccelerateClient(connection); Script = new ScriptClient(connection); DonateRanking = new DonateRankingClient(connection); #endregion }
public void GetClient() { con = new DBConnection(); var clients = new List <ManageClient>(); con.OpenConection(); con._dr = con.DataReader(@"SELECT * FROM client ORDER BY name ASC"); while (con._dr.Read()) { var cli = new ManageClient { clientId = Convert.ToInt32(con._dr["clientid"].ToString()), clientName = con._dr["name"].ToString(), clientAdd = con._dr["address"].ToString(), clientCon = con._dr["contact1"].ToString(), clientCon2 = con._dr["contact2"].ToString(), clientStatus = Convert.ToInt32(con._dr["contactstatus"].ToString()) }; clients.Add(cli); } con._dr.Close(); con.CloseConnection(); var js = new JavaScriptSerializer(); Context.Response.Write(js.Serialize(clients)); }
public UploadCommand(ManageClient client, ApiClient apiClient, UploadClient uploader, ILogger <UploadCommand> logger) { _manager = client; _apiClient = apiClient; _uploader = uploader; _logger = logger; }
public CheckCommand(ApiClient apiClient, ILogger <CheckCommand> logger, UploadClient uploadClient, ModConfiguration config, ManageClient manager) { _apiClient = apiClient; _logger = logger; _uploadClient = uploadClient; _config = config; _manager = manager; }
public void GetClientById(int id) { con = new DBConnection(); ManageClient clie = new ManageClient(); con.OpenConection(); con._dr = con.DataReader(@"SELECT * FROM client WHERE clientid='" + id + "'"); while (con._dr.Read()) { clie.clientId = Convert.ToInt32(con._dr["clientid"].ToString()); clie.clientName = con._dr["name"].ToString(); clie.clientAdd = con._dr["address"].ToString(); clie.clientCon = con._dr["contact1"].ToString(); clie.clientCon2 = con._dr["contact2"].ToString(); clie.clientStatus = Convert.ToInt32(con._dr["contactstatus"].ToString()); } con._dr.Close(); con.CloseConnection(); JavaScriptSerializer js = new JavaScriptSerializer(); Context.Response.Write(js.Serialize(clie)); }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Convert.ToString(Request.QueryString["code"]))) { try { Authentication authdata = getaccesstoken(Convert.ToString(Request.QueryString["code"])); SetAuthorizationDataAsync(authdata).Wait(); ManageClient manageClient = new ManageClient(); manageClient.RunAsync(_authorizationData); } catch (Exception ex) { } } else { generatecode(); } }
/// <summary> /// Initializes a new instance of the <see cref="ClientDashboardController"/> class /// </summary> /// <param name="manageClient">manage Client</param> public ClientDashboardController(ManageClient manageClient) { this._manageClient = manageClient; }
/// <summary> /// Initializes a new instance of the <see cref="ClientListingController"/> class /// </summary> /// <param name="manageClient">manage Client</param> public ClientListingController(ManageClient manageClient) { this._manageClient = manageClient; }
public ChangelogCommand(ManageClient uploadClient, ApiClient apiClient, ILogger <ChangelogCommand> logger) { _client = uploadClient; _api = apiClient; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="HomeController"/> class /// </summary> /// <param name="manageClient">manage Client</param> public HomeController(ManageClient manageClient) { this._manageClient = manageClient; }