public OrderItem(
            Guid id,
            Guid orderId,
            //TODO: Use Applicant class or ID
            Guid staffId,
            OvertimeDay day,
            OvertimeTimeRegion region,
            TransportationFee transportFee,
            OvertimeNote note,
            DateTime timeOfCreated)
        {
            AssertionConcern.AssertArgumentNotEmptyGuid(id, "Overtime roder id cannot be null.");
            AssertionConcern.AssertArgumentNotEmptyGuid(orderId, "Overtime order id cannot be null.");
            AssertionConcern.AssertArgumentNotEmptyGuid(staffId, "Staff id cannot be null.");
            AssertionConcern.AssertArgumentNotNull(day, "Day cannot be null");
            AssertionConcern.AssertArgumentNotNull(region, "Region cannot be bull");
            AssertionConcern.AssertArgumentNotNull(Note, "Note cannot be null");
            AssertionConcern.AssertArgumentNotNull(timeOfCreated, "Time of Created cannot be null.");

            this.Id            = id;
            this.OrderId       = orderId;
            this.StaffId       = staffId;
            this.Day           = day;
            this.Region        = region;
            this.TransportFee  = transportFee;
            this.Note          = note;
            this.TimeOfCreated = timeOfCreated;
        }
        public InApporvalOvertimeOrder(Guid id, Guid staffId, OvertimeOrderMonth month, DateTime timeOfSubmited)
        {
            AssertionConcern.AssertArgumentNotEmptyGuid(id, "Overtime roder id cannot be null.");
            AssertionConcern.AssertArgumentNotEmptyGuid(staffId, "Overtime order staff id cannot be null.");
            AssertionConcern.AssertArgumentNotNull(timeOfSubmited, "Time of submited cannot be null.");

            this.Id             = id;
            this.TimeOfSubmited = timeOfSubmited;
            this.Status         = OvertimeOrderStatus.InApproval;
        }
Esempio n. 3
0
        public OvertimeOrderCreated(Guid overtimeOrderId, Guid staffId, DateTime timeOfCreation)
        {
            AssertionConcern.AssertArgumentNotEmptyGuid(overtimeOrderId, "OvertimeOrder id cannot be null.");
            AssertionConcern.AssertArgumentNotEmptyGuid(staffId, "Staff id cannot be null.");
            AssertionConcern.AssertArgumentNotNull(timeOfCreation, "Time of creation cannot be null");

            this.OvertimeOrderId = overtimeOrderId;
            this.StaffId         = staffId;
            this.TimeOfCreation  = timeOfCreation;
        }
        public NewBornOvertimeOrder(Guid id, Guid staffId, OvertimeOrderMonth month, DateTime timeOfCreation)
        {
            AssertionConcern.AssertArgumentNotEmptyGuid(id, "Overtime roder id cannot be null.");
            AssertionConcern.AssertArgumentNotEmptyGuid(staffId, "Overtime order staff id cannot be null.");
            AssertionConcern.AssertArgumentNotNull(timeOfCreation, "Time of creation cannot be null.");

            this.Id             = id;
            this.StaffId        = staffId;
            this.Month          = month;
            this.TimeOfCreation = timeOfCreation;
            this.Status         = OvertimeOrderStatus.NewBorn;
        }
        public CanceledOvertimeOrder(Guid id, Guid staffId, OvertimeOrderMonth month, DateTime timeOfCanceled)
        {
            AssertionConcern.AssertArgumentNotEmptyGuid(id, "Overtime roder id cannot be null.");
            AssertionConcern.AssertArgumentNotEmptyGuid(staffId, "Overtime order staff id cannot be null.");
            AssertionConcern.AssertArgumentNotNull(timeOfCanceled, "Time of cancel cannot be null.");


            this.Id             = id;
            this.StaffId        = staffId;
            this.Month          = month;
            this.TimeOfCanceled = timeOfCanceled;
            this.Status         = OvertimeOrderStatus.Canceled;
        }