Ejemplo n.º 1
0
 public Employee(Store aStore, int eId, decimal salary, string first, string last, string dob, string address)
     : base(first, last, dob, address)
 {
     this.employeeId = eId;
     this.store = aStore;
     this.salary = salary;
 }
Ejemplo n.º 2
0
 public Register(int registerId, Store store, Cashier cashier)
 {
     this.id = registerId;
     this.store = store;
     this.cashier = cashier;
     createNewSale();
 }
Ejemplo n.º 3
0
        public FormPOS()
        {
            InitializeComponent();

            Store store = new Store(1, "ABC","123 Abc St, ABC, CA 99999", 0.08m);
            Cashier cashier = new Cashier(store, 1, 1200m, "CashierA", "", "1/1/1988", "123 Abc St, ABC, CA 99999");
            setRegister(new Register(1, store, cashier));
        }
Ejemplo n.º 4
0
        public void getNumberOfRegistersTest()
        {
            string name = "ABC Market";
            string address = "123 Somewhere St, aCity, aState 00000";
            decimal taxRate = 0.08m;
            Store target = new Store(1, name, address, taxRate);

            Assert.AreEqual(0, target.getNumberOfRegisters());

            target.addRegister(new Register(1234));
            Assert.AreEqual(1, target.getNumberOfRegisters());

            target.addRegister(new Register(2345));
            Assert.AreEqual(2, target.getNumberOfRegisters());
        }
Ejemplo n.º 5
0
        public void addRegisterTest()
        {
            string name = "ABC Market";
            string address = "123 Somewhere St, aCity, aState 00000";
            decimal taxRate = 0.08m;
            Store target = new Store(1, name, address, taxRate);

            Register aRegister = new Register(1234,target);
            target.addRegister(aRegister);
            Assert.AreEqual(0, target.getRegisters().IndexOf(aRegister));

            Register anotherRegister = new Register(2345);
            target.addRegister(anotherRegister);
            Assert.AreEqual(1, target.getRegisters().IndexOf(anotherRegister));
        }
Ejemplo n.º 6
0
 public Register(int registerId, Store store)
 {
     this.id = registerId;
     this.store = store;
 }
Ejemplo n.º 7
0
 public Manager(Store aStore, int eId, decimal salary, string first, string last, string dob, string address)
     : base(aStore, eId, salary, first, last, dob, address)
 {
     employees = new List<Employee>();
 }
Ejemplo n.º 8
0
 public Cashier(Store aStore,
     int eId, decimal salary, string first, string last, string dob, string address)
     : base(aStore, eId, salary, first, last, dob, address)
 {
 }