Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey, I need some help. I searched the web days ago and did not find an example to help me open a cash drawer.

...................................................
...................................................

What I have tried:

..................................................................................
................................................................................
Posted
Updated 12-Jul-20 1:55am

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search using your subject as the search term gave nearly a million hits: How do I open a cash drawer? C# - Google Search[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.
 
Share this answer
 
Comments
mahmoud_S_Salah 12-Jul-20 7:01am    
My friend did not read well, I told you that I have been searching for several days, and find something useful working with me.

Please attach a pre-tested code
OriginalGriff 12-Jul-20 7:32am    
And you read even worse: It took me ten seconds or less to find those 800,000 hits, most of which probably answer your question.

And while we are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

Demanding pre-tested code is rude, arrogant, and will not make you any friends here. We are not a "code to order" service - if we were, you would have been asked for your credit card details when you signed up ...
mahmoud_S_Salah 12-Jul-20 7:51am    
Are you available to fight with me, or to answer my friend’s question if you have information and don’t want to give it okay?

Did you ask for a rude code? Why did I answer many places and give codes?
Quote:
Hey, I need some help. I searched the web days ago and did not find an example to help me open a cash drawer.

Your question is worded in a way which mean that the is only 1 cashier drawer model from 1 maker and 1 way to open.
And mysteriously, Google id hiding any example.
What about show what is your Google query?
 
Share this answer
 
Comments
mahmoud_S_Salah 12-Jul-20 8:00am    
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.PointOfService;

namespace POS
{
public class CashDrawerClass
{
CashDrawer myCashDrawer;
PosExplorer explorer;

public CashDrawerClass()
{
explorer = new PosExplorer(this);
DeviceInfo ObjDevicesInfo = explorer.GetDevice("CashDrawer");
myCashDrawer = explorer.CreateInstance(ObjDevicesInfo);
}

public void OpenCashDrawer()
{
myCashDrawer.Open();
myCashDrawer.Claim(1000);
myCashDrawer.DeviceEnabled = true;
myCashDrawer.OpenDrawer();
myCashDrawer.DeviceEnabled = false;
myCashDrawer.Release();
myCashDrawer.Close();
}
}
}
Patrice T 12-Jul-20 8:18am    
Use Improve question to update your question.
So that everyone can pay attention to this information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900