troubleshooting Question

C#: Identifier Expected

Avatar of Software Engineer
Software Engineer asked on
C#
9 Comments2 Solutions90 ViewsLast Modified:
Hi:

I'm getting "Identifier expected" on lines 37, 38, 39, and 45 of the code below.

I have attached a screenshot to show where these lines are at.

How do I get rid of this error?

Thanks!

John

string dt ="1/1/1900";
if (po.val_Required_Date ==po.val_PO_Date)
{
Console.WriteLine(dt.ToString());
dt = po.val_Required_Date.ToString();
}
//return"";

//PO PreSave for header fields//

if (po.val_Required_Date == Genframe4.Utils.DateTimeExtensions.MinValue)
{
	e.Cancel = true;
	return "Required Date is a required field.";
}
//return String.Empty;

//PO PreSave for line item fields//

//foreach (SalesPad.Bus.PurchaseLineItem pli in po.LineItems)
//{
//if (pli.IsChanged)
//{
//	pli.val_Required_Date = Genframe4.Utils.DateTimeExtensions.MinValue;
//	pli.val_Promised_Ship_Date = Genframe4.Utils.DateTimeExtensions.MinValue;
//	pli.val_Promised_Date = Genframe4.Utils.DateTimeExtensions.MinValue;
//}}

//return "";

foreach (SalesPad.Bus.PurchaseLineItem pli in po.LineItems)
{
if (pli ["xFinal_Site"] == "" )
{
          e.Cancel = true;
          return "Final Site is a required field.";
}
}

//return String.Empty;

foreach (SalesPad.Bus.PurchaseLineItem pli in po.LineItems)
{
if (pli.IsChanged)
{
	pli.["xRequiredDate"] = Genframe4.Utils.DateTimeExtensions.MinValue;
	pli.["xNewPromisedDate"] = Genframe4.Utils.DateTimeExtensions.MinValue;
	pli.["xPromisedDate"] = Genframe4.Utils.DateTimeExtensions.MinValue;
}}
//return "";

foreach (SalesPad.Bus.PurchaseLineItem pli in po.LineItems)
{
if (pli.["xRequiredDate"] == Genframe4.Utils.DateTimeExtensions.MinValue)
{
	e.Cancel = true;
	return "Required Date is a required field.";
}
}
return String.Empty;

/*
if (sd.IsNew &&  sd.val_Sales_Doc_ID.ToString() == "STDORD")
{
	DateTime dt = DateTime.Now;
dt = dt.AddDays(3);
Console.WriteLine(dt.ToString());	
sd.val_Req_Ship_Date =dt;	
foreach (SalesPad.Bus.SalesLineItem sli in sd.LineItems)
{
sli.val_Req_Ship_Date =dt;
}
*/
Identifier expected
ASKER CERTIFIED SOLUTION
ste5an
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros