|
I don't have a working PHP client.
The API is here: http://www.mailcleaner.net/downloads/MailCleanerAPI.pdf[^]
They gave an example of this to call with PHP:
$client = new SoapClient(‘https:
$params = array(
‘spam_tag’ => ‘{This is a spam}’,
‘summary_frequency’ => ‘weekly,
…
);
$result = $client->domainEdit(‘domain_name’, $params);
if ($result[‘code’] == 200) {
echo ‘domain edited’ ;
}
So you can see that PHP is doing a multidimensional array.. but there isn't a way to create this array with C# and convert it to object[].
I haven't done it before but maybe calling the soap manually instead of using the web reference?
|
|
|
|
|
I did some cleanup in my code, and now I'm getting the above error message, but I'm having trouble seeing the reason. I searched the internet and found this article, but I don't see that I'm having that issue.
http://www.softwareandfinance.com/forums/index.php?topic=314.0[^]
In my Program.cs class, I have the following lines of code.
Control control = new Control();
Assembly _assembly = Assembly.LoadFrom(programDll);
Type _type = _assembly.GetType("CWriter.ProgramControl");
Object _objectInstance = Activator.CreateInstance(_type);
I tried adding a breakpoint in the ProgramControl constructor, but it doesn't get hit. The constructor doesn't have any arguments to it.
|
|
|
|
|
Wrap the Activator.CreateInstance in a try/catch block and then take a look at the full exception. Is there an InnerException that provides more details (there should be)?
|
|
|
|
|
That helped a lot. Thanks! It looks like it can't find a file that the class it's trying to invoke is trying to use. I had pulled some code into it's own SerialNumber class. That's the problem. Thank you!
|
|
|
|
|
Hello again! Another problem needs to be solved, when users click button1 it creates new row in table with text from textbox1. I need it before adding created row to table to check if record already exists in column "iestade_nosaukums". Here is button1 code for adding new row.
private void button1_Click(object sender, EventArgs e)
{
datori_database.iestadesRow newiestadesRow;
newiestadesRow = datori_database.iestades.NewiestadesRow();
newiestadesRow.iestade_nosaukums = textBox1.Text;
this.datori_database.iestades.Rows.Add(newiestadesRow);
this.iestadesTableAdapter.Update(this.datori_database.iestades);
this.Validate();
this.iestadesBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.datori_database);
}
|
|
|
|
|
In the time between "checking" and "doing your thing", changes could occur. It's no fun to hunt for race-conditions in code.
The best way is to skip that check altogether, and deal with an exception if it occurs.
Bastard Programmer from Hell
|
|
|
|
|
yeah, you are right, it is easier this way, everything works now as it should. Thanks!
|
|
|
|
|
Rather than determining whether or not the record already exists, I would tend to use the following SQL:
INSERT INTO MyTable(SomeColumn)
SELECT @MyData
WHERE NOT EXISTS (SELECT SomeColumn FROM MyTable WHERE SomeColumn = @MyData) If you do a simple check, and then you do an insert and you are running this in a multi-user environment, you run the risk of adding a duplicate simply because you have two users doing the same checks at the same time.
As an alternative, put a unique constraint on the value you are trying to keep unique, and then just trap the resulting exception (this is not an ideal solution, but it is pretty much foolproof).
|
|
|
|
|
Thanks. I will try it later
|
|
|
|
|
Hello. So i have a filter that filters rows in datagridview:
private void button3_Click(object sender, EventArgs e)
{
iestadesBindingSource.Filter = string.Format("iestade_nosaukums like '%{0}%'", textBox1.Text.Trim().Replace("'", "''"));
}
When it doesn't find any records with criteria from textBox1.Text i need it to make visible label1.
|
|
|
|
|
Saidrex wrote: When it doesn't find any records with criteria from textBox1.Text i need it to make visible label1.
Where's the question? Simply check if your bindingsource contains records, and if it doesn't, hide the label.
Bastard Programmer from Hell
|
|
|
|
|
How to check if bindingsource contains records?
|
|
|
|
|
The bindingsource will not contain records directly; you would have assigned a datasource previously. Probably a list or a datatable
Bastard Programmer from Hell
|
|
|
|
|
it contains records from my datasource which contains tables from my database. I need it to check if there is any results after filtering. Any ideas how to do it? =)
|
|
|
|
|
Saidrex wrote: Any ideas how to do it? =)
Try MSDN[^].
"The Count property gets the number of items in the underlying list represented by the List property as modified by the value of the Filter property."
Bastard Programmer from Hell
|
|
|
|
|
yay, thanks, it works, my code:
private void button3_Click(object sender, EventArgs e)
{
iestadesBindingSource.Filter = string.Format("iestade_nosaukums like '%{0}%'", textBox1.Text.Trim().Replace("'", "''"));
int a = iestadesBindingSource.Count;
if ( a == 0)
{
label1.Text = "Error. No records with this keyword.";
}
}
|
|
|
|
|
Hi All,
We develop a windows application that can deal with sql server database directly or by Web Service,
We Want to add a new dialog to our setup wizard that configure the previous settings.
2 Radio buttons-> web service, directly
2 Text Boxes-> one for Web Service Url and the other for direct sql Connection.
Please help me if you know how to do that.
Thanks All.
|
|
|
|
|
|
i try for create web setup(open-file-new-project-other project type-setup and deployment and select web setup project ) but i select project output from right click web application folder and select project output but not get any information in combo box of project so, plz guide me for create web setup in vs2008 step by step and indicate my problem
|
|
|
|
|
|
|
Dear Sirs,
I need to restrict the colours and the fontname of a control that will be displayed on a property grid.
For example, in my application I only will allow the user select on of the follow FontNames for a control in a propertygrid: {Arial, Calibri, Comic Sans MS, Arial Black, and others}.
The same will be happened with the allowed colours do be selected.
I would also know the easiest way to hide all properties, except "Size", "Location", "Font", "Backcolour", and some properties that I've created. I've learned to use Browsable(true/False), or using BrowsableAttributes. But there are some properties within an Attribute that should be hide.
Thanks,
Almerindo Paiva
|
|
|
|
|
Create a proxy; a new class that contains the properties that you want to set.
Bastard Programmer from Hell
|
|
|
|
|
Hi to all expert,
I am a beginner in C# XNA. Can I ask why is there a CROSS in my Viewport?
Thank you
|
|
|
|
|
Philip Solomon See wrote: why is there a CROSS in my Viewport?
It's become a Christian.
(Sorry, I couldn't resist...)
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|