Пример #1
0
        public void AddClientCommand_Executed(object sender)
        {
            if (AppProperties.FormHaveModifications)
            {
                _contoData.ClientAdd(new Client
                {
                    Name       = Name,
                    Address    = Address,
                    City       = City,
                    PostalCode = PostalCode,
                    FiscalCode = FiscalCode,
                    VatCode    = VatCode
                });

                Name       = string.Empty;
                Address    = string.Empty;
                City       = string.Empty;
                PostalCode = string.Empty;
                FiscalCode = string.Empty;
                VatCode    = string.Empty;

                _completeList = new List <Client>(_contoData.ClientsGet());
                NumberOfPages = (int)Math.Ceiling((double)_completeList.Count / NumberOfRowsInClientsGrid);
                SetClientsList();

                AppProperties.FormHaveModifications = false;
            }
        }