Click here to Skip to main content
15,903,385 members
Home / Discussions / C#
   

C#

 
AnswerRe: winform Deployment Pin
Pete O'Hanlon7-Mar-11 10:50
mvePete O'Hanlon7-Mar-11 10:50 
GeneralRe: winform Deployment Pin
arkiboys7-Mar-11 10:57
arkiboys7-Mar-11 10:57 
GeneralRe: winform Deployment Pin
GenJerDan7-Mar-11 12:16
GenJerDan7-Mar-11 12:16 
AnswerRe: winform Deployment Pin
RaviRanjanKr9-Mar-11 17:27
professionalRaviRanjanKr9-Mar-11 17:27 
QuestionStore data in Attribute for use in PropertyGrid Pin
lukeer7-Mar-11 1:22
lukeer7-Mar-11 1:22 
QuestionSCCM OS Deployment with native C# code Pin
UK19676-Mar-11 21:15
UK19676-Mar-11 21:15 
AnswerRe: SCCM OS Deployment with native C# code Pin
OriginalGriff7-Mar-11 0:46
mveOriginalGriff7-Mar-11 0:46 
GeneralRe: SCCM OS Deployment with native C# code Pin
UK19677-Mar-11 1:12
UK19677-Mar-11 1:12 
Ok, maybe i didn't describe my problem (and the wishes) correctly.

I want to write several methods in C# do get data from our SCCM landscape and to update / delete data there. Currently the is an ASP based portal in place and use which should be replaced by a new ASP.NET solution - written in C#.

I don't know what kind of libraries and methods i've to use to recreate a C# solution which contains methods - currently available in the ASP solution. Probably it's not a good idea to "translate" the original code. I'm looking (more or less) for a general answer how i can attach the SCCM landscape and how i can manipulate data there.

Example (old):
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")    
Set objSWbemServices = objSWbemLocator.ConnectServer(server, "\Root\SMS\site_EMEA, username, password)    
objSWbemServices.Security_.ImpersonationLevel = 3    
Set colSwbemObjectSet = objSWbemServices.ExecQuery("Select distinct ResourceID from SMS_G_System_NETWORK_ADAPTER where MACAddress = '" & mac & "'")    

For Each objProcess in colSWbemObjectSet        
    counter = counter + 1    
Next


Example (new):
SmsNamedValuesDictionary namedValues = new SmsNamedValuesDictionary();
WqlConnectionManager connection = new WqlConnectionManager(namedValues);

connection.Connect(server, username, password);
connection.ConnectionScope.Path.Path = "\\Root\\SMS\\site_EMEA";
connection.ConnectionScope.Options.Impersonation = ImpersonationLevel.Impersonate;

IResultObject iResult = connection.QueryProcessor.ExecuteQuery("Select distinct ResourceID from SMS_G_System_NETWORK_ADAPTER where MACAddress = '" + mac + "'");

foreach (IResultObject result in iResult) { 
    counter++;				
}


Is that the right way to do what I want ? There are other options available to do this ? I did some trials but wasn't successful. Maybe one of you have a method which can be a good example. I don't expect a complete solution Wink | ;) - only a hint.

Best regards and thanks in advance,
Uwe
(Germany)
Questionerror with Button in datagridview Pin
dits056-Mar-11 18:57
dits056-Mar-11 18:57 
AnswerRe: error with Button in datagridview Pin
nainakarri7-Mar-11 0:06
nainakarri7-Mar-11 0:06 
AnswerRe: error with Button in datagridview Pin
Pravin Patil, Mumbai7-Mar-11 0:27
Pravin Patil, Mumbai7-Mar-11 0:27 
AnswerRe: error with Button in datagridview Pin
OriginalGriff7-Mar-11 0:38
mveOriginalGriff7-Mar-11 0:38 
QuestionWhat do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 16:14
venomation6-Mar-11 16:14 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
Super Lloyd6-Mar-11 16:42
Super Lloyd6-Mar-11 16:42 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 17:10
venomation6-Mar-11 17:10 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
Pete O'Hanlon6-Mar-11 19:46
mvePete O'Hanlon6-Mar-11 19:46 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 21:32
venomation6-Mar-11 21:32 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
Eddy Vluggen6-Mar-11 20:51
professionalEddy Vluggen6-Mar-11 20:51 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 21:34
venomation6-Mar-11 21:34 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
Eddy Vluggen7-Mar-11 0:12
professionalEddy Vluggen7-Mar-11 0:12 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation7-Mar-11 6:00
venomation7-Mar-11 6:00 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
Eddy Vluggen7-Mar-11 8:14
professionalEddy Vluggen7-Mar-11 8:14 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
jschell7-Mar-11 8:51
jschell7-Mar-11 8:51 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation7-Mar-11 23:28
venomation7-Mar-11 23:28 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
PIEBALDconsult7-Mar-11 16:31
mvePIEBALDconsult7-Mar-11 16:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.