public void ConfigAccepted(int value) { DataTable table = new DataTable(); config.Close(); listView1.Items.Clear(); if (value > 0) { Services.DataServices.DataFetchArguments Args = new Services.DataServices.DataFetchArguments() { Command = "SELECT * FROM dbo.Contests WHERE DTEnd > GETDATE() AND DTEnd >= DATEADD(d, " + value + ", GETDATE()); ", Connection = Program.HADESConnection, }; Services.DataServices.CreateDataServiceMethod(Args, AsyncWorker_RunWorkerCompleted); } else if (value < 0) { Services.DataServices.DataFetchArguments Args = new Services.DataServices.DataFetchArguments() { Command = "SELECT * FROM dbo.Contests WHERE DTEnd < GETDATE() AND DTEnd >= DATEADD(d, " + value + ", GETDATE());", Connection = Program.HADESConnection, }; Services.DataServices.CreateDataServiceMethod(Args, AsyncWorker_RunWorkerCompleted); } }
public void exec() { listView1.Items.Clear(); textBox1.Text = textBox1.Text.Trim(); DataTable table = new DataTable(); if (textBox1.Text.Contains("@")) { Services.DataServices.DataFetchArguments Args1 = new Services.DataServices.DataFetchArguments() { Command = "HubAdmin.SearchForPartialName", Connection = Program.CERBERUSConnection, SqlCommandArgumentNames = new string[] { "@SearchFor" }, SqlCommandArguments = new object[] { textBox1.Text.Trim() }, Type = CommandType.StoredProcedure }; Services.DataServices.CreateDataServiceMethod(Args1, AsyncWorker_RunWorkerCompleted1); } else { Services.DataServices.DataFetchArguments Args = new Services.DataServices.DataFetchArguments() { Command = "HubAdmin.GetPlayersForClosedContest", Connection = Program.HADESConnection, SqlCommandArgumentNames = new string[] { "@ContestID" }, SqlCommandArguments = new object[] { textBox1.Text.Trim() }, Type = CommandType.StoredProcedure }; Services.DataServices.CreateDataServiceMethod(Args, AsyncWorker_RunWorkerCompleted); } }
public void exec() { try { listView1.Items.Clear(); textBox2.Text = textBox2.Text.Trim(); DataTable table = new DataTable(); Services.DataServices.DataFetchArguments Args2 = new Services.DataServices.DataFetchArguments() { Command = "Interface.GetRecentPointsHistoryByUserID", Connection = Program.LACHESISConnection, SqlCommandArgumentNames = new string[] { "UserID" }, SqlCommandArguments = new object[] { textBox2.Text.Trim() }, Type = CommandType.StoredProcedure }; Services.DataServices.CreateDataServiceMethod(Args2, AsyncWorker_RunWorkerCompleted2); } catch { MessageBox.Show("There was an error processing this request; the string may be in the incorrect format."); return; } }
private void button1_Click(object sender, EventArgs e) { Services.DataServices.DataFetchArguments Args2 = new Services.DataServices.DataFetchArguments() { Command = "HubAdmin.BlacklistUser", Connection = Program.CERBERUSConnection, SqlCommandArgumentNames = new string[] { "UserID", "AdminName", "ReasonForListing", "Category", "EndDate" }, SqlCommandArguments = new object[] { _UUID, textBox2.Text, textBox1.Text, "Black", textBox3.Text}, Type = CommandType.StoredProcedure }; Services.DataServices.CreateDataServiceMethod(Args2, Completed); }