Esempio n. 1
0
 public CashDrawer(DrawerFlag _flag, int _ownerid, int _managerid, long _time, double _beginningterm = 0.0)
 {
     id            = new Random().Next(-1, int.MaxValue);
     billlogs      = new List <Bill>();
     operatelogs   = new List <OperateLog>();
     status        = DrawerOperate.SetStartTerm;
     beginningterm = _beginningterm;
     operatelogs.Add(OperateLog.Create(status, _ownerid, _managerid, 0, _time));
     time      = _time;
     ownerid   = _ownerid;
     managerid = _managerid;
     flag      = _flag;
     status    = DrawerOperate.Opened;
     cheques   = new List <Cheque>();
     operatelogs.Add(OperateLog.Create(status, _ownerid, _managerid, 0, _time));
     xprint = 0;
     zprint = 0;
     dprint = 0;
 }
Esempio n. 2
0
        public bool SignOut(long _time)
        {
            bool ReturnedValue = true;

            switch (status)
            {
            case DrawerOperate.Signed_In:
            {
                operatelogs.Add(OperateLog.Create(DrawerOperate.Signed_Out, ownerid, managerid, empolyeeid, _time));
                status     = DrawerOperate.Signed_Out;
                empolyeeid = 0;
                break;
            }

            default:
            {
                ReturnedValue = false;
                break;
            }
            }
            return(ReturnedValue);
        }
Esempio n. 3
0
 public CashDrawer(int _id, DrawerFlag _flag, int _ownerid, int _managerid, int _empolyeeid, long _time, double _beginningterm = 0.0)
 {
     id            = _id;
     billlogs      = new List <Bill>();
     operatelogs   = new List <OperateLog>();
     status        = DrawerOperate.SetStartTerm;
     beginningterm = _beginningterm;
     operatelogs.Add(OperateLog.Create(status, _ownerid, _managerid, _empolyeeid, _time));
     cheques    = new List <Cheque>();
     time       = _time;
     ownerid    = _ownerid;
     flag       = _flag;
     managerid  = _managerid;
     empolyeeid = _empolyeeid;
     status     = DrawerOperate.Opened;
     operatelogs.Add(OperateLog.Create(status, _ownerid, _managerid, _empolyeeid, _time));
     xprint        = 0;
     zprint        = 0;
     dprint        = 0;
     lastorderid   = 0;
     lastordertime = 0;
 }
Esempio n. 4
0
        public bool SignIn(int _employeeid, long _time)
        {
            bool ReturnedValue = true;

            switch (status)
            {
            case DrawerOperate.Signed_Out:
            case DrawerOperate.Opened:
            {
                operatelogs.Add(OperateLog.Create(DrawerOperate.Signed_In, ownerid, managerid, _employeeid, _time));
                status     = DrawerOperate.Signed_In;
                empolyeeid = _employeeid;
                break;
            }

            default:
            {
                ReturnedValue = false;
                break;
            }
            }
            return(ReturnedValue);
        }