|
I would like to convert the amount to letter in crystal report, I use the "towords" but a number like 123.23 that gives me one hundred twenty-three 23/100, somebody who can help me thank you
|
|
|
|
|
|
thank you very much for your help, I found a solution but it is not complete.
I used this formula:
if
right(Totext({amount}),2)="00"
then
uppercase(ToWords({amount},0))+" "+"Only"
else
uppercase(ToWords({amount},0))+" AND "+uppercase(ToWords(tonumber(right(Totext({amount}),2)),0))+" "+"Paisa Only"
the resultat of this numbre 1186,86 is: THOUSAND ONE HUNDRED NINETY-SEVEN AND NINETY-SIX Paisa Only
how can I correct this error, how can I convert it as it is, thank you in advance
|
|
|
|
|
My project include 2 main project
1. Dll
2. some GUI that testing the Dll
Everything was OK - until something happened ( i did not done anything on the project setting ) and now when i compile the GUI i get two error massage
Message 1
Unable to copy file "C:\Workspace\Projects\ProjectName\bin\Debug\DllName.dll" to "bin\Debug\DllName.dll". The process cannot access the file 'bin\Debug\DllName.dll' because it is being used by another process.
Message 2
Unable to copy file "C:\Workspace\Projects\ProjectName\bin\Debug\DllName.pdb" to "bin\Debug\DllName.pdb". The process cannot access the file 'bin\Debug\DllName.pdb' because it is being used by another process.
The project is not running and i try to remove the reference from the GUI to the DLL and define it again - but nothing help.
I also close the project thru the Visual studio and open it again - and its still does not compile.
( If i try to compile the DLL alone its compile fine )
How can i solve it ?
Why this happened without changing the project setting ?
Thanks.
|
|
|
|
|
It sounds like the local copy in the GUI's Debug folder hasn't been released. I would try rebooting the machine, Open the solution then before buiding do a Clean.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
|
Hi world of codeproject !
I wanna to import info from *.wab OR *.vcf (windows Address Book ) to sql.
So please give me some solution.
|
|
|
|
|
hi, someone show me how can i write a procedure inside of a procedure. ofcourse just in C# environments.
|
|
|
|
|
You can't.
C# does not support nested procedures.
Nested classes, yes. And those classes can have their own methods (procedures). But not nested procedures.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
You can accomplish something that looks like this (sort of) using a delegate or lambda expression. In my article here[^], I demonstrate this with this section in the method SignInExecute :
private void SignInExecute(object parameter)
{
try
{
string accountName = AccountName;
string password = Password;
bool rememberMe = RememberMe;
Mouse.OverrideCursor = Cursors.Wait;
LoginMessage = string.Empty;
BackgroundTaskManager.RunBackgroundTask(() => { return Login(); },
(result) =>
{
Mouse.OverrideCursor = null;
if (result == null)
{
Mediator.Instance.NotifyColleagues(
ViewModelMessages.UserAuthenticated, false);
LoginMessage = "Unfortunately, Twitter did not recognise" +
" this username and " +
"password. Please try again";
}
else
{
LoginResult(result as XElement);
}
}
);
}
catch
{
LoginMessage = "We are sorry, SongBird was unable" +
" to connect to Twitter. " +
"Please check yournetwork connection and try again.";
}
} Take a look at the portion of code inside RunBackgroundTask to see this in operation.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
I'm trying to populate viewState with ArrayList like this-
ArrayList list = ConvertDataTableToArrayList(dt);<br />
ViewState["QueryList"] = list;<br />
<br />
public ArrayList ConvertDataTableToArrayList(DataTable st)<br />
{<br />
ArrayList query = new ArrayList(dt.Rows.Count);<br />
foreach (DataRow row in dt.Rows)<br />
{<br />
query.Add(row);<br />
}<br />
return query;<br />
<br />
}<br />
But i'm getting this error-
Type 'System.Data.DataRow' in Assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable
How can i need to solve it?
10x
|
|
|
|
|
i'v just red that i cannot use ArrayList in ViewState,
because ViewState needs a serializable object, and ArrayList is not one, because i cannot tell if it's components are serializable.
Is there another way to do this? 
|
|
|
|
|
It's not the ArrayList the causes the problem it's the DataRow which is not serialiazable.
1) Try using Session variables (Session["QueryList"])
2) Make a localized object that has properties that match the datarow columns and serialize the datarow
to the object, and use a System.Collections.Generic.List if possible.
|
|
|
|
|
Shani Natav wrote: Try using Session variables (Session["QueryList"])
Just shifting the problem from one storage mechanism to another. It still must be serializable.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You should be trying to store your data in viewstate anyway. ViewState should only be for small amounts of information, perhaps an ID to lookup the data again. Remember, viewstate is writtent ot he page so the larger it is the slower your pages will download and render.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If you are facing problem with iterating the row then you can try the below code,
for (int rowCount = 0; rowCount < dataTable.Rows.Count;rowCount++ )
{
query.Add(dataTable.Rows[rowCount]);
}
ViewState["QueryList"] = query;
and reverse----
list = (ArrayList)ViewState["QueryList"];
for (int rowCount = 0; rowCount < list.Count; rowCount++)
{
DataRow dataRW = (DataRow)list[rowCount];
}
Have a good day...
~V
modified on Monday, August 23, 2010 9:35 AM
|
|
|
|
|
I hold some List of point ( List<point> ) and i need to find 2 point from this list
1. Point 1 - with the minimum X, Y value
2. Point 2 - with the maximum X, Y value
What is the best way to do it ?
Thanks.
|
|
|
|
|
Yanshof wrote: minimum X, Y value
Yanshof wrote: maximum X, Y value
Yanshof wrote: the best way
first define "minimum" and "maximum" for pairs of numbers: what if the points are (1,100) and (100,1)?
define "best", it is very subjective.
|
|
|
|
|
Lets say i need to find the most left up point as minimum and the most right down point as maximum...
|
|
|
|
|
and which would be which for the list (1,100) and (100,1)??
|
|
|
|
|
I'm not sure that helps: (0, 100) and (100, 0) are both "left up", and they are both equidistant from (0, 0). You need to think about it: Is it more important to be near the left, or near the top? When does it change? If you pick "Left" as most important is (1, 100) less than (2, 0)?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
To visualize Luc's answer, which point is closer to the upper left corner? Is it X or Y?
O O O O O
O O O O O
O O O X O
O O Y O O
O O O O O
X (4, 3):
(4*4) + (3*3) = 16 + 9 = 25
Distance to upperleft corner: 5
Y (3, 4):
(3*3) + (4*4) = 9 + 16 = 25
Distance to upperleft corner: 5
I are Troll
|
|
|
|
|
you cheated and changed my example!
|
|
|
|
|
Luc Pattyn wrote: you cheated and changed my example!
Extended it, adding comments like any student would
I are Troll
|
|
|
|
|
How about something like this
Func<Point, Point, double> distanceToken = new Func<Point, Point, double>((p1, p2) => { return ((p1.X - p2.X) * (p1.X - p2.X)) + ((p1.Y - p2.Y) * (p1.Y - p2.Y)); });
Point TopLeft = new Point() { X = 0, Y = 0 };
Point BottomRight = new Point() { X = 100, Y = 100 };
var t = (from pt in points
select new { p=pt, d= distanceToken (TopLeft, pt) }).OrderBy(a=>a.d);
Console.WriteLine("nearest topleft:" + t.First().ToString());
Console.WriteLine("farthest topleft:" + t.Last().ToString());
var t = (from pt in points
select new { p = pt, DistToA = distanceToken (TopLeft, pt), DistToB = distanceToken(BottomRight, pt) });
modified on Sunday, August 22, 2010 4:46 PM
|
|
|
|