Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET4
Hi All!
I am using C#.Net 4.0. I need to open a Cash Drawer. I only know its model 'C4141'. Its a USB port cash drawer. Here is the code I am using to open the cash drawer.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.PointOfService;
using System.Windows.Forms;
 
namespace SAHIT.GSMS.WinUI
{
    class CashDrawerClass
    {
          CashDrawer myCashDrawer;
        PosExplorer explorer;
 
        public CashDrawerClass(Form form)
        {
            try
            {
                explorer = new PosExplorer();
                DeviceInfo ObjDevicesInfo = explorer.GetDevice("C4141");
                bool check = ObjDevicesInfo.IsDefault;
                myCashDrawer = (CashDrawer)explorer.CreateInstance(ObjDevicesInfo);
            }
            catch (Exception ex)
            {
                //throw ex;
            }
        }
 
        public void OpenCashDrawer()
        {
            myCashDrawer.Open();
            myCashDrawer.Claim(10000);
            myCashDrawer.DeviceEnabled = true;
            myCashDrawer.OpenDrawer();
            myCashDrawer.DeviceEnabled = false;
            myCashDrawer.Release();
            myCashDrawer.Close();
        }
 
    }
}
 
But unfortunately its not working. Please help me. I am stuck on it very badly...
Posted 19-Dec-11 0:00am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Does it look like this? http://www.ttnet.net/ttnet/gotoprd/SE300/072/0/051303231323633383.htm[^]
If so, follow the Contact US link and they should be able to help.
If not, follow the other 2,500 results Google gave: http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=C4141'.+Its+a+USB+port+cash+drawer[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 370
1 Sergey Alexandrovich Kryukov 205
2 Prakriti Goyal 177
3 jlopez788 134
4 _Amy 110
0 OriginalGriff 6,762
1 Sergey Alexandrovich Kryukov 5,539
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 19 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100