|
It could be the soap.FindConfigurationItems returns null, in that case response don't receive an object coming from FindConfigurationItems method. check your request variable if it returns a value.
You can't use response object when soap.FindConfigurationItems returns null.
|
|
|
|
|
|
If you're saying that you have some (entity) class definitions and want to know how to derive a database from them, then look at the Entity Framework "Code First" (versus the database / model first) approach, which can generate an SQL Server database from "code".
|
|
|
|
|
|
Here's a link that may help:
https://msdn.microsoft.com/en-ca/data/jj679962.aspx
You may only need to some minimal refactoring to indicate parent and child relationship.
|
|
|
|
|
|
I don't know what you mean when you say "... EF does not want the whole object but the ID only have the objects.".
EF will generate a primary key for a property that is or ends in "ID".
A relation is simply a statement such as:
public IList<Order> Orders { get; set; }
EF will create (entity model) relationships using the above "ID's" and "relation" statements.
I haven't used "xsd2Code" but when I paste "layered XML" in Visual Studio using Edit | Paste Special | Paste XML as classes, all the "layers" are converted to classes and a corresponding "relation" statement.
I've used the above to generate classes into which XML from 3rd-party web services was de-serialized; with no refactoring needed.
|
|
|
|
|
Hi there. I'm having a problem to create a program to get information from a website. First thing that I did was to put the login information with a HtmlElement, first I get the element with GetElementById and then I set the attribute, for click on login I get the element by button name and then I invokeMember("click"). It works fine but the problem is after this, the buttons are all in this way:
<img src="_imagens/sistemas/fig_PROJETOS_large.gif" onclick="sistema('PROJETOS','Acompanhamento de Projetos')" alt="Acompanhamento de Projetos" border="0">
So it does not have an ID, it is just calling the javascript function sistema that has some arguments. My question is, how I can run this button from a c# program since I can't found it by ID and then do a InvokeMember to click in this button? I tried to use webBrowser.Document.InvokeScript and others way but nothing worked to me.
Thanks for now.
|
|
|
|
|
How can I manage printers on network, getting their status, ink level, if any printer have any problem then getting problem description,enable/disable printing on specific printer,etc.
All these I need to manage programmatically.
Regards
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I would think that would be determined by the api the printer publishes.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Check out the System.Printing.PrintQueue and PrintSystemJobInfo classes.
The actual status information you get back for a given printer will depend on how well a given printer (driver) integrates with Windows.
(If a particular printer has "poor" Windows support, you will need to have access to the printer driver API; usually via a custom .NET dll supplied by the vendor, when available).
|
|
|
|
|
if your printer is connected directly to the network and support SNMP you can talk to your network printer and get what you want from him! i recommend you check SNMP feature of your printer ( if they have it !)
|
|
|
|
|
hii i was wundering. why my textbox keeps staying empty? i hope someone could tel me how ti fix it, my code stays below:
private void Form1_Load(object sender, EventArgs e)
{
this.logoTableAdapter.Fill(this.klantenbestandDataSet4.Logo);
this.productenTableAdapter.Fill(this.klantenbestandDataSet3.Producten);
this.werkzaamhedenTableAdapter1.Fill(this.klantenbestandDataSet2.Werkzaamheden);
this.klantenTableAdapter.Fill(this.klantenbestandDataSet1.Klanten);
cn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Master of Disaster\Documents\klantenbestand.mdb";
cmd.Connection = cn;
werkzaamhedenwijzigenonderinstellingen();
productenwijzigenonderinstellingen();
PlaatsenLogo();
pictureBox1.ImageLocation = textBox63.Text;
tabControl1.TabPages.Remove(tabPage6);
}
private void PlaatsenLogo()
{
try
{
string q = "SELECT LogoPad from Logo WHERE PadId=1";
cmd.CommandText = q;
cn.Open();
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
DataTable dt = new DataTable();
dt.Load(dr);
dataGridView18.DataSource = dt;
}
}
catch (Exception e)
{
cn.Close();
MessageBox.Show(e.Message.ToString());
}
cn.Close();
}
private void dataGridView18_SelectionChanged(object sender, EventArgs e)
{
if (dataGridView18.SelectedRows.Count > 0)
{
DataGridViewRow dr = dataGridView18.SelectedRows[0];
textBox63.Text = dr.Cells[0].Value.ToString();
}
}
HOWEVER pictureBox1.Location=textbox63.text gives an empty result because textbox63.Text is emply but when i run my application textbox63.text isn't empy so why is this not working ???
|
|
|
|
|
dataGridView18
textBox63
Oh dear, oh dear, oh dear...
That implies that your one form as at least 18 data grids, and 63 text boxes. Tell me, would you like to sit down in front of that and use it every day? Why not? Because you can't find anything you are looking for? I certainly couldn't... Break it up, show a limited number of controls, and don't flood the user with info: it just confuses people.
Secondly, please stop using VS default names for controls. You may remember today what textBox47 contains, but will you in 3 months time when you have to maintain this? Use sensible names that describe the purpose of the control: it makes your code more self documenting, easier to read, and more reliable.
And third, what makes you think you have put a value in the textbox? The only code you show that refers to it will only do anything at all when the selection of the right datagridview changes. Did you use the debugger to check that the code was executed?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
the code is running because when i run the program with f5 textbox63 shows C:\Users\Master of Disaster\Pictures\wendy\beeldschoon.png. the point is i putted the location of an image into a database so that when i canged the picturebox and closed the application the settings are still saved when i re-open the application
|
|
|
|
|
Then you need to show us any code that actually does that, because the code you show certainly doesn't!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
THNXX!! it works now !! the problem seems to be that the tabpage wasn't vissible.
|
|
|
|
|
Hello,
I have html source code of a page from that source code i want to make signup windows application in c#
Source :
<!DOCTYPE html><!-- this MUST be first line -->
<html>
<head>
<title>MAD</title>
</head>
<body>
<form action='http://register.abc.com/register' method='post' id='cI' enctype='text/plain'>
<!-- hidden fields: -->
<input name='s' value="" type='hidden'/>
<input name='did' value='MIDP' type='hidden'/>
<input name='pid' value='abc' type='hidden'/>
<input name='cid' value='abc' type='hidden'/>
<input name='l' value='en' type='hidden'/>
<!-- visible fields: -->
<p>
<b>USERNAME</b><br>
<input name='un' value=''/>
</p><p>
<b>PASSWORD</b><br>
<input name='pw' value='password'/>
</p><p>
<img id="CAPTCHA" src="" /> <input type="button" id="regen" value="REFRESH CAPTCHA" />
</p><p>
<b>CAPTCHA</b><br/>
<input name='c' >
<br/><br/>
<input name='send' value=' CREATE ' type='submit'>
</p>
</form>
<script type="text/javascript">
var dids = ["MIDP","ANDROID","WINDOWS","BlackBerry","SYMBIAN","MAC","WP","LINUX","IPHONE","WM"];
var curdid = 0;
function createCaptcha()
{
var chars ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"
+ "abcdefghiklmnopqrstuvwxyz";
var str = "";
for (var i=0; i<10; i++)
{
str += chars[ Math.floor( Math.random() * chars.length ) ];
}
var form = document.getElementById("cI");
form.s.value = str;
document.getElementById("CAPTCHA").src =
'http://register.abc.com/init?w=120&h=40&f=png&s=' + str;
form.did.value = dids[curdid];
curdid = ( curdid + 1 ) % dids.length;
}
// generate initial CAPTCHA strings:
createCaptcha( );
document.getElementById("regen").onclick = createCaptcha;
</script>
</body>
</html>
I must do parse html in c# i think ?
I dont know actually how to start
Please help ...
|
|
|
|
|
Member 11413612 wrote: I must do parse html in c# i think ?
No, that would be a very odd way to do things.
Just because you have found a solution on the internet, doesn't mean it's the right solution: and HTML / Javascript code for a website (especially as poor as that is) does not translate well into a WinForms or WPF application. That's like assuming that the first car door you find when you walk into a car breakers will do to replace the front door of your house!
Stop, sit down, look at your task, and try to work out what to do for yourself instead of hunting for a "quick fix" for your homework on the internet. It really will be a lot easier!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Are you writing a Windows Forms or a WPF application? What you are looking at writing is normally called a Login dialog, so you need to search for a Login dialog using the appropriate technology (e.g., google for wpf login dialog).
|
|
|
|
|
Hi friends,
i need to know if any possibilities to get controls like drag and drop and form creation and fields must be created regarding the controls created by user.
and storing retrieving values from database is that possible if any other ideas about this project link reference pls guide me
|
|
|
|
|
Muthuraj.M wrote: pls guide me
If I had any idea what help you were asking for, I probably would...
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Edit your question and provide better information - don't try to be terse and save words: the better your question, the better the help we can give.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Muthuraj.M wrote: storing retrieving values from database is that possible The world would be in a mess if it wasn't.
|
|
|
|
|
Hello to everyone,
Maybe anyone can help me...
The szenario looks like this...
There is a Mobile Device with Windows CE, a WCF Service hosted in IIS on Desktop PC and a Sybase Database hosted on a different Server.
I have to connect the WCF form the Mobile Device and get the Data from the Database.
If i test it from localhost (ASP.NET Development Server) everythink works fine, and i recive the data from the Database. If i connect remotely i can also connect the WCF Service but if i try to connect the Database the client app throws a systemerror and i don't know why
Maybe a problem in the web.config I am greatful for any hint
<xml version="1.0"?>
<!--
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<!--
<authentication mode="Windows"/>
<!--
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<system.serviceModel>
<services>
<service behaviorConfiguration="BooksServices.Service1Behavior" name="BooksServices.BooksService">
<endpoint address="" binding="basicHttpBinding" contract="BooksServices.IBooksService">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://192.168.178.30:50501/BooksService.svc"/>
</baseAddresses>
</host>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="BooksServices.Service1Behavior">
<!--
<serviceMetadata httpGetEnabled="true"/>
<!--
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
modified 19-Feb-15 2:21am.
|
|
|
|
|
Hello again!
I have an issue regarding a search function for a datagridview to my MySQL DB.
The code is the following:
DataView DV = new DataView(dbDataSet);
DV.RowFilter = string.Format("Name LIKE '%{0}'", textBox1.Text);
dataGridView1.DataSource = DV;
Now the search kind-of works, but it only displays the data if the name I search for is completely written out.
For example, if I want to search for "John", I need to write "John", or else it will not show anything.
What am I doing wrong?
modified 19-Feb-15 10:54am.
|
|
|
|
|