|
I am currently designing a quotation and would like to add a Valid Till date to show how long the quote is valid. For instance, if the quote was generated today, i would like the "valid till" date to be set from today plus 30 days. How would i do this in crystal syntax?
|
|
|
|
|
if i have a c# application.exe installed in a remote system can i get the ip of that system
if yes plz help me
|
|
|
|
|
System.Net.IPAddress[] myIpAddresses = System.Net.Dns.GetHostAddresses(Environment.MachineName);
<Edit> oops, only just saw you wanted remote machine. In that case just specify the HostName instead of Environment.MachineName like so...
System.Net.IPAddress[] myIpAddresses = System.Net.Dns.GetHostAddresses("SomeComputer");
</Edit>
<Edit2> OMG, i think I'm experiencing dyslexia!!
If you want to run the app remotely and get its machines IP use the 1st snippet, but like CG said it needs to be sent somewhere...
If you have the remote machines HostName you can use the 2nd snippet on the local machine.
</Edit2>
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
modified on Monday, September 7, 2009 5:22 AM
|
|
|
|
|
i need to find out all the machines running the application.exe how is that possible
|
|
|
|
|
Have application.exe get the IP address, and write it into a SQL database. That would be the easiest way to do it...
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
is it possible to use dataset in place of sql database, but i dont know how to transfer data from one machine to another using datasets.can u help me
|
|
|
|
|
Yes, if you write an app that runs on that remote machine, it can read and broadcast the IP address if you like. Of course, it needs somewhere to send it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi every body. i was working on a project and faced a problem. the problem is i have 4 columns in the table in my database and i am reading the contents of the table through data reader and shows it on the data gridview now what i want is to customise the gridview to show only two columns here is my code
private void Form1_Load(object sender, EventArgs e)
{
DBHandler ObjDBHandler = new DBHandler();
dataGridView3.DataSource = ObjDBHandler.GetAllPrograms();
}
suppose i have four columns in my data base and i want to show only two of them which is ID and Name what i do please explain me...
Thankyou
|
|
|
|
|
Format your grid to show those columns. This is basic stuff. You should buy a winforms book and read it, or try reading MSDN.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
datagridview.datasource=(come data from database i think 4 column);
datagridview.columns["colname"].visible=false//what u dont need to show
Shafik
press a bamboo to graus pleas
|
|
|
|
|
Dearest Coder,
i want to delete mail which in pop3 mail server programmatically using C#.
Can u give me the C# source code.
thanks in Advance.
Shafik
|
|
|
|
|
|
thanks for your reply.but i need specific code where i send the server info it delete the all mail.
would u help me
|
|
|
|
|
Just open port 110 on server via NetworkStream and then send text-commands to it.
It's that easy. That's why I said 'simple' text protocol.
If it's to simple use link[^]
|
|
|
|
|
|
would you help me by C# code
thanks
|
|
|
|
|
yes of course, just send the code and the question.
|
|
|
|
|
//my method it works but mail is not deleted
Spartan.Net.Mail.POP3 objPOP = new Spartan.Net.Mail.POP3();
objPOP.Connect(Properties.Settings.Default.POP3Server, Properties.Settings.Default.POP3Port, frmLogin._currentUser.fldUserEmail, password);
try
{
objPOP.DeleteMessage(_ReceiveMailNumber);
return true;
}
catch(Exception ex)
{
XtraMessageBox.Show(ex.Message.ToString());
return false;
}
//connection code
public MAIL_ERROR Connect(string host, int port, string username, string password)
{
try
{
_conn.Host = host;
_conn.Port = port;
_conn.Connect();
System.Threading.Thread.Sleep(_TimeOut);
return Login(username, password);
}
catch (Exception e)
{
System.Diagnostics.Trace.Write(e.ToString());
return MAIL_ERROR.ERROR_CANTCONNECT;
}
}
//i send mail receive number
public MAIL_ERROR DeleteMessage(int id)
{
if (this._state != POP3_STATE.POP3_LOGGEDIN)
{
throw new MailException("You are not logged into the mail server");
}
string ret = "";
SendCommandSynchronous(string.Format("DELE {0}\r\n", id), out ret, false);
if (ret.Contains("OK") == false)
{
throw new MailException(ret);
}
else
{
return MAIL_ERROR.ERROR_NONE;
}
}
private MAIL_ERROR SendCommandSynchronous(string cmd, out string response, bool bMultiLineResponse)
{
// Remove any data that was left over on the buffer
string deadData = _conn.Receive();
_conn.Send(cmd);
response = WaitForResponse(bMultiLineResponse);
return MAIL_ERROR.ERROR_NONE;
}
private string WaitForResponse(bool bMultiLine)
{
int timeout = 5000; // wait 10 seconds for response
int waitedTime = 0;
string strRet = "";
while (waitedTime < timeout)
{
System.Threading.Thread.Sleep(_TimeOut);
strRet += _conn.Receive();
if (CommandComplete(strRet, bMultiLine) == true)
{
return strRet;
}
waitedTime += _TimeOut;
}
return strRet;
}
|
|
|
|
|
What he's saying is, do your own work. He's told you how it's done, if you can't even try to do it based on this, then you should consider doing a programming course, so you can one day hope to be a programmer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi cristian graus,
its really very good news that u r only programmer in the world who's programming knowledge is like God. u can tell u as second god.
Shafik
|
|
|
|
|
khosnur wrote: its really very good news that u r only programmer in the world who's programming knowledge is like God. u can tell u as second god.
Well, I can program, AND I can spell. I can even use google. If I ask for help, I tend to first try to think for myself and ask questions where I tell people what I've tried instead of asking them to send me code. This does not make me 'god', but I guess it does make me working for a real wage in the real world, instead of being hired because I am cheap, by people who don't realise I am not worth it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Graus,
i think u dont see that i thought and i up;oad my code but it doesnt work. why i dont know would u see....
then complement....
Shafik
|
|
|
|
|
It looks to me like you're using some sort of third party library. What error you get, is still a mystery. No-one can help based on that lack of information.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Graus,
i supply the mail receive number which i got when i received mail.interesting it shows no error when i debug. but mail is not deleted.
would u help me by any ires
thanks in advance
|
|
|
|
|
motherchod reply des na ken?
|
|
|
|