postmanplod
Programmer
I'm a total newby to C # and am trying to customise our ERP system (Epicor Vantage). I want to add a message box that will prompt the user, using the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Diagnostics;
using Bpm.Action;
namespace Bpm.Custom
{
public class Part
{
public virtual void OnBeforeCheckAltMethodForDelete(ref string ipPartNum, ref string ipRevisionNum, ref string ipAltMethod, ref string opMessage)
{
//
// TODO: Replace the throw statement with any code for an action before Part.CheckAltMethodForDelete() method invocation
//
//throw new System.NotImplementedException(CallContext.CurrentContext.ToString());
private void button1_Click(object sender, EventArgs e)
{
DialogResult result;
result = MessageBox.Show("Are you sure you want to delete this rev?", "Application 1", MessageBoxButtons.YesNo);
if (result == DialogResult.No) {
MessageBox.Show("App won´t close");
}
if (result == DialogResult.Yes) {
this.Dispose();
}
}
}
}
}
However, I keep receiving errors when trying to debug saying a } is expected on line 20 and and end of file is expeced on 41. What am I doing wrong?
Thanks for any help
Michael
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Diagnostics;
using Bpm.Action;
namespace Bpm.Custom
{
public class Part
{
public virtual void OnBeforeCheckAltMethodForDelete(ref string ipPartNum, ref string ipRevisionNum, ref string ipAltMethod, ref string opMessage)
{
//
// TODO: Replace the throw statement with any code for an action before Part.CheckAltMethodForDelete() method invocation
//
//throw new System.NotImplementedException(CallContext.CurrentContext.ToString());
private void button1_Click(object sender, EventArgs e)
{
DialogResult result;
result = MessageBox.Show("Are you sure you want to delete this rev?", "Application 1", MessageBoxButtons.YesNo);
if (result == DialogResult.No) {
MessageBox.Show("App won´t close");
}
if (result == DialogResult.Yes) {
this.Dispose();
}
}
}
}
}
However, I keep receiving errors when trying to debug saying a } is expected on line 20 and and end of file is expeced on 41. What am I doing wrong?
Thanks for any help
Michael