-3

Does any body know how to create a C# application that can open a drawer connected to the computer and print receipt at same time?

Drawer Name: PCD-354 Electronic Cash Drawer

Cash receipt printer: Epson TM-T88v

Allan Chua
  • 9,305
  • 9
  • 41
  • 61
  • How could we possibly give you code for unspecified hardware? – user247702 Oct 12 '11 at 07:38
  • 3
    Something tells me you're better of reading the API reference for your hardware/software rather than hoping some random developer will just happen to know the API by heart. – Jamiec Oct 12 '11 at 07:43
  • try to use this link buddy it will help.. http://social.msdn.microsoft.com/Forums/en/posfordotnet/thread/968d7d90-9376-4fee-9838-b79ec0e630e3 – Sheila SanDiego Oct 12 '11 at 08:24

1 Answers1

6
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();
  }
}
}

try that. maybe it will help you have an overview on things

Nathan
  • 1,520
  • 1
  • 12
  • 21