Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read Guest Name from the Check

Status
Not open for further replies.

Vikram Singh

Programmer
Jan 3, 2018
39
KW
Hello,

Anyone, knows or clue how to [highlight #FCE94F] add the Guest's Name to the check and read the Guest's Name from the Check using Extensibility C# code?[/highlight]
If so please help me with the code snippet .

 
C# Create a Macro to add to GuestCheckID.

//Get Input
var parms = new Micros.Ops.Input.RequestEntryParameters();
parms.Title = title;
parms.Prompt = "Enter Customer Name:";
parms.RequestEntryType = Micros.Ops.Input.RequestEntryType.String ;
var response = OpsContext.RequestEntry(
parms);

//Apply Customer Name to GuestCheckID Macro.
OpsCommand cmdMacro1 = new OpsCommand(OpsCommandType.Macro);
cmdMacro1.Data = new List<OpsCommand>();
((List<OpsCommand>)cmdMacro1.Data).Add(new OpsCommand(OpsCommandType.GuestCheckID));
((List<OpsCommand>)cmdMacro1.Data).Add(new OpsCommand(OpsCommandType.AsciiData) { Text = response});
((List<OpsCommand>)cmdMacro1.Data).Add(new OpsCommand(OpsCommandType.EnterKey));
var result = OpsContext.ProcessCommand(cmdMacro1);


This will Save it into the CheckPostingDB CHECKS table in the AlternateID Field. GuestCheckID field has a Max of 20 Characters.

 
Thank you very much goodbody[thumbsup2] and Chicken730[thumbsup2]. You guys are awesome [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top