We help IT Professionals succeed at work.
Get Started

Return

217 Views
Last Modified: 2013-12-16
public static void LoadDiscounts(ref decimal value, System.Data.DataRow dr, System.Data.DataRow drPLH)
        {
            if (dr.ItemArray[1].ToString() == "01") // Wheat
            {

                switch (dr.ItemArray[3].ToString())
                {
                    case "DAMP":
                        dr.ItemArray[2] += drPLH["WHT_DAMP_DISC_AMT"];
                        break;
                    case "DAMP STONE":
                        dr.ItemArray[2] += drPLH["WHT_DAMP_DISC_AMT"] + drPLH["WHT_TOUGH_DISC_AMT"];
                        break;
                    case "STONE":
                        dr.ItemArray[2] += drPLH["WHT_STONE_DISC_AMT"];
                        break;
                    case "STRAIGHT":
                        // dr.ItemArray[2] = dr.ItemArray[2];  // not needed
                        break;
                    case "TOUGH":
                        dr.ItemArray[2] += drPLH["WHT_TOUGH_DISC_AMT"];
                        break;
                    case "TOUGH STONE":
                        dr.ItemArray[2] += drPLH["WHT_TOUGH_DISC_AMT"] + drPLH["WHT_STONE_DISC_AMT"];
                        break;
                }
            }

 value = dr.ItemArray[2];  ==>

C:\SvnWork\InitialPriceReporting\DotNet\InitialPriceReporting\clsLoadDiscounts.cs(124,15): error CS1519: Invalid token '=' in class, struct, or interface member declaration
C:\SvnWork\InitialPriceReporting\DotNet\InitialPriceReporting\clsLoadDiscounts.cs(124,30): error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)
C:\SvnWork\InitialPriceReporting\DotNet\InitialPriceReporting\clsLoadDiscounts.cs(124,32): error CS1519: Invalid token ';' in class, struct, or interface member declaration
Comment
Watch Question
Director of Information Technology
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE