Click here to Skip to main content
14,577,943 members
   

C#

 
GeneralRe: Converting InAppBilling.Plugin to Amazon Pin
OriginalGriff2-Jun-20 5:18
mveOriginalGriff2-Jun-20 5:18 
GeneralRe: Converting InAppBilling.Plugin to Amazon Pin
Exoskeletor2-Jun-20 7:40
MemberExoskeletor2-Jun-20 7:40 
AnswerRe: Converting InAppBilling.Plugin to Amazon Pin
Kris Lantz2-Jun-20 9:13
professionalKris Lantz2-Jun-20 9:13 
GeneralRe: Converting InAppBilling.Plugin to Amazon Pin
Exoskeletor2-Jun-20 9:24
MemberExoskeletor2-Jun-20 9:24 
QuestionState machine performance woes in .NET Pin
Member 79891222-Jun-20 3:04
MemberMember 79891222-Jun-20 3:04 
AnswerRe: State machine performance woes in .NET Pin
Member 79891222-Jun-20 3:41
MemberMember 79891222-Jun-20 3:41 
GeneralRe: State machine performance woes in .NET Pin
F-ES Sitecore2-Jun-20 4:08
mveF-ES Sitecore2-Jun-20 4:08 
QuestionProblem with Currency format Column Calculation in my dGV in C# Winform Application. Pin
Member 1467808531-May-20 6:47
MemberMember 1467808531-May-20 6:47 
Please help me out am new to see c#
How can I resolve this problem – I use OleDbDataReader to Read the Price from Database to the TextBox “Unit Price” with the currency format but the issues is the Subtotal column calculation Stop working.
See below image 1 for details. As you can see when I read the Price to the Unit Price TextBox as currency format the Subtotal stop working and the total Qty. see the code where I use the currency format.
while (reader.Read())
{ 
txtPrice.Text = Convert.ToDouble(reader["Price"]).ToString("C",info);
}
<pre>

But if I remove the currency format and use custom format for the textbox “Unit Price” everything work fine but I really want the currency format on the unit Price txtBox. 
See when the format is removed and the custom format is used see code below and  image 2. 

<pre>
while (reader.Read())
{ 
txtPrice.Text = Convert.ToDouble(reader["Price"]).ToString("#,00.00");




SUBTOTAL CALCULATION CODE

private void Subtolcalculation()
        {

            for (int i = 0; i < dataGVfrontsale.Rows.Count - 1; i++)

            {
                CultureInfo info;
                info = new CultureInfo("en-NG");

                double colPrice = double.Parse(dataGVfrontsale.Rows[i].Cells[4].Value.ToString());
                double colQty = double.Parse(dataGVfrontsale.Rows[i].Cells[5].Value.ToString());
                double subtol = colPrice * colQty;

                dataGVfrontsale.Rows[i].Cells[7].Value = subtol;//.ToString("C", info);

               
            }

CODE FOR TOTAL QUANTITY / CURRENCY


private double Total1()

        {
            double totl = 0;

            int i = 0;
            for (i = 0; i < dataGVfrontsale.Rows.Count; i++)
            {
                totl = totl + Convert.ToDouble(dataGVfrontsale.Rows[i].Cells[5].Value);
            }

            return totl;

        }

public void calculColumns()
        {
            //Currency Symbol  total on Textbox 
            CultureInfo info;
            info = new CultureInfo("en-NG");
           

            txtTolQty.Text = Total1().ToString("C", info);



            //txtGrndTl.Text = Total22().ToString("#,00.00");

            //txtFinalTot.Text = Total22().ToString("C", info);

            
         }
<pre>

AnswerRe: Problem with Currency format Column Calculation in my dGV in C# Winform Application. Pin
OriginalGriff31-May-20 20:34
mveOriginalGriff31-May-20 20:34 
QuestionMulti threading in C# Pin
bjwaldo28-May-20 9:21
Memberbjwaldo28-May-20 9:21 
AnswerRe: Multi threading in C# Pin
JudyL_MD28-May-20 10:45
MemberJudyL_MD28-May-20 10:45 
AnswerRe: Multi threading in C# Pin
F-ES Sitecore29-May-20 1:17
mveF-ES Sitecore29-May-20 1:17 
GeneralRe: Multi threading in C# Pin
bjwaldo30-May-20 7:30
Memberbjwaldo30-May-20 7:30 
QuestionLinq TO SQL - Pass Table Name Pin
Kevin Marois28-May-20 8:57
professionalKevin Marois28-May-20 8:57 
AnswerRe: Linq TO SQL - Pass Table Name Pin
Richard Deeming29-May-20 0:11
mveRichard Deeming29-May-20 0:11 
QuestionC# How To Get Version Info Of exe in FTP Pin
Ertuğrul ÇİÇEK28-May-20 3:16
MemberErtuğrul ÇİÇEK28-May-20 3:16 
AnswerRe: C# How To Get Version Info Of exe in FTP Pin
Richard MacCutchan28-May-20 3:19
mveRichard MacCutchan28-May-20 3:19 
GeneralRe: C# How To Get Version Info Of exe in FTP Pin
Ertuğrul ÇİÇEK28-May-20 3:41
MemberErtuğrul ÇİÇEK28-May-20 3:41 
GeneralRe: C# How To Get Version Info Of exe in FTP Pin
Richard MacCutchan28-May-20 3:43
mveRichard MacCutchan28-May-20 3:43 
GeneralRe: C# How To Get Version Info Of exe in FTP Pin
Richard Deeming28-May-20 3:53
mveRichard Deeming28-May-20 3:53 
GeneralRe: C# How To Get Version Info Of exe in FTP Pin
OriginalGriff28-May-20 3:57
mveOriginalGriff28-May-20 3:57 
GeneralRe: C# How To Get Version Info Of exe in FTP Pin
Ertuğrul ÇİÇEK28-May-20 6:32
MemberErtuğrul ÇİÇEK28-May-20 6:32 
GeneralRe: C# How To Get Version Info Of exe in FTP Pin
Richard Deeming28-May-20 8:32
mveRichard Deeming28-May-20 8:32 
QuestionCreating and Binding UI objects in C# instead of XAML (WPF) Pin
Member 1484454026-May-20 12:04
MemberMember 1484454026-May-20 12:04 
AnswerRe: Creating and Binding UI objects in C# instead of XAML (WPF) Pin
Mycroft Holmes26-May-20 12:26
professionalMycroft Holmes26-May-20 12:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.