Showing posts with label enter. Show all posts
Showing posts with label enter. Show all posts

Wednesday, March 7, 2012

Rounding Up

I have the following code that retreives the current value of the item price. however it always rounds up. If I manually enter a return value like so:
return (decimal)12.47
It returns the correct value, however if I set it with an expression like this:
return(decimal)arParam[1].Value;
It rounds the number up: How can I get it to not round up when insertign a value based ona expression?


publicdecimal GetCreditPrice(string CustomerSecurityKey)

{

try

{

System.Data.SqlClient.SqlParameter prmCrnt;

System.Data.SqlClient.SqlParameter[] arParam =new System.Data.SqlClient.SqlParameter[2];

prmCrnt =new System.Data.SqlClient.SqlParameter("@.CustomerSecurityKey", SqlDbType.VarChar,25);

prmCrnt.Value = CustomerSecurityKey;

arParam[0] = prmCrnt;

prmCrnt =new System.Data.SqlClient.SqlParameter("@.Price", SqlDbType.Decimal);

prmCrnt.Direction = ParameterDirection.Output;

arParam[1] = prmCrnt;

SqlHelper.ExecuteNonQuery(stConnection, CommandType.StoredProcedure, "GetCreditPrice", arParam);

return(decimal)arParam[1].Value;

}

catch(System.Exception ex)

{

throw ex;

}

}

Try the link I posted in this post for custom String Formatting. Hope this helps.
http://forums.asp.net/887067/ShowPost.aspx

Tuesday, February 21, 2012

rotate a text box 270 deg

I am trying to rotate text in a text box by 270 deg, I have read I can use
tb-rl but when I enter this into the direction Propertie of the textbox I get
an invaild Direction error.
Any Ides
Using VS 2005 & RS2005You want to use the 'WritingMode' property of the textbox.
Andy Potter|||is it possible to rotate text in 270 degrees.
Please reply.
Thanks,
--
Rao
"Potter" wrote:
> You want to use the 'WritingMode' property of the textbox.
> Andy Potter
>