コード例 #1
0
 public void Save(Client currentClient)
 {
     ClientRepository.Update(currentClient);
 }
コード例 #2
0
 public void Create(Client newClient)
 {
     ClientRepository.Create(newClient);
 }
コード例 #3
0
 public void Clear()
 {
     OrderNumber = null;
     Client = null;
     StatusEnum = Status.All;
     OrdersList.Clear();
 }
コード例 #4
0
        public void UseOrderWithID(int id)
        {
            _order = _model.GetByID(id);

            _client = _order.Client;
            _orderNumber = _order.OrderNumber;
            _status = _order.Status;
            _date = _order.Date;
            _comments = new BindingList<Comment>(_order.Comments.ToList());
            _orderItems = new BindingList<OrderItem>(_order.OrderItems);
            _state = _order.IsActive;
            _id = id;
            _totalPrice = _order.Sum;
        }
コード例 #5
0
 public void New()
 {
     _order = new Order(Domain.Entities.Comments.Comments.Init(Program.AuthUser, "Order"), new List<OrderItem>());
     _client = new Client() { ClientLocation = new Location(), Person = new Domain.Entities.Person() };
     _orderNumber = string.Empty;
     _status = Status.Opened;
     _date = DateTime.Now;
     _state = true;
     _orderItems = new BindingList<OrderItem>();
     _comments = new BindingList<Comment>();
     _id = 0;
     NotifyPropertyChanged();
 }
コード例 #6
0
 protected bool Equals(Client other)
 {
     return ClientLocation.Equals(other.ClientLocation) && Person.Equals(other.Person) && Comments.SequenceEqual(other.Comments) && Telephones.Equals(other.Telephones);
 }