private void UpdateClientCode(string code)
        {
            bool   notFound = true;
            int    id       = 0;
            string name     = null;

            if (!String.IsNullOrWhiteSpace(code))
            {
                OrderDataSet ds = new OrderDataSet();
                OrderDataSetTableAdapters.ClientsTableAdapter adapter = new OrderDataSetTableAdapters.ClientsTableAdapter();
                OrderDataSet.ClientsDataTable dataTable = adapter.GetDataByCode(code);

                if (dataTable.Rows.Count > 0)
                {
                    OrderDataSet.ClientsRow row = (OrderDataSet.ClientsRow)dataTable.Rows[0];

                    id       = row.Id;
                    name     = row.Name;
                    notFound = false;
                }
            }
            ClientId       = id;
            ClientName     = name;
            ClientNotFound = notFound;
        }
        private void UpdateClientInfo(int id)
        {
            if (id > 0)
            {
                OrderDataSet ds = new OrderDataSet();
                OrderDataSetTableAdapters.ClientsTableAdapter adapter = new OrderDataSetTableAdapters.ClientsTableAdapter();
                OrderDataSet.ClientsDataTable dataTable = adapter.GetDataById(id);

                if (dataTable.Rows.Count > 0)
                {
                    OrderDataSet.ClientsRow row = (OrderDataSet.ClientsRow)dataTable.Rows[0];

                    ClientCode = row.Code;
                    ClientName = row.Name;
                }
            }
        }