|
my screen.cs class is like:
using System;
using System.Collections.Generic;
using System.Text;
namespace Screen
{
public class Screen
{
int screen_id;
string screen_name;
int screen_capacity;
public Screen(int ScreenId, string ScreenName, int ScreenCapacity)
{
screen_id = ScreenId;
screen_name = ScreenName;
screen_capacity = ScreenCapacity;
}
public int ScreenId
{
get { return screen_id; }
set { screen_id = value; }
}
public string ScreenName
{
get { return screen_name; }
set { screen_name = value; }
}
public int ScreenCapacity
{
get { return screen_capacity; }
set { screen_capacity = value; }
}
}
}
and the method in ScreenDb class is:
public void InsertScreen(int ScreenId, string ScreenName, int ScreenCapacity)
{
DbCommand cmd = db.GetStoredProcCommand("insertscreen");
db.AddInParameter(cmd, "@sid", DbType.Int32, ScreenId);
db.AddInParameter(cmd, "@sname", DbType.String, ScreenName);
db.AddInParameter(cmd, "@sc", DbType.Int32, ScreenCapacity);
cmd.ExecuteScalar();
}
my requirement is writing a method that will call Insert screen method with arguments as object of screen clas
|
|
|
|
|
public void InsertScreen(Screen screen)
{
int ScreenId = screen.ScreenId;
string ScreenName = screen.ScreenName;
int ScreenCapacity = screen.ScreenCapacity;
}
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
I am using MsEnterprise block to communicate with database. But confused where to store the connection string if it is in app.config then how to access app .config and how to store the connection string.
need help
|
|
|
|
|
There is an Enterprise Library Configuration tool that comes with the Enterprise Library. Open the app.config file in the configuration tool and it will make the changes for you. If you prefer later you can edit it by hand.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
But I don't have any app.config file. Should I add one? where to add?
|
|
|
|
|
sangramkp wrote: But I don't have any app.config file. Should I add one? where to add?
Right click the project in Visual Studio. Select Add-->Add Item... then choose "Application Configuration File" from the list (third column on my system)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Can somone please help me that how can I run Batch file in C# that runs another application...
Regads,
Jamil
M. Jamil Anwar
|
|
|
|
|
Using a process class. Have a look at this: http://www.codeproject.com/useritems/BatCompiler.asp
|
|
|
|
|
So your project is helping others
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
hi,
any idea on sniffing remote machine...my exaction scenario is like this:
i have machines A,B,C.and from machine A, i want to just monitor all the traffic that is going from machine B to machine C.
I have tried etheral...etc but all these are collecting the traffic that is coming and going out of a NIC card where etheral is running. but my problem is to sniff the remote machine...
cool83
|
|
|
|
|
You wanna put the NIC that ethereal runs on in promiscuous mode, this will capture most of the traffic on the LAN.
|
|
|
|
|
This is problem is related to switched network.From a single machine i want to monitor the whole network traffic.
If i have machine A and if i run ethereal it shows only the traffic that machine A's NIC is receiving or sending from/to LAN. But i want to monitor the incoming or outgoing traffic of a remote NIC also.
|
|
|
|
|
you would need to replace the switch with a hub. The whole point of a switch is that you only get the data intended for your machine. Failing that install some kind of logging software on the other machine. If you want to monitor data at the switch you may be able to use OpenView or equivalent if your hardware supports it.
HTH
Russ
|
|
|
|
|
thanks for the reply russ..
but i have no idea how openview may help me in doing this...baiscally, i want to monitor all the packets that are going in a swithced network..i found 2 options..1.port mirroring 2. arp spoofing...are there any other approaches to sniff all the machines from a single machine?
|
|
|
|
|
Hi All,In adrotator how can I change the picture dynamically in a specific time interval...
?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
<Ad>
<ImageUrl>c:\InetPub\wwwroot\catimages\1-1-1.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>Microsoft Main Site</AlternateText>
<Impressions>50</Impressions>
<Keyword>Topic1</Keyword>
</Ad>
<Ad>
<ImageUrl>c:\InetPub\wwwroot\catimages\1-1-3.jpg</ImageUrl>
<NavigateUrl>http://www.w3shools.com</NavigateUrl>
<AlternateText>Wing Tip Toys</AlternateText>
<Impressions>50</Impressions>
<Keyword>Topic2</Keyword>
</Ad>
</Advertisements>
Hi,Im Razana
|
|
|
|
|
when i use ShowDialog() method after setting the owner ,the new form does not appear in the task Manager
(sometimes in TaskBar even) .but when i didnt set any owner for the new form it does appear in the Task Manager.
how can i resolve it?
|
|
|
|
|
That depends. What is it that you feel is tbe problem, and how would you like it to be?
---
single minded; short sighted; long gone;
|
|
|
|
|
i need it appear in the Task Bar always.actuly the problem gets when it doesn't appear on the task bar where need to use ALT+TAB to access it...
|
|
|
|
|
If you want a dialog to appear in the task bar, it can't have a parent window.
If you want to access the dialog when it has a parent, just alt+tab to the parent.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks Guffa..i got the point..
|
|
|
|
|
I want to develop a video player of my own with my own specifications but i am not sure from where should I start for, I am totally new to window programming. Can you please direct me that what can I use for this purpose?
|
|
|
|
|
granshah wrote: I want to develop a video player of my own with my own specifications but i am not sure from where should I start for, I am totally new to window programming. Can you please direct me that what can I use for this purpose?
That is quite an undertaking for someone that is new to windows programming. I would first start by learning about how video files are stored and retrieved. I'd also find out how to convert from the various file formats to something that can be rendered on the screen. I'd find out how to get the sound our of the file and send that to the sound card. I'd find out how to syncronise the sound with the video.
In fact, of all the things that this project requires probably the only thing I wouldn't have to learn is how to put the buttons on the form.... And I've been writing software for 24 years. It looks like you have a lot to learn.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
If you mean you want to drag a media player control onto your form and 'skin' it, that seems easy enough. If you want to write a whole new program to play video files, then that's just not a suitable beginner project, on any level. It's also a waste of time IMO.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
msn messager will show a restore Dialoge, when it connect fail.
How should I write code for it?
Please give me directions, Thank you.
|
|
|
|