|
|
See here[^] for an explanation. If you require accuracy of decimal values, use decimal not double.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
That is amazing! It has got a lot of Maths in it and that makes it great. Thanks for the link.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
If you want accuracy, you have to use decimal types.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi all
I want to backup and restore from mydatabase.
What is a good and easy way to do this job?
What is your idea if i write a sqlcommand for backup and restore form my database in c# code?(If you are agree with me what is the sqlcommand for backup and restore in c# code?)
|
|
|
|
|
What database will determine the tool to use.
If it is SQL server I would set up a job that uses Integration Services to execute a package that does this at a scheduled time. The right tool for the job.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have written the following code. It displays the notify icon in the system tray. But when I right click on the icon in the system it's not showing any menu there. I can't understand why this is not showing the menu. Can someone help me to show this?
ContextMenuStrip cms = new ContextMenuStrip();
ToolStripMenuItem mI1 = new ToolStripMenuItem();
mI1.Text = "Exit";
mI1.Click += new EventHandler(Click_Handler);
cms.Items.Add(mI1);
notifyIcon1.ContextMenuStrip = cms;
notifyIcon1.Visible = true;
notifyIcon1.Visible = true;
notifyIcon1.BalloonTipTitle = "My service";
notifyIcon1.Icon = new Icon("utility1.Ico");
notifyIcon1.BalloonTipText = "Started Successfully";
notifyIcon1.Text = "Service is running";
notifyIcon1.ShowBalloonTip(500);
|
|
|
|
|
do you have a message pump?
in a WinForm, when you show a form (with Show, ShowDialog or Application.Run) you get a message pump which deals with Windows messages and brings it all to life. A console app doesn't have a default message pump. One way to get one is by showing an invisible form (e.g. outside the desktop area).
|
|
|
|
|
I don't have any idea about message pump.
My console application is working as a server (in client server socket programming). I wrote the code for notify icon in the main function.
Can I have links or example code that will help me to display the context menu in the notify icon of my console application??
|
|
|
|
|
I need answer please help meee...
|
|
|
|
|
I am using thecode below to generate the reports but I want to know how to modify it to export to PDF file directly without a need of the report viewer control?
private void generate_invoices()
{
this.Cursor = Cursors.WaitCursor;
sql_connection = new SqlConnection(public_var.sql_server_connection);
try
{
sql_connection.Open();
sql_command = new SqlCommand("sp_get_account_book_by_book_guid", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_command.Parameters.Add("@book_guid", SqlDbType.UniqueIdentifier).Value = book_guid;
DataSet data_set = new dsReports();
reportTICS.Reset();
sql_reader = sql_command.ExecuteReader();
data_set.Tables[0].Load(sql_reader);
reportTICS.LocalReport.ReportEmbeddedResource = "dsReports_sp_get_account_book_by_book_guid";
reportTICS.LocalReport.ReportPath = @"C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Takhlees\Takhlees\envoice.rdlc";
ReportDataSource rds = new ReportDataSource();
rds.Name = "dsReports_sp_get_account_book_by_book_guid";
rds.Value = data_set.Tables[0];
reportTICS.LocalReport.DataSources.Add(rds);
ReportDataSource rds2 = new ReportDataSource();
rds2.Name = "dsReports_sp_get_account_book_by_account_number";
rds2.Value = data_set.Tables[0];
reportTICS.LocalReport.DataSources.Add(rds2);
reportTICS.LocalReport.Refresh();
reportTICS.RefreshReport();
if (chkSaveInvoice.Checked == true)
{
Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string filenameExtension;
byte[] bytes = reportTICS.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings);
string file_path = "c:\\temp\\envoice\\" + DateTime.Now.ToString("dd MMM yyyy");
System.IO.Directory.CreateDirectory(file_path);
string file_namr = file_path + "\\" + System.Guid.NewGuid() + ".pdf";
using (System.IO.FileStream fs = new System.IO.FileStream(file_namr, System.IO.FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
}
Process.Start(file_path);
}
progressInvoice.Minimum = 0;
progressInvoice.Maximum = data_set.Tables[0].Rows.Count;
}
catch (Exception exp)
{
event_log.create_event("Problem preparing or viewing daily report." + Environment.NewLine + Environment.NewLine + exp.Message + Environment.NewLine + Environment.NewLine + exp.Data + Environment.NewLine + Environment.NewLine + exp.StackTrace + Environment.NewLine + Environment.NewLine + exp.InnerException, EventLogEntryType.Error, 9999);
MessageBox.Show("Problem preparing or viewing daily report!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Close();
}
finally
{
if (sql_reader != null) sql_reader.Close();
if (sql_connection != null)
{
if (sql_connection.State == ConnectionState.Open)
sql_connection.Close();
}
}
this.Cursor = Cursors.Default;
}
|
|
|
|
|
I have nserted a table in my report which has header, details and footer but the footer is printing directly below the last details row.
how can I print the footer at the bottom of the page? because I am design a n invoice an dI want the footer to have the sum and printed at the bottom even if there is only one details row..
|
|
|
|
|
can anybody help pleazzzzzzzzzzzzzzzzzzzze....
|
|
|
|
|
What is XOR operator precedence following list?
Precedence
! NOT 1
& AND 2
| OR 3
^ XOR
|
|
|
|
|
|
Order of precedence
! NOT
& AND
^ XOR
| OR
MSDN provides answers for such questions.
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
Hi all...............
I need a link to download a SharpPcap new version SharpPcap-2.2.0rc1.src sourcce code, i need to use some of its functions at my project................
Regards...
|
|
|
|
|
|
Richard MacCutchan - Excellent
I vote for your
|
|
|
|
|
I learnt it from another person here on CP ... keep it going.
|
|
|
|
|
Thank u for interest, but don' find the source code at any one of the results..................
Can u help me to find that, i really need it at my project, i'm out of date since many days........................................
|
|
|
|
|
What exactly can you not find?! It's bleeding obviously searchable and the download is available on this page[^].
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
How on earth some of these people manage to make a living as developers is totally beyond me!
|
|
|
|
|