打开不带打印机的现金抽屉 [英] Open A Cash Drawer without Printer

查看:50
本文介绍了打开不带打印机的现金抽屉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我正在使用C#.Net 4.0.我需要打开现金抽屉.我只知道它的型号"C4141".它是一个USB端口现金抽屉.这是我用来打开现金抽屉的代码.

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...

推荐答案

它看起来像这样吗? http://www.ttnet.net/ttnet/gotoprd/SE300/072/0/051303231323633383.htm [ ^ ]
如果是这样,请单击联系我们"链接,他们应该可以提供帮助.
如果不是,请遵循Google提供的其他2500条结果:
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[^]


这篇关于打开不带打印机的现金抽屉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆