|
Hello all.
I have a very simple/complex question to ask of anyone who as ever worked with/in the dinosaur environment known as ADP. Which ironically probably cuts most of our paychecks =(.
I would LOVE to speak with some one who has experience programming from C# to ADP via (preferably) XML or ADODB (which ADP no longer support).
I've received tons of materials from them and have access to their support staff, however their training materials may as well be written with invisible ink, if it was at least written in Arabic/French/Chinese/German/Greek/... at least I could convert it to English and try to understand how it works.
So in short. PLEASE email/reply if you or anyone you know has even heard of any type of .Net to ADP programming.
The basis of this question comes from an integration request to take data from a .Net environment to a ADP environment.
Thanks for any help you can provide.
|
|
|
|
|
Can anyone think of a good resource for such a task? With 34K online users I cannot be the only one having to do this.
|
|
|
|
|
I'm programming a winform soft that needs some kind of multiple lines.
The problem is: when I make a new line in a label it effects the label down of it.
I need to solve this problem by automatically relocate the down label
|
|
|
|
|
You could handle this programamtically. As the height of the label increased move the other label down.
However, this kind of solution could be error prone.
WPF provides neater layout solutions to solve this problem.
|
|
|
|
|
You could use a TableLayoutPanel with enough rows to hold each of your labels. Set the rows to AutoSize and the labels will move to make room for larger labels above them, automatically.
|
|
|
|
|
Third option; throw them on a Panel , with Dock Style.Top.
|
|
|
|
|
Can anyone give me a C# code snippet which implements upload of a file to web server like this:
POST <BASE-URL>/documents
Content-Type: multipart/form-data; boundary=<BOUNDARY>
Transfer-Encoding: chunked
--<BOUNDARY>
Content-Disposition: form-data; name="metadata"
Content-Type: application/json
{
"metadata" : {
"document" : {
"filename" : <filename>,
"size" : <filesize>,
"title" : <title>,
"author" : <author>
}
}
}
--<BOUNDARY>
Content-Disposition: form-data; name="document"; filename="<filename>"
Content-Type: <mime-type>
<File contents>
--<BOUNDARY>--
|
|
|
|
|
Hi everyone,
my customer has an ldap adam where i need to list users in this path : OU=activePersons,OU=persons,O=mycompany,DC=fr
I need to connect via an adam user distinguishedName like : uid=theuser,OU=serviceAccounts,O=mycompany,DC=fr
He gave me Base DN : o=mycompany,dc=fr
i've already have code from classic AD by using
System.DirectoryServices and System.DirectoryServices.ActiveDirectory.
But i don't know how to connect to this ADAM by using DistinguishedName...
Thanks for your help
|
|
|
|
|
how can i do to display subreport depending on parameter from main report
|
|
|
|
|
Your question isn't clear. What type of report is it? SQL Server Reporting? Business Objects? Crystal? We can't see your monitor, so we have no idea.
|
|
|
|
|
Delphi has a precedure named "Abort".The following is picked up from Delphi help:
Use Abort to escape from an execution path without reporting an error.Abort raises a special "silent exception" (EAbort), which operates like any other exception, but does not display an error message to the end user. Abort redirects execution to the end of the last try .. finally block.
EAbort = class(Exception);
procedure Abort;
function ReturnAddr: Pointer;
asm
MOV EAX,[EBP - 4]
end;
begin
raise EAbort.Create(SOperationAborted) at ReturnAddr;
end;
I'm now going to .Net. I can not find any method Similar to the "Abort" procedure.Is it possible to to write c# version of Delphi's "Abort" procedure like this?
try
{
try
{
...
try
{
...
Abort;
...
}
catch
{
}
}
catch
{
}
}
catch ()
{
}
finally
{
}
...
Can anyone help me? Any suggestion wil be appropriate.
Thanks a lot. .
Forgive my poor English
|
|
|
|
|
|
Assuming that you wish to exit out of all try blocks and continue execution from the line next to the last finally block, you can try this:
try
{
try
{
...
try
{
...
throw new MyCustomException();
...
}
catch (MyExeption1 ex)
{
}
}
catch (MyExeption2 ex)
{
}
}
catch (MyCustomException ex)
{
}
finally
{
}
What this code basically does is exploit the behavior of try catch blocks. When an exception is not handled by the inner catch block, the next outer catch block will try to handle it and so on. Note that all finally blocks will be executed anyway, if you do not wish this to happen, you can control the code flow with flag variables.
Points to keep in mind:
1. Don't handle any super-class of the exceptions raised in the respective catch blocks.
2. Don't handle System.Exception in the inner catch blocks.
A better way would be to re-design your code and make it modular with multiple outer try catch blocks and avoid 'block jumps'.
|
|
|
|
|
Xiaoming Qian wrote: Can anyone help me? Any suggestion wil be appropriate.
Don't do that.
Such an idiom should almost never be used. I only say "almost" because I don't like absolutes and in fact I don't know of any case that would suggest the use.
Given that it should never be used if someone comes across a case where it seems like a good idea then the first step should be to evaluate the architecture/design/implementation to look for errors that led to thinking it would be a good idea in the first place.
|
|
|
|
|
Take a simple example from here[^]
The following example, try remove "new" from B.Yell, it makes no difference (except Compiler will bitch about it).
Let me know if I am mistaken!
<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
try<br />
{<br />
A ref1 = new A(); <br />
A ref2 = new B();<br />
B ref3 = new B();<br />
<br />
ref1.Y(); <-- A.Yell<br />
ref2.Y(); <-- B.Yell<br />
ref3.Y(); <-- Always B.Yell, regardless whether you decorated Yell() with "new" or not! (This makes the keyword useless)<br />
}<br />
catch (Exception Ex)<br />
{<br />
Console.WriteLine("Main.Exception - " + Ex.ToString());<br />
}<br />
<br />
return;<br />
}<br />
<br />
class A<br />
{<br />
public void Yell()<br />
{<br />
Console.WriteLine("A.Yell");<br />
}<br />
}<br />
<br />
class B : A<br />
{<br />
public new void Yell()<br />
{<br />
Console.WriteLine("B.Yell");<br />
}<br />
}<br />
}<br />
dev
modified 31-Jan-13 0:26am.
|
|
|
|
|
Why would you expect A.Yell to be called when you have a reference to B?
...or did you mean to place your "Always B.Yell..." comment at ref2?
Kind Regards,
Keld Ølykke
|
|
|
|
|
Keld Ølykke wrote: Why would you expect A.Yell to be called when you have a reference to B?
Then what good is decorating the method B.Yell with "new" keyword? In the example, it does absolutely nothing. (i.e. remove it, you still have same result)
dev
|
|
|
|
|
If you mean to call a base class method by inheritance there is 2 options:
1) inherited class does not override or new a base class method => B.Yell() will call A.Yell() in all cases
2) inherited class does override or new a base class method => B.Yell() has the full responsibility for calling base.Yell()
You're example is not supposed to call base method, since you are missing a base.Yell() call in B - and it has nothing to do with the new keyword.
Kind Regards,
Keld Ølykke
|
|
|
|
|
i know how to call the base class method - i am asking if "new" is useless, that its own relevance is to silence compiler warning.
Read this.[^]
dev
|
|
|
|
|
Okay. I was in doubt about what you wanted to happen in your example.
I have a problem with your word useless. I think you refer to compiled code not changing behavior or something similar.
If so, I disagree with that opinion. In C# great efforts has been made to avoid that the programmer by accident does something he didn't mean to. One way that this is done, is by the introduction of more keywords e.g. virtual+override or new. This attitude from the language design team makes C# my favorite programming language.
In short, no, I don't find it useless, and, yes, it seems to "just" hide a compiler warning
Kind Regards,
Keld Ølykke
|
|
|
|
|
Thank you Keld, I was just looking for some sort of confirmation.
dev
|
|
|
|
|
I am pretty sure that the sole purpose of the new keyword in this context, is to hide the warning and has no other effect.
And to back it up :
When used as a modifier, the new keyword explicitly hides a member inherited from a base class. When you hide an inherited member, the derived version of the member replaces the base-class version. Although you can hide members without the use of the new modifier, the result is a warning. If you use new to explicitly hide a member, it suppresses this warning and documents the fact that the derived version is intended as a replacement.
2A
modified 31-Jan-13 3:31am.
|
|
|
|
|
Great! Thanks Markovl!
dev
|
|
|
|
|
The main intent of the new keyword in C# in this context is to let programmers and reviews know that this method is not an override and 'shadows' the base class method. This is specially targeted towards C++ programmers who migrated to C#. Remember, C++ does not have the override keyword.
Thew new keyword also enables you to 'shadow' or 'redefine' a virtual method in a derived class. IMO, this was not possible in C++. Correct me if I'm wrong.
modified 31-Jan-13 7:18am.
|
|
|
|
|
The new keyword does not make a difference in the case you are looking at.
A bigger difference is made in the line A ref2 = new B();
If you remove new and use the override keyword, your output will be
A.Yell<br />
B.Yell
This article[^] explains the difference quite clearly.
|
|
|
|